Assembling the Radar Sensor
This page will be dedicated to instructions of how to assemble the radar sensor.
Firmware
To load the firmware onto the radar module please follow the following instructions.
The below image is of the back of the radar PCB. Looking from the back of the PCB, there are three sets of 6 pin connections. As labelled in the diagram red, green, and blue. The red connection is used to program and talk to the ATmega it is to be connected to by a bosl programmer probe. The green connection is a duplicate of the red connection however the pin pitch is greater. This is where the sensor cable is soldered. The blue connections is for programming the XM132. It is a serial wire debug interface designed to be connected to by a bosl programmer probe.
To begin to upload the firmware connect the red connection to a 3.3V serial port, connect the blue connection to a SWD debugger, such as the segger J-link. 1. To program the XM132, a special firmware for the ATmega need to first be programmed which allows this. This can be done via uploading the following sketch from the Arduino IDE: File:Radar Velocity STM resetremap.zip. For all uploading the to the ATmega please use the ATmega328PB board supplied in the BoSL Boards pack of the arduino board manager, (available here: https://monash-bosl.github.io/BoSL-IDE-Core/)
2. The radar firmware can then be uploaded onto the XM132 using the SWD debug probe. The target MCU is the STM32G071CB. The latest release can be found here https://github.com/Monash-BoSL/xm132-radar-firmware/releases/tag/v1.4.0 (use the .hex file)
3. The radar firmware can now be flashed onto the ATmega using similar settings to step 1. The radar firmware is available here: File:Radar velocity firmware 1.4.0.zip
4. The radar firmware also contains a python script to test that the firmware has been successfully flashed. Open this script to determine if the process was successful. You may need to edit the file to change the COM port which it is using.
After this is done the firmware should be successfully flashed.
Tips and Tricks
To make a batch of uploading go quicker, the final command in the Arduino IDE terminal can be copied to a command prompt for significantly faster uploading. The file used for uploading however will only be present while the Arduino IDE is open.