cancel
Showing results for 
Search instead for 
Did you mean: 

STM32L431 VBAT issue -- CLOSED

JLemi
Associate III

For whatever reason, I can't delete this post. It is closed, see resolution below.

--------------------------

Hello. We made a board that powers the VBAT pin of a ​STM32L431RCT6 directly from a coin cell battery. The LSE and RTC work well. But we realized that the board doesn't boot when no battery is installed while the board is actually powered normally at 3.3V on VDD pins. We were expecting that the board would boot normally even with no battery installed. So is this a normal hardware issue (i.e. the MCU is supposed to work this way), or maybe the issue is in the STM32Cube-generated code (initialization code failing when the LSE can't be started properly, jumping into the error handler -- difficult to know because when the clocks are initialized, nothing else is ready, impossible to even print a message) ? Thank you!

** EDIT **

I configured GPIO pins in order to set some LEDs allowing to debug a bit.

I found out that the SystemClock_Config call completes when the MCU is flashed, but when I do a power cycle, the SystemClock_Config call no longer completes. And the Error_Handler function does not seem to be called.

The CSS feature is disabled for both LSE and HSE.

** Resolution **

The code was intercepting the interrupt for the systick. This interrrupt was executing some code that was interfering with the wait that takes place while the LSE clock is setup.

0 REPLIES 0