2025-02-24 11:16 AM
Hi everyone,
I'm having trouble writing my program to my microcontroller, and I'm hoping someone can help.
When I tried to write my program in STM32CUBEIDE, I received the following message:
STMicroelectronics ST-LINK GDB server. Version 7.8.0
Copyright (c) 2024, STMicroelectronics. All rights reserved.
Starting server with the following options:
Persistent Mode : Disabled
LogFile Name : C:\Users\markt\STM32CubeIDE\workspace_1.16.1\PCB_Test\Debug\st-link_gdbserver_log.txt
Logging Level : 31
Listen Port Number : 61234
Status Refresh Delay : 15s
Verbose Mode : Enabled
SWD Debug : Enabled
InitWhile : Enabled
COM frequency = 4000 kHz
Target connection mode: Under reset
Target connection failed
COM frequency = 1800 kHz
Target connection mode: Under reset
Target connection failed
COM frequency = 950 kHz
Target connection mode: Under reset
Target connection failed
COM frequency = 480 kHz
Target connection mode: Under reset
Target connection failed
COM frequency = 240 kHz
Target connection mode: Under reset
Target connection failed
COM frequency = 125 kHz
Target connection mode: Under reset
Target connection failed
COM frequency = 100 kHz
Target connection mode: Under reset
Target connection failed
COM frequency = 50 kHz
Target connection mode: Under reset
Target connection failed
COM frequency = 25 kHz
Target connection mode: Under reset
Target connection failed
COM frequency = 5 kHz
Target connection mode: Under reset
Target connection failed
Target no device found
Error in initializing ST-LINK device.
Reason: No device found on target.
Additionally, when I tried connecting using STM32CUBEProgrammer, I received this message:
19:58:54 : UR connection mode is defined with the HWrst reset mode
19:58:54 : ST-LINK SN : B55B5A1A000000006053F001
19:58:54 : ST-LINK FW : V2J45S7
19:58:54 : Board : --
19:58:54 : Voltage : 3.30V
19:58:54 : Error: Unable to get core ID
19:58:54 : Error: No STM32 target found! If your product embeds Debug Authentication, please perform a discovery using Debug Authentication
I'm using an ST-Link V2 connected to a custom board via SWD. This is my first custom STM32 design, and here is the schematic:
I have no idea where the issue might be. Any help would be greatly appreciated!
Thank you in advance for your assistance!
2025-02-24 11:34 AM - edited 2025-02-24 11:35 AM
Schematic looks okay.
If you're using a knock-off programmer, note that it might just not work, especially with STM32CubeIDE. Use STM32CubeProgrammer until you can "connect" successfully--it is typically more robust.
2025-02-24 11:59 AM - edited 2025-02-24 12:01 PM
Hi,
...and if your st-link is a stick (= clone), set connect : software reset (the "stick" has no reset output!)
And try with CubeProgrammer first (more tolerant with clones...).
2025-02-24 12:40 PM
This is the st-link that I am using and how it is wired:
I'm unable to find the setting you mentioned.
Could you please provide more details?
2025-02-24 01:00 PM
in Cubeprogrammer:
reset mode -> software
+
in IDE -> debug configuration -> same...