2022-03-16 06:23 PM
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:
SWCLK:
RST:
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
2022-03-19 02:49 PM
I'm not using the G0's but the conflicting use of the pins would be something to consider vis the programming/debug behaviour
2022-03-20 03:23 AM
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
2022-03-20 07:05 AM
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???
2022-03-20 11:02 AM
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...
2022-03-21 01:25 PM
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.
2022-03-21 01:30 PM
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.
2022-03-22 12:43 AM
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?
2022-03-22 07:42 PM
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.
2022-03-22 08:25 PM
These are the pics of my breakout board. I only had a 14 pin board but it is sufficient for the pins I need.