2020-06-18 01:25 PM
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?
2020-06-19 11:50 PM
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.