cancel
Showing results for 
Search instead for 
Did you mean: 

STM32G030 Will Not Program. Please help!

Ryan Coleman
Associate II

Hello,

My company recently rolled 20 boards with STM32G030's. We have a lot of experience working with the G070 but not the G030 MCU.

We're having a tremendous amount of trouble programming these. The MCU will not connect with either CubeProgrammer or CubeIDE.

We've used both an STLink V2 and STLink V3 Mods. We know the programmers are working because they program our G070 boards without issue.

Here is the console output from CubeIDE. It's the standard no device on target message.

STMicroelectronics ST-LINK GDB server. Version 6.0.0
Copyright (c) 2021, STMicroelectronics. All rights reserved.
 
Starting server with the following options:
        Persistent Mode            : Disabled
        Logging Level              : 1
        Listen Port Number         : 41234
        Status Refresh Delay       : 15s
        Verbose Mode               : Disabled
        SWD Debug                  : Enabled
        InitWhile                  : Enabled
 
Target no device found
 
Error in initializing ST-LINK device.
Reason: No device found on target.

And here is the pop-up message.

Error in final launch sequence:
 
Failed to start GDB server
Failed to start GDB server
Error in initializing ST-LINK device.
Reason: (4) No device found on target.

We've verified that the target is powered and looked at the signal's coming out of the STLink.

SWDIO:

0693W00000KcvvUQAR.jpgSWCLK:0693W00000KcvveQAB.jpg 

RST:

0693W00000KcvvoQAB.jpg 

I'm not exactly sure what these are supposed to look like, so any comment would be appreciated. I know the programmer works with the other boards so I assume they are correct.

Attached is our project file. I don' think there is anything in code or configuration that should be causing this.

I'm also going to attach our schematic and layout. Maybe the issue is somewhere in there?

Thanks in advance for any help! I've been pulling out my hair for two weeks trying to get this figured out and have gotten nowhere. With the community help I'm sure we can get it sorted.

Ryan

18 REPLIES 18

I'm not using the G0's but the conflicting use of the pins would be something to consider vis the programming/debug behaviour

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
KnarfB
Principal III

How do SWDIO and SWCLK behave if you don't connect a ST-LINK? You should be able to detect the internal pull-up / pull-down e.g. with an ammeter.

hth

KnarfB

Andreas Bolsch
Lead II

I've got no trouble connecting to a bare and virgin G030 in TSSOP20 just by VSS, VDD, SWDIO, SWCLK (even no cap on NRST) to an STLink with test socket and jumper wires at 4MHz SWCLK. Did you test one of your chips before mounting? Maybe defective or faked parts???

We had these boards assembled but I have the chip pulled off of one of them. Will check later today or tomorrow AM. We ordered from JLC so I don't think the MCU's are fakes but you never know...

BOOT0 is shared with SWCLK so I’m not sure how I can pull this high. From what I glean, the boot mode is set by option bits in Cube a programmer.

Andreas, we had these assembled so no way to test.

I just pulled one off a board and soldered it to a breakout board. Still the same behavior.

These are supposed to be "virgin" devices, not preprogramed?

If you're sure power supply and wiring to STLink is ok then devices are definitely broken. Could you attach photos of top side of one? Maybe from different viewing angles, so reflection of surface could be evaluated?

So, I find a very interesting clue. After switching to my metal-topped desk (with insulating material on the metal) the boards starting consistently programming and debugging. The moment the boards are about 1/8" away from the metal, they disconnect from the debugger or Cube Programmer and stop working. What could that possibly be? I tried tying grounds together on the board with wire but that doesn't seem to have helped at all.

This doesn't really explain why the chip on the breakout doesn't work. I'll get some photos of that under my microscope camera soon.

These are the pics of my breakout board. I only had a 14 pin board but it is sufficient for the pins I need. 0693W00000KdfxHQAR.jpg0693W00000KdfxCQAR.jpg