2025-03-12 1:10 AM - last edited on 2025-03-12 6:08 AM by Andrew Neil
I'm currently experimenting with an XM125 radar board . As seen on page 15 of the module's datasheet, this board essentially contains an STM32L4 MCU with the necessary external components and the radar sensor. All pins of the MCU are exposed through the board. So, essentially, I'm connecting directly to the STM32L4.
I'm struggling with flashing something to the controller. I know this has been asked (and solved) a thousand times, but I simply cannot find the problem here.
When attempting to flash a default project by the manufacturer using an ST-Link V2 (genuine, not clone), I get the following output in STM32CubeIDE 1.17.0:
STMicroelectronics ST-LINK GDB server. Version 7.9.0
Copyright (c) 2024, STMicroelectronics. All rights reserved.
Starting server with the following options:
Persistent Mode : Disabled
Logging Level : 1
Listen Port Number : 61234
Status Refresh Delay : 15s
Verbose Mode : Disabled
SWD Debug : Enabled
InitWhile : Enabled
Target no device found
Error in initializing ST-LINK device.
Reason: No device found on target.
STM32CubeProgrammer (2.19.0) gives a very similar output:
12:52:16:265 : UR connection mode is defined with the HWrst reset mode
12:52:16:390 : ST-LINK SN : 37FF6F063143433923131843
12:52:16:391 : ST-LINK FW : V2J45S7
12:52:16:391 : Board : --
12:52:16:391 : Voltage : 3,23V
12:52:16:392 : Error: Unable to get core ID
12:52:16:392 : Error: No STM32 target found! If your product embeds Debug Authentication, please perform a discovery using Debug Authentication
12:52:16:404 : Disconnected
I've also tried pulling BOOT high during startup and changing the reset modes between Software, Hardware and Core, but the result was the same.
I'm using a serial-to-usb interface stick to generate the source voltage of 3.3V. I'm additionally using a voltage divider to get the 3.3V down to 1.8V, since this voltage is required by the radar sensor. The following schematic outlines my setup:
In the attachments, you find an image of my setup, and my test project.
2025-03-12 9:02 AM
@blank_supportgis wrote:The wiring is as shown in my schematic.
The problem mentioned earlier was with mis-interpreting the numbering of the ST-Link - so a correct schematic didn't help that.
A good, clear photo of your setup could help.
Stolen from @Jesus Perez here: https://community.st.com/t5/stm32-mcus-products/stm32f070-wont-connect-to-st-link/td-p/357857
Here's one I prepared earlier:
2025-03-12 10:31 AM
If RDP2 is set, chip won't be accessible.
Are you sure you can upload firmware like this? Is this procedure (flashing over SWD using STM32CubeProgrammer) supported by documentation of the product?
2025-03-12 10:55 AM - edited 2025-03-12 10:57 AM
@TDK wrote:If RDP2 is set, chip won't be accessible.
Also if they do any reconfiguring of the SWD pins; eg, for low power (although connecting under HW reset should get around that)
@blank_supportgis - the point being that there is a number of things that a 3rd-party can do to hinder SWD access - so it is more that just an STM32 question.