Skip to main content
Associate
September 6, 2025
Solved

Clone & Nucleo st-link not connecting; always shows error with proper wiring

  • September 6, 2025
  • 3 replies
  • 765 views

Hi,

I have a custom developed stm32 project with stm32f411ret6 mcu, i have done my full board and got the pcb printed. I have a 4 pin header on my pcb with vcc,gnd, swdio, swclk for uploading the bootloader for the first time. I have done this several time earlier successfully with stlink/v2 programmer, but now it shows the error(image 3 at bottom): 

ashvinelo_0-1757200849682.png

Next I bought a stm32f446 nucleo board and tried with the onboard stlink by removing both the jumpers to program this mcu on the custom pcb, still stlink does not connect.  On my pcb header 3.3v power is also coming successfully I have checked it too.    Also, my boot pin and nrst is connected on custom pcb like this:  

ashvinelo_1-1757200991465.png

under both stlink connection methods i am getting this error, trying to solve these for many days and getting the same connection issue as follows, please help me, 

ashvinelo_2-1757201061819.png

 

Best answer by ashvinelo

Thank you, both stlink and the one from nucleo board works well, there was a problem with my hardware diodes polarity on swdio and swclk pins, very sorry

3 replies

TDK
Super User
September 7, 2025

Verify VCAP voltage is around 1.2 V.

Ensure ALL VDD/VDDA pins are connected to 3.3V.

Ensure ALL VSS/VSSA pins are connected directly to ground.

Recheck SWD pin wiring.

"If you feel a post has answered your question, please click ""Accept as Solution""."
Andrew Neil
Super User
September 9, 2025

How to solve connection errors when connecting and programming the STM32 target board.

How to solve debugger connection issues

 

Note that this is not a genuine ST-Link - it is a clone:

https://community.st.com/t5/stm32-mcus/how-to-recognize-a-genuine-st-link-v2-versus-a-cloned-one/tac-p/703663/highlight/true#M965

Note that the wiring of these can vary - so are you sure that your wiring exactly matches the actual clone that you have?

 


@ashvinelo wrote:

I have a 4 pin header on my pcb with vcc,gnd, swdio, swclk for uploading


Have you tried adding a Reset connection?

Connecting under hardware reset can get you out of some of these "cannot connect" situations...

 


@ashvinelo wrote:

I have done this several time earlier successfully


So what code did you program?

Does your code reconfigure the SWD pins, or put the CPU to sleep, etc ?

A complex system that works is invariably found to have evolved from a simple system that worked.A complex system designed from scratch never works and cannot be patched up to make it work.
ashvineloAuthorBest answer
Associate
September 23, 2025

Thank you, both stlink and the one from nucleo board works well, there was a problem with my hardware diodes polarity on swdio and swclk pins, very sorry