1
votes

I have ST-LINK dongle. When I try to connect in CubeIDE with Debug icon I have an error

Error in initializing the ST-LINK device. Reason: No device found on the target.

It happens all the time. When I use ST-LINK utility I have the same problem, but when I push down RESET switch on board I have a connection. Pins PA13 and PA14 are not used for another purpose. The setting in ST-LINK like Core Reset or Software reset does not work. I only have a connection when I push down Reset switch and then try to connect only in ST-Link Utility.

Where do I make mistake and what is "connect Under Reset"?

2

2 Answers

1
votes

Connect under reset means that when the debug probe connects to the target the reset line is kept active, so no user code can be executed.

I would advise to keep this always on unless you connect to the running target.

0
votes

One thing could be that the software that is flashed onto your STM32 disables those pins and as such you can't connect debug/program it when it has booted.

Keeping the STM under reset while trying to connect and then releasing the reset bypasses this bootup and lets the ST-LINK interface control the STM.