cancel
Showing results for 
Search instead for 
Did you mean: 

Why can't I connect the ST-Link/V2 to my target board when the target is self-powered? (using the SWD)

MCons.2
Associate

If my board is not powered and the power is provided by the ST-Link, then I can program/erase all the time without issue. However for debugging it is not useful. As soon as I connect the power to the target I loose the connection.

Few things

SWDCLK and SWDIO are not used in the application

VCC is connected to ST-Link pin PIN 1 and Pin 19 thru a 10R

SWDIO is connected to ST-Link Pin 7

SWDCLK is connected to ST-Link Pin 9

GND is connected to ST-Link Pin 20

BOOT0 is pull down to GND

I did not used the ST-Link Utility, I used the STMCubeProgrammer or the STM32CubeIde.

Any clue why it does not connect to my STM32?

1 REPLY 1
Piranha
Chief II

SWDCLK and SWDIO are not used but are their configuration left intact? Using low-power modes including the the SLEEP mode has some requirements for debugging - look at DBGMCU_CR. Anyway you should connect NRST and, if required, set Connect Under Reset.