113 lines
5.6 KiB
Typst
113 lines
5.6 KiB
Typst
#set enum(numbering: "1.a.i.")
|
|
|
|
#align(center)[#text(size:2em, weight:"bold")[EET Boxes Setup Instruction]]
|
|
|
|
#outline()
|
|
|
|
= Preparation
|
|
Each box is composed of a few components:
|
|
- The base board where the FPGA, microcontroller, and ethernet port are installed.
|
|
- The adapter board that plugs in the base board and provide the input and output power connectors.
|
|
- The case, composed of the bottom and top plastic parts and the front and back metal plates.
|
|
- The hardware: screws, spacers, spings.
|
|
|
|
When fully setup, the box should have all the software and the complete case installed.
|
|
|
|
Before starting the setup, it is recomended to reset the boxe to wipe any remaining configuration.
|
|
To do so, provide power to the box by plugging in the ethernet cable and use a jumper cable to connect the 3.3V and ERASE pads on the base board for five seconds.
|
|
After removeing the jumber connection, power cycle the device.
|
|
|
|
= Flashing FPGA
|
|
The FGPA is the largest square ship on the base board.
|
|
The port to flash the FGPA is the vertical receptacle located the closest to the FPGA.
|
|
Here are the steps to follow to flash the FPGA.
|
|
|
|
+ Power ON the box using the ethernet cable.
|
|
+ Connect the FPGA adapter cable to the FPGA port on the base board and to a USB port on the PC.
|
|
+ If using a virtual machine, go to `Device` #sym.arrow `USB` and tick the box next to `FPGA Programmer Cable`. If the Latice Diamond software xwas already running, restart it.
|
|
+ Start the Latice Diamond software and open the `palidaq` project.
|
|
+ Go to `tools` #sym.arrow `Programmer`.
|
|
+ For the first time, change the file name to `fpga/src/impl1/palidaq_imp1.jed`.
|
|
+ For the first time, change the `Operation` to `FLASH Erase, Program, Verify, Secure`.
|
|
+ Save this configuration with `ctrl+s`.
|
|
+ On the right under `Cable Settings` select `Detect Cable` and verify that there is no error in the console. If you do have an error, make sure the box is receiving power.
|
|
+ Flash the firmware with the `Program` icon (down green arrow button above the operation line).
|
|
|
|
Congratulation, the FPGA is ready now.
|
|
|
|
= Flashing Base Firmware
|
|
The base firmware is common to all boxes.
|
|
To flash the base firmware to the Atmel microcontroller, follow these steps:
|
|
|
|
+ Power ON the box using the ethernet cable.
|
|
+ Connect the Atmel adapter to the base board using thevertical port closest to the Atml chip.
|
|
+ If using a virtual machine, enable the USB device as for the FPGA.
|
|
+ Open the Microchip software.
|
|
+ Select `Tools` #sym.arrow `Device Programming`.
|
|
+ ??
|
|
+ In the Device dropdown select your device based on the final characters etched on the Atmel chip:
|
|
+ ATSAMV71Q19B for the Q19
|
|
+ ATSAME70Q20B for the Q20
|
|
+ ATMSAME70Q21B for the Q21
|
|
+ Select `SWD` in the interface dropdown. Make surethe cable from the adapter to the board is connected to the SWD port.
|
|
+ Press `Apply`.
|
|
+ Press `Read` next to the `Device Signature` box and make sure the device ID updated.
|
|
+ Select `Memories` in the left sidebar.
|
|
+ Ensure the selected file is `application.elf` either in the `Debug` or `Debug_V71Q19B` folder.
|
|
+ Press `Programm`
|
|
|
|
#text(fill:red)[Add instructions for reseting the security bits to 0x42]
|
|
|
|
To set the security bits that diable recovery of the firmware, select `Security` in the left sidebar of the `Devide Programming` menu and press `Set`.
|
|
|
|
= Registering Device
|
|
|
|
The firmware of the box contains the information for the conecting to the server.
|
|
To get these information, you first need to register the new box in Palitronica's system.
|
|
The frontend \footnote[https://steetdev001.z27.web.core.windows.net/] lists all boxes across all tenants and can be used for some operations but we will mainly use it to register a new box.
|
|
|
|
In order to register a new device, you need some information including the `MCU Serial` and the `MAC Address` of the box.
|
|
These two info are not directly readable on the box and require to use the calibration Raspberry Pi.
|
|
|
|
+ After flashing the FPGA and the base firmware, connect the ethernet cable of the box to a PoE switch on the same network as the Raspberry Pi.
|
|
+ On the Pi, run the `UDP server` script (on the desktop) in the terminal.
|
|
+ After a few seconds, the script should output the `MCU Serial` and `MAC Address` of the box.
|
|
|
|
Now in the frontend, follow these steps:
|
|
|
|
+ On the sidebar, select `Inventory`
|
|
+ On the top right corner, select `Dev2 Lab` in teh dropdown menu.
|
|
+ Verify that no box with the same `Device Id` already exists in the inventiory.
|
|
+ Click the #sym.plus icon in the top right corner.
|
|
+ Fill the informations as follows:
|
|
|
|
#figure(
|
|
grid(
|
|
columns: 4,
|
|
gutter: 5pt,
|
|
stroke: 1pt + gray,
|
|
align: left + horizon,
|
|
inset: 0.5em,
|
|
[ *`Sensor Id`*\ On the label.], [*`MCU Serial`*\ From the Pi], [*`HW Version`*\ On the label], [*`MCU Model No.`*
|
|
\ 1.00],
|
|
[*`Tenant`*\ Dev2 Lab], [*`Aggregator`*\ `sf-pc48`], [*`MAC address`*\ From the Pi], [*`Chip`*\ Model of the Atmel chip],
|
|
[*`CAN Interface`*\ Likely False], [*`Power Connector`*\ Connectors of the daughter board], [*`Deployement Status`*\ Personal Us],
|
|
),
|
|
caption: "Information for registering a new device and where to find them."
|
|
)
|
|
|
|
+ Click `ADD`
|
|
|
|
Once the device is added to the frontend, you can find the connection string in the IoT Hub #footnote[https://portal.azure.com/#browse/Microsoft.Devices%2FIotHubs]
|
|
|
|
+ Select iothub-eet-dev-001 in the list.
|
|
+ Under `Device Management` #sym.arrow `Devices` select the new device you registered.
|
|
+ In the ` Primary connection string` select the part after `SharedAccessKey=`. Make sure to exclude the first "=" sign after `SharedAccessKey` but include the last "=" at the end of the connection string.
|
|
|
|
= Flashing Firmware
|
|
|
|
= IoT Hub Setup
|
|
|
|
= Verification
|
|
|
|
|