cancel
Showing results for 
Search instead for 
Did you mean: 

stm32g070rb ST-Link troubleshooting

AFE123x
Associate II

I'm back, and working with the stm32g070rb chip. I did prototyping on a nucleo board based on the same chip (split the st link and nucleo board), and wired the ST Link to the microcontroller with the following connections

AFE123x_0-1778087139725.png

I used open-ocd for flashing code to the nucleo, and it worked flawlessly. Based on the wiring, I made the assumption that this'd translate directly when developing the PCB.

 

(picture of the PCB and the schematic)

AFE123x_1-1778087269730.png

AFE123x_2-1778087339438.png

When I tried to make the same connections, and tried to flash, I'd get the following issue

 

```bash

Info : auto-selecting first available session transport "hla_swd". To override use 'transport select <transport>'.
Info : The selected transport took over low-level target control. The results might differ compared to plain JTAG/SWD
Info : clock speed 2000 kHz
Info : STLINK V2J31M21 (API v2) VID:PID 0483:374B
Info : Target voltage: 0.018873
Error: target voltage may be too low for reliable debugging
Error: init mode failed (unable to connect to the target) # I got this same error with the nucleo, but it worked
in procedure 'program'
** OpenOCD init failed **
shutdown command invoked

make: *** [flash] Error 1

```

In the case above, it recognizes the device, but doesn't flash.

 

I'm unsure about how to start diagnosing. Is there anything in the schematic that's missing? I understand this is a lot to ask, but I'd appreciate any insight!

 

Cheers!

1 REPLY 1
Andrew Neil
Super User

@AFE123x wrote:

Info : STLINK V2J31M21 (API v2) VID:PID 0483:374B
Info : Target voltage: 0.018873
Error: target voltage may be too low for reliable debugging


There's your problem!

You need a Vtarget connection to the ST-Link

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.