cancel
Showing results for 
Search instead for 
Did you mean: 

ST Link V2 and V3 VS STM32G0B

grisom13
Associate III

Hello,

I have a STM32G0B1KBU3N MCU for my USB-C PD board. I am a new with this so learning. I am currently finished assemble my own PCB and have some issue with programming the controller. I can program controller with ST link V3-minie but have Zero luck to go connect with ST LInk v2. Is my controller supports only V3 hardware? I saw in the Programmer menu with V2 hardware there is only 4 kHz frequency and V3 hardware offers 8 kHz (same as controller internal clock) am I right? Thank you.

 

11 REPLIES 11
Karl Yamashita
Principal

Show a schematic of your STM32 connections.  

If a reply has proven helpful, click on Accept as Solution so that it'll show at top of the post.
CAN Jammer an open source CAN bus hacking tool

Screenshot 2025-09-25 at 21.36.46.png

Screenshot 2025-09-25 at 21.37.06.png

  

mfgkw
Senior

1. In your schematic I see no RST connection to the ST-Link 

2. Is the Jumper JP9 for 3.3V to ST-Link closed?

3. What do you mean with "St Link v2"? Is it a genuine ST-Link from ST or some fake "ST-Link v2 mini"?

Hello,

1 - Yes, there is no RST on a schematic (didn't know its required). But the wire is added to RST pin on STM32. And here hence is a question: STM Programmer offers "Hardware reset". Is this with a manual Reset switch? Or I am missing something?

Screenshot 2025-09-26 at 09.58.47.png

 

2 - Yes I put the jumper to my diagram because I didn't know if ST link supply power. When I found out its not the JP9 jumper was closed and I can see 3.3V in "Target voltage section" 

 

3 - All product come from Mouser. So yes genuine. The V2 white plastic Programmer hardware can't connect to my STM32 chip. The V3-minie that is a bare PCB - I can connect to my SMT32 controller and upload firmware. Any ideas why V2 cant do the job? Thank you 

Screenshot 2025-09-26 at 10.04.51.png

So how did you connect the ST-Link V2 20-pin to your 4-pin header? You must have some sort of custom harness/adapter. Double check to be sure SWDIO and SWCLK are not swapped.

If a reply has proven helpful, click on Accept as Solution so that it'll show at top of the post.
CAN Jammer an open source CAN bus hacking tool

Karl,

Have 10+ years experience with wiring harnesses. So 5 wires is not a problem. Like I said V3 is working (despite it uses 14 pin Samtec connector) . V2 is not. Is there any setup I need to do for V2 that is different from V3? for the STM32G0B1KBU3N ?  The connection of wires is right as long as the pinout layout in datasheet is correct Versus connector KEY lock.

 

Screenshot 2025-09-26 at 13.03.58.png

Did you try "Software Reset"?

 

Ok, so what pins are you using on the 20-pin?

You only need 4 connections from the ST-Link v2, GND, VCC, SWDIO and SWCLK. The NRST isn't required, unless you need the software to have the ST-Link hold the device in reset after programming.

If you are now reading ~3.3V from the console now that JP9 is closed, that leaves the 2 SWxxx pins. So either they are not connected to the 20-pin correctly or the ST-Link V2 is bad. I'm leaning towards the former.

If a reply has proven helpful, click on Accept as Solution so that it'll show at top of the post.
CAN Jammer an open source CAN bus hacking tool

Hi Karl, 

In fact I have connected about 11 ground wires. I saw it says "at least one GND, but because I couldn't connect I put them all. The only guide to read pinout properly is a cutout on a ST link body where 20 pin connector goes. Like the picture above.