cancel
Showing results for 
Search instead for 
Did you mean: 

Problems with ST-LINK/V2

JS8
Senior

Hi,

I recently bought a ST-LINK/V2 dongle and it didn't work. I checked the insides of it to see that the microcontroller inside wasn't an ST one, but a Geehy clone microcontroller. I bought another, which was not a dongle, it was the larger white version. I made sure it was authentic. This gave me the same problems as the first one. I am trying to program an STM32F030F4P6 microcontroller for my custom board using SWD with 4 pins: CLK, DIO, 3V3 and GND. They are connected using screw terminals, which I have connected to the ST-LINK/V2 via jumper wires to pins 9, 7, 19, 20. Same order as above. I have not been able to program it once. I have verified with a multimeter that the jumper wires are connected to the corresponding pins on the MCU. I have made sure that VDD and VDDA are connected. Boot0 is low, NRST is high. I have attempted to program it using different IDE's, which include STM32CubeIDE and Keil microVision 5.

When I connect the ST-LINK to my Windows 11 PC and open STM32 ST-LINK utility and try to connect, it gives me and error, which says: "Can not connect to target! If you're trying to connect to an STM32W1xx, please" and so forth. When I go to settings, it recognizes the firmware version and serial number of the ST-LINK.

When I try to download my code onto the MCU, it tells me "Target no device found, Error in initializing ST-LINK device. Reason: No device found on target." The first time I tried to program it, STM32CubeIde suggested a firmware update to the ST-LINK/V2, which was successful.

The ST-LINK/V2 has a constant red light on. I believe this means, that it is connected, but not exchanging information?

This is the first time I am programming an STM32 microcontroller, and would greatly appreciate your help. I will provide additional information if requested.

Best regards,

Juhani

1 ACCEPTED SOLUTION

Accepted Solutions

>>Are you saying need to apply a voltage to pin 1 or 2?

I believe that's what I said to do..

The Authentic ST-LINK/V2 needs power applied here to set the correct voltages for SWDIO / SWCLK.

STM32 Cube Programmer Should be able to tell you what the voltage it sees looks like.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..

View solution in original post

7 REPLIES 7
AScha.3
Chief II

try with stm32CubeProgrammer.

set: connect reset mode -> software reset

if target voltage << 3V , give target some supply , 3v3

try first with the "clone" - it should work also.

If you feel a post has answered your question, please click "Accept as Solution".

Pin 19 is NOT correct, might be 5V in some implementations. On those it can power your 5V side regulator, absent other power, but the 3.3V needs to come back on Pin 1 or 2 to power drivers within the ST-LINK at the correct levels.

https://stm32-base.org/guides/connecting-your-debugger.html

Pin 1 should be your board's 3.3V supply

If it can't find the target it means that the STM32 is not running/functional or that the connection is wired wrong.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..

Hi, tried changing the reset behaviour to software system reset. Unfortunately didn't help.

Hi, measured the voltage at pin 19, it was about 3.2 volts. Measured the voltage at pin 1, was about 10 millivolts. Are you saying need to apply a voltage to pin 1 or 2?

VDD of your chip needs to be connected to pin 1 or 2 on the header. You can use pin 19 to power your board, but it is not needed if your chip is powered externally.

If you feel a post has answered your question, please click "Accept as Solution".

>>Are you saying need to apply a voltage to pin 1 or 2?

I believe that's what I said to do..

The Authentic ST-LINK/V2 needs power applied here to set the correct voltages for SWDIO / SWCLK.

STM32 Cube Programmer Should be able to tell you what the voltage it sees looks like.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..

Thank you! I connected pin 19 to pin 1 and now it works like a charm!