cancel
Showing results for 
Search instead for 
Did you mean: 

ST-Link-V2 Debugger: No STM32 target found.

Sebastian42
Associate II

Hi 🙂

Problem: STM32F030R8T6 device not found.

ErrorMsg in CubeProgrammer: "No STM32 target found! If your product embeds Debug Authentication, please perform a discovery using Debug Authentication."
ErrorMsg in CubeIde: "Error in initializing ST-LINK device. Reason: No device found on target."

Setup: I made a breakout-board for an STM32F030R8T6. The board only carries the µC and spreads out the pins to use on a breadboard. I connected all VSS and VDD pins and used 0.1µF capacitors as close as possible to the µC. I connected the ST-Link-V2 as follows:

VSS -> any GND pin

VDD -> any 3V3 pin

NRST -> NRST  (pin 7) (not sure if I need to connect the pin somehow aside from the debugger)

SWDIO -> SWDIO (pin 46) 220Ohm Pullup

SWCLK -> SWCLK (pin 49) 220Ohm Pulldown

I tried BOOT0 pin pulled low or high, both didn't work.

I double and tripple checked my connections. I am using the right pins on both sides and the µC has power.

 

 

-----------------------------------------------------------------
SOLUTION:

If you are NOT using an additional power supply you have to connect VDD and VAPP (pin 1 or 2 and pin 19 on STLinkV2) to the STM32's VDD.

VDD on STLinkV2 supplies power and VAPP senses target voltage. If the programmer can't sense a voltage you cannot connect.
So here is the correct configuration:

VSS -> any GND pin

VDD -> any 3V3 pin (to supply target with power)

VAPP -> any 3V3 pin (to sense target voltage)

SWDIO -> SWDIO (pin 46) no Pullup or Pulldown, leave pin floating

SWCLK -> SWCLK (pin 49) no Pullup or Pulldown, leave pin floating

I tried BOOT0 pin pulled low to use internal storage.

Depending on you application:

NRST -> NRST tied low through 100nF capacitor

1 ACCEPTED SOLUTION

Accepted Solutions
Sebastian42
Associate II

You're right, I didn't catch that. I was looking at "Board: --".

I finally got it to work. I had my red wire connected to VDD (pin 19 on STLinkV2). I put it on VAPP (pin 1 on STLinkV2) and it worked. But I still have to supply 3V3. But I can just use another wire and go from STLink VDD to STM32 VDD. This way I dont have to use my lab-psu.

Thank you for your help!

View solution in original post

11 REPLIES 11
AScha.3
Chief II

Hi,

- leave away 220Ohm Pullup/+down !

- BOOT0 pin  low !

- NRST  no connect , just 100nF to gnd.

+

Connect with CubeProgrammer , reset mode: software reset .

+ tell...

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

Indicating the part is non-viable.

 

Shouldn't need pull-up/down of SWDIO/SWCLK values chosen are quite aggressive. Could be 10x weaker, ie 2K2 or 4K7

Check the static voltage on NRST, should be HIGH by default.

Connect NRST to debug header if you expect external tools to "Connect Under Reset"

Check part orientation, that the pin 1 designation is that, and not injection mold artifact.

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

I removed the Pulldown/Pullup resistors. The pins are floating now.

BOOT0 pin is tied to LOW.

NRST connected to GND via 100nF Capacitor. NRST is high by default, checked with multimeter.

 

I tried to connect with CubeProgrammer on these settings:

Port: SWD

Freq.: 4000

Mode: Under reset

Access Port: 0

Reset mode: Software reset

Speed: Reliable

Shared: Disabled

Debug in low power mode: true

 

Part orientation is correct. Pin one is in the bottom left.

 

This is the second µC I can't connect to. I soldered them myself. I don't have solder-bridges, I checked before applying power. How easily do they get damaged by soldering? Was my first time soldering this small but I think I did quite well.

I still get the same error msg as previously.

image.jpeg

Ok, it should work...

try setting : Reset mode: Software reset , Mode: normal ;

+ show pic, what CubeProgrammer shows. 

+ What kind of debug probe you use ? (Original STM? Maybe you have to connect VDD to the debug probe .)

+ If still not working, maybe distance to caps is a bit to much, 

can you solder the 100nF cer-caps (SMD) direct on the pin header ? (0805 fits between 0,1" pads)

->

AScha3_0-1714628454927.png

 

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

stm32_programmer.png

 I am using STLinkV2 i got from mouser. So no clone, I got an original.

STLinkV2.jpeg

 Maybe you're right and the capacitors are too far away but I am not the first one to make such a board. Others got it to work: https://youtu.be/ZH7zPy7Jb9M?si=0KXpfGCFPjmd85PN

I don't have any SMD parts. I would need to buy some. And then at this point I would rather design a new board with the capacitors already mounted.

----------------------------------------------------------------------------
EDIT: While tinkering I accidentally flipped the green and blue wires. This image and the later one where I show the breadboard don't match.

So : Original STM? You have to connect VDD to the debug probe . + supply 3v3 to target !

(now 0,22V - no power at target cpu !)

+ show pic, what CubeProgrammer shows. 

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

I have an original STM32, I got from mouser as well.

What do you mean with "You have to connect VDD to the debug probe . + supply 3v3 to target !"

The red wire you see in the image is +3V3 and it's connected to the µC. The µC has 3V2, I checked with my multimeter.

 

"+ show pic, what CubeProgrammer shows."
If you want to know the target information, I don't get any info. µC is connected but when I click connect it looks like the image above.

>What do you mean with "You have to connect VDD to the debug probe . + supply 3v3 to target !"

There is no power ! st-link tells : 0,0 V at target.

YOU have to add VDD 3,3V /gnd to the target cpu !  st-link not giving power, it only checks voltage on VDD.

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

Ok, I have now supplied +3V3 to the board with my benchtop psu. Unfortunately CubeProgrammer still shows "now power".

3V3.jpeg

cubeProgrammer.png