Skip to content

Flashing Firmware to the XM125

The XM125 uses different firmware for different applications. You will need to program the XM125 when using presence detection or distance detection. For users using the Arduino examples for presence detection, you can skip this section. Otherwise, follow the steps to flash the firmware for the distance detection or for those that are re-flashing the presence detection firmware.

Downloading Firmware

Note

Arduino examples 1-5 with the default firmware (i.e. i2c_presence_detector.bin) that is loaded on the SparkFun Pulsed Coherent Radar Sensor - Acconeer XM125 (Qwiic). For Arduino examples 6-9, you will need to load the distance detection firmware (i.e. i2c_distance_detector.bin)

Each application requires a specific firmware to be flashed on the XM125. By default, the presence detection firmware (i.e. i2c_presence_detector.bin) is loaded on the SparkFun Pulsed Coherent Radar Sensor - Acconeer XM125 (Qwiic). For users that are interested in loading other firmware, we recommend heading over Acconeer's developer site to download the latest firmware. At the time of writing, this should be located under Developer Tools & Support > A121 Docs & Software > XM125 / XE125 > Acconeer XM125 A121 (SDK for XM125).

Note

You will need an account to download the firmware. Make sure to register for an account and sign in to download the XM125 firmware.

Flashing Firmware

Open the STM32CubeProgrammer software.

screenshot SFM32CubeProgrammer

Connect a USB between the SparkFun Pulsed Coherent Radar Sensor - Acconeer XM125 (Qwiic) and your computer.

USB Cable Inserted into Pulsed Coherent Radar Sensor

You will need to set the XM125 in bootloader mode.

  • Press and hold the BOOT button.
  • Press the RST button while still holding down the BOOT button.
  • Release the RST button.
  • After a short moment, release the BOOT button.
Press and hold BOOT Button Press Reset Button Keep Holding Down BOOT Button After a Short Moment, Release Boot Button

Note

You will want to wait a short moment before releasing the BOOT button to give the XM125 a moment to recognize that the BOOT button is being held low. Releasing the RST button too fast after the XM125 resets may prevent the module from properly entering bootloader mode.

Select the COM port that the board enumerated to. In this case, it was COM10. The default UART configuration should already be set to the following:

- 115200 baud
- even parity
- 8 data bits
- 1 stop bit
- no flow control

When ready, hit the Connect button.

screenshot STM32CubeProgrammer Connected to board

Click the Download button (the second button on the left navigation bar). Then click on the Browse button to select the firmware that you would like to flash to the board.

screenshot STM32CubeProgrammer Download Tab

Since the firmware for the presence detection is already flashed to the board, we will flash the firmware for the distance detection (i.e. i2c_distance_detector.bin). Head to the folder where you downloaded and unzipped the firmware. In this case, you will need to head to: .. > acconeer_xm125_a121-v1_5_0 > xm125 > out. The version number will change depending on when you downloaded the firmware. Select i2c_distance_detector.bin.

screenshot file selected

Enter the start address 0x8000000 to flash the firmware. Click on the Start Programming button to begin flashing the firmware. Once flashed, you should an output after a few seconds: "File Download Complete" with the progress bar filled to 100%.

screenshot successfully uploaded

Note

Using the STM125CubeProgrammer is only one way to flash firmware to the XM125 using! You can also use the Acconeer Python Exploration Tool as well. For more information, check out the section on Flashing Firmware with the Acconeer Exploration Tool.