2025-05-06 6:18 AM
Hi,
I am working with a custom board with the STM32L431CCU6 mcu. The bord consist of the mcu and 2 i2c units and one SPI.
The board also has pin headers for BOOT0, SWDIO and SWCLK.
Sory for paint...
I am using the CubeIDE and a ST-LINK V2for programming the board and have successfully programed Blink on it. This was not problem free however since my coputer sometimes did not recognised the ST-LINK and sometimes failed to upload. Unfortuanatli I do not remember those errors in details.
After succesfully uploading a program for i2c communication I could not program the board any more. The error i receive from the IDE is:
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.
After a while of plugging the link in and out and trying to press boot and desperatly trying whatever I could, I tried a second board. This was a new board with a new ship but same problem. I tried using the ST-LINK of a NUCLEO board, same problem. Different computer, same problem. Cube programmer, same problem(? different errormessage: Error: Unable to get core ID, Error: No STM32 target found!) I am all out of ideas and no other post seems to solve my problem. Any ideas?
Solved! Go to Solution.
2025-05-06 6:26 AM
First, is it a genuine ST-Link?
Note that breadboards are notoriously prone to unreliable connections - which can certainly mess-up your debugger connection.
Rather than route NRST via a breadboard, let the ST-Link control it and use connect under hardware reset.
@assjo wrote:my coputer sometimes did not recognised the ST-LINK
You mean the ST-Link didn't even appear in Device Manager (or equivalent).
That suggests a USB connection problem between the computer & the ST-Link.
On resolving debugger connection issues:
https://community.st.com/t5/stm32-mcus/how-to-solve-debugger-connection-issues/ta-p/49693
2025-05-06 6:26 AM
First, is it a genuine ST-Link?
Note that breadboards are notoriously prone to unreliable connections - which can certainly mess-up your debugger connection.
Rather than route NRST via a breadboard, let the ST-Link control it and use connect under hardware reset.
@assjo wrote:my coputer sometimes did not recognised the ST-LINK
You mean the ST-Link didn't even appear in Device Manager (or equivalent).
That suggests a USB connection problem between the computer & the ST-Link.
On resolving debugger connection issues:
https://community.st.com/t5/stm32-mcus/how-to-solve-debugger-connection-issues/ta-p/49693
2025-05-06 7:58 AM
Thanks! This was the solution!
Firstly I connected the NRST directly to the ST-LINK, but then a new error occured. Unable to erase memory. Someone recomended changing all the cables incase any was broken or damaged and since then programming has worked without any problem.
(The ST-Link did appere in the device manager but the IDE could not see it or someting like that.)