cancel
Showing results for 
Search instead for 
Did you mean: 

How do I fix "No STM32 target found"?

HaYa6174
Visitor

I encountered this error when I was trying to flash my custom board with fresh stm32F070C6T6. I used st link v2 for debugging. I updated the firmware of st link v2 right before debugging.

Screenshot 2025-01-13 at 19.03.11.png

 

NRST floating, BOOT0 connected to 3V3 -> failed (in any mode)

NRST floating, BOOT0 connected to GND -> failed (in any mode)

NRST connected to GND, BOOT0 connected to 3V3 -> failed (in any mode)

NRST connected to GND, BOOT0 connected to GND -> failed (in any mode)

 

I also tried both on Windows and Mac(m3), and was not successful.

I also tried Cube IDE, Cube Programmer, and st link utility, but all did not work.

I also tried to use DFU, but it also failed. (no dfu detected)

 

I measured the voltage to be 3.16V and ensured the wiring was ok.

 

Now, I have no idea what I should do to fix this issue. Can anyone point out where it went wrong?
Thanks.

1 ACCEPTED SOLUTION

Accepted Solutions

Show current wiring, your picture before looked to mirror required connectivity.

The diagram is for the pin header. The face of the connect is reversed/mirrored. Pin one on the cable is Red at both ends.

The ST-LINK needs pin 1 to be the VTarget and this is used and measured when communicating with the part. Need to see it correctly reported in Cube Programmer. 

The part also needs to be electrically viable. Check part orientation. If it's not viable no methods will work.

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

27 REPLIES 27

@HaYa6174 wrote:

I encountered this error when I was trying to flash my custom board with fresh stm32F070C6T6.


As it is a custom board, remember that nobody here knows anything about it - so you need to show your schematic:

https://community.st.com/t5/community-guidelines/how-to-write-your-question-to-maximize-your-chances-to-find-a/ta-p/575228

Also show how you are connecting the ST-Link.

Is it a brand new board and/or a brand new design?

Has your ST-Link ever been able to connect to it?

Are you using a genuine ST-Link?

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

 


@HaYa6174 wrote:

I measured the voltage to be 3.16V and ensured the wiring was ok.


But your ST-Link measures 0V - so something there isn't correct:

AndrewNeil_0-1736766012712.png

Hence importance to show schematics!

SofLit
ST Employee

Hello @HaYa6174 and welcome to the community,

As its a custom board is it could be something in your hardware.

Start to share your schematics to let others help you efficiently.

+ Your target voltage is at 0.52V:

SofLit_0-1736766250910.png

 

To give better visibility on the answered topics, please click on "Accept as Solution" on the reply which solved your issue or answered your question.
PS: Be polite in your reply. Otherwise, it will be reported as inappropriate and you will be permanently blacklisted from my help/support.
HaYa6174
Visitor

Screenshot 2025-01-13 at 20.08.31.png

Screenshot 2025-01-13 at 20.08.22.png

  
These are my schematics.
I am creating a custom keyboard. Almost all pins are connected to switches.

 

I noticed that I made a mistake in the switch which was supposed to switch the state of the boot0 pin, so I'm manually connecting the boot0 pin.

According to that schematic, your programming header's pin 4 connects direct to your +3V3 supply.

So how & where, exactly, did you measure 3.16V ?

 

Note that it's always good to include NRST on your programming/debug header - as that can get a connection when the SWD pins are disabled ...

HaYa6174
Visitor

I measured it between the gnd and 3v3 in the pin header. 

I will make sure that the NRST pin is included in the next design!

 

Edit: when I measured the voltage of the regulator, it was like 2.8V for 3v3, and 1.8V for 5V… 

I assume the regulator is working fine, since when I measured the voltage when the usb type C is plugged in, those voltages were just fine. (about 3.2V and 5.1V)


@HaYa6174 wrote:

I measured it between the gnd and 3v3 in the pin header. 


The J14 header?

Well, your ST-Link is not seeing it - so there's certainly something wrong between that header and your ST-Link.

You haven't answered the other questions:

  1. show how you are connecting the ST-Link.
  2. Is it a brand new board and/or a brand new design?
  3. Has your ST-Link ever been able to connect to it?
  4. Are you using a genuine ST-Link?

sorry for the late reply!

1. 

IMG_2588.jpeg


 I’m connecting pin1 to header 3v3, pin7 to SW_DIO, pin9 to SW_CLK, pin18 to GND. 
 As for the board, I just connected the header pin strait to the MCU pins.

 

2. Yes, this a brand new design.
3. No, this is the first time doing it.

4. I bought this on Digi-Key. https://www.digikey.jp/ja/products/detail/stmicroelectronics/ST-LINK-V2/2214535
I think this is a genuine one.

 


@HaYa6174 wrote:

 

AndrewNeil_0-1736769949982.png

That's not ST's documentation (it looks like the diagram comes from Segger's J-Link manual)!

Always best to refer to the manufacturer's own documentation:

https://www.st.com/en/development-tools/st-link-v2.html#documentation

https://www.st.com/resource/en/user_manual/um1075-stlinkv2-incircuit-debuggerprogrammer-for-stm8-and-stm32-stmicroelectronics.pdf#page=12

I later confirmed that the pinout is ok using the document from st, so I think my wiring is not causing an issue.