cancel
Showing results for 
Search instead for 
Did you mean: 

STM32G0B1RCT6 HSE Bypass Mode - Intermittent Startup Issues

flawless
Associate II

Hi everyone,

I'm having an issue with HSE bypass mode on the STM32G0B1RCT6 and hoping someone here has seen something similar.

The HSE randomly won't start in bypass mode. I've tried two different oscillators - the S2D8.000000B20F30T and an OT32258MJBA4SL that I pulled from a working STM32F405RGT6 board where it runs without any problems.

The behavior is inconsistent. Sometimes it starts up normally and then runs solid. Other times it just won't set the HSERDY flag. We've tried both toggling the NRST pin and resetting from code, but neither changes the state - if it's working, it stays working, and if it's not working, it stays not working. Only power cycling the entire board can change the state in either direction, sometimes making a non-working board work or making a working board stop working.

On the scope, the signal from the oscillator is always visually fine.

Any ideas or suggestions for debugging this would be helpful!

39 REPLIES 39
 

image.png
This MCU has single VDD and VSS pins, VSS is just connected to the common ground directly. VBAT is currently floating.
We didn't tried measuring it directly at the pins, but the fact that it reproduces on multiple boards, including resoldered one with MCU from dev board, so we will check it, but we think this is not the issue.

Update: connecting VBAT to VDD make it works stable

waclawek.jan
Super User

> connecting VBAT to VDD make it works stable

Oh.

Maybe another effect of the VBAT brownout erratum? Although I don't see, how would HSE be related to the backup domain.

JW

This actually makes us a bit confused because we didn't find any traces of this issue from other developers. HSE doesn't look like super rare thing to use, maybe many solutions just have VBAT connected to VDD by default, but anyway it's strange.
Btw, we tried to connect VBAT to VSS and it also won't help to make HSE start, to prevent it from floating. Other strange thing is how VDD rise time affects that (with floating VBAT), as we tested it's always start if we just connect it to already running power supply.
Also it doesn't look like this issue is closely related to erratum at least because we found how to stable reproduce both behaviours, when it starts or not, for instance it always depends just on VDD rise time, but erratum describes more constrained scenario that would be hard to reproduce by hand consistently.

waclawek.jan
Super User

Thanks for the detailed info.

I would like to ask you to do one more experiment: in the "failed" state, i.e. when HSE does not work, can you please read out content of RCC_BDCR register and post it.

Thanks,

JW

Yes, sure, here it isimage.pngimage2.png

It actually stays the same when HSE is ok, changing VBAT leads to the same content of BDCR

waclawek.jan
Super User

OK I see, thanks.

JW

 

If you have any other ideas, I can check them. I have oscilloscope and waveform generator in addition to the previously mentioned 3-channel power supply.

waclawek.jan
Super User

At this point, no more ideas, sorry.

JW

Anyway, thank you for your suggestions, we already found many interesting cues with your help. We will play a bit more with what we have so far.


@flawless wrote:

connecting VBAT to VDD make it works stable


AN5096Getting started with STM32G0 Series hardware development does recommend that you should do that:

AndrewNeil_0-1748882198838.png

 

 

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.