Skip to main content
Visitor
Question

STM32G030 need pre-charging to bring up

I'm using the STM32G030 and made a batch of boards. I found a weird problem: about 100 boards don't start up the first time you power them on. You have to quickly turn them off and on again. It seems like the first power-on just pre-charges the CPU. I eventually found that swapping in a new chip can fix the issue, but there are too many boards. Is there any way to fix this through configuration?

10 replies

Ozone
Principal

This is almost certainly a problem of your board.

> I'm using the STM32G030 and made a batch of boards. I found a weird problem: about 100 boards don't start up the first time you power them on.
Have you checked the supply line(s) on a board that seems to fail ?

Have you left the MCU mode pins floating ?
Or alternatively, checked that the mode pins are on stable levels, consistent with a start from user Flash ?

Visitor

The nBOOT0 pin is grounded through a resistor, and nBOOT_SEL=0, nBOOT1=0, nBOOT0=0

Ozone
Principal

Assuming the power supply (VDD) is ok, an external clock could cause such trouble.
With inevitable variations and tolerances of components,  a borderline-stable design would work with some boards & MCUs, but not with others.

If you use an external clock and have debug access, check if the failing board hang waiting for the system clock to stabilize.

mƎALLEm
ST Technical Moderator

Hello ​@zhuchaohuagd and welcome to the ST community,

I eventually found that swapping in a new chip can fix the issue,

It could be a soldering joint issue. So when you’ve replaced the MCU, it was fixed..

To give better visibility on the answered topics, please click "Best answer" on the reply which solved your issue or answered your question.
Visitor

There's definitely a possibility. If the chip has been unsealed without soldering, soldering it later could cause all sorts of weird problems.

mƎALLEm
ST Technical Moderator

For non working boards, take one and try to unsolder and solder again the same chip to confirm if it is the case.

To give better visibility on the answered topics, please click "Best answer" on the reply which solved your issue or answered your question.
Andrew Neil
Super User

Welcome to the forum

Please see How to write your question to maximize your chances to find a solution for best results.

 

Is this a new board design, or have you had previous batches which worked OK?

 

Have you used a debugger to see what is actually happening within the STM32 when the board “doesn’t start” ?

See here & here for how to attach the debugger to a running (or “stuck”/”hung”) target.

 

As ​@Ozone said, this is most likely an issue with your board - that’s why it’s important that you show your schematic.

The layout would also help, and some good, clear photos.

 

Does your board have other things on it; eg, radios can draw large currents at start-up … ?

 

Did you pay attention to Application Note AN5096, Getting started with STM32G0 MCUs hardware development - particularly with regard to power supplies & reset?

 

There’s nothing to “charge up” in the STM32, so It sounds like there’s an issues in your reset circuit and/or your power supplies - these things certainly can have “charge up” issues.

Use an oscilloscope to see how your reset pin and power lines behave at startup - are they in accordance with the datasheet specifications?

 

Another thing which can show problems at power-up is the external oscillator.

 

Do you have some a simple test code which demonstrates the issue?

 

See also:

 

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.
Visitor

Thanks for telling me so much.  
Only the PCB of this board has been redesigned; the previous production batches with this design were fine.  
I checked with the debugger, and if it fails to start, a hardware exception occurs.

If it runs normally, there’s no exception.  


The reset part of the schematic is simple, but it seems sufficient.  


There’s a buck circuit on the board that provides USB charging.  
I guess now I need to focus on the hardware exception and see if I can find the source.

Andrew Neil
Super User

You didn’t answer:

Does your board have other things on it; eg, radios can draw large currents at start-up … ?

 

Did you pay attention to Application Note AN5096, Getting started with STM32G0 MCUs hardware development - particularly with regard to power supplies & reset?

 

Use an oscilloscope to see how your reset pin and power lines behave at startup - are they in accordance with the datasheet specifications?

 

Do you have some a simple test code which demonstrates the issue?

 

It seems you are using the internal oscillator?

 

Also use the oscilloscope on some old-generation boards - compare & contrast.

 

See here for some resources on debugging Cortex-M Hard Faults

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.