Skip to main content
Graduate
January 13, 2025
Solved

How do I fix "No STM32 target found"?

  • January 13, 2025
  • 5 replies
  • 4334 views

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.

    This topic has been closed for replies.
    Best answer by Tesla DeLorean

    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.

    5 replies

    Super User
    January 13, 2025

    @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!

    Technical Moderator
    January 13, 2025

    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

     

    HaYa6174Author
    Graduate
    January 13, 2025

    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.

    Super User
    January 13, 2025

    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 ...

    HaYa6174Author
    Graduate
    January 13, 2025

    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)

    Super User
    January 13, 2025

    @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?
    HaYa6174Author
    Graduate
    January 13, 2025

    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.

    Graduate II
    January 13, 2025

    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.

    HaYa6174Author
    Graduate
    January 13, 2025

    YES, you were absolutely right, I mirrored it, just like @Mike_ST showed me on the picture, and it worked!!!!

    I was such a noob.

     

    Thanks a lot, guys!!!