I have a STM32F4 Discovery board and a ST-Link/V2 programmer. I want to use my own ST-Link (not the embedded one) for programming and debugging the board.
I faced to a problem that i still haven't been able to solve that. I use ST-LINK Utility software and every thing works correctly if i choose 5 kHz for the Connection settings frequency. Otherwise ST-LINK Utility pops up a
Can not connect to target!
error and it offers me to choose lower frequency. Is the 5 kHz the only frequency that it can works for STM32F407 discovery board and ST-LINK V2 connection?
How can I use others and the error will not be happened again?
Best Answer
I managed to solve that problem. If anybody encounters similar problem, here's what I've done:
According to the ST-LINK V2 User manual , the needed but not enough connections between ST-LINK V2 and MCU is as below:
SWDIO -> PA13
SWDCLK-> PA14
GND -> GND
VAPP(target VCC) -> MCU VDD
User manual also recommends to connect all the GND pins on the ST-LINK V2 to the ground and the problem is actaully here. User manual must emphasize that you must connect all the ST-Link GND pins to the ground for properly connection. And then all the connection frequencies will be available and also target will be detected and could be connected.