2025-01-13 02:48 AM
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.
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.
Solved! Go to Solution.
2025-01-13 07:04 AM
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.
2025-01-13 03:00 AM
@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:
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?
@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:
Hence importance to show schematics!
2025-01-13 03:02 AM - edited 2025-01-13 03:04 AM
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:
2025-01-13 03:11 AM - edited 2025-01-13 03:24 AM
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.
2025-01-13 03:23 AM
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 ...
2025-01-13 03:29 AM - edited 2025-01-13 03:40 AM
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)
2025-01-13 03:41 AM - edited 2025-01-13 03:41 AM
@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:
2025-01-13 03:54 AM
sorry for the late reply!
1.
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.
2025-01-13 04:10 AM
@HaYa6174 wrote:
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
2025-01-13 04:20 AM
I later confirmed that the pinout is ok using the document from st, so I think my wiring is not causing an issue.