cancel
Showing results for 
Search instead for 
Did you mean: 

RTC Time is not incorrect randomly after the MCU is waked up from Standby mde

Frank Weng
Associate II

Hi ST team,

I was coding on STM32L431 chip and got a problem about the RTC time.

The problem is that the RTC time is not synchronized with my input randomly after the MCU is waked up from Standby mode. The following descriptions are the detail.

[Reproduced steps]

StepA. Setup RTC time by HAL_RTC_SetTime and HAL_RTC_SetDate functions.

StepB. Configure Wakeup ISR by HAL_PWR_EnableWakeUpPin and HAL_RTCEx_SetWakeUpTimer_IT.

StepC. Trigger MCU to get into standby mode by HAL_PWR_EnterSTANDBYMode.

StepD. MCU is waked up by wake up pin or RTC counter and the RTC time is not correct randomly.

For example, to configure the RTC time to 18/11/27 10:10:10. Randomly, the RTC time becomes to be 18/11/27 19:10:10 when MCU is waked up after 10 mins.

This situation is not always happened but randomly.

Please help to provide your suggestions, thanks a lot.

4 REPLIES 4

19:10:10?

And if this does not happen, the RTC continues to tick correctly?

What's the supply scheme? Are all grounds, including analog ones, connected? Is VDDA powered properly? Aren't there bad solder joints on the power pins? How is VBAT powered exactly? How is the LSE crystal connected?

Can you try your code on a "known good" board such as a Nucleo or a Disco?

JW

Frank Weng
Associate II

Hi JW,

Yes, except some random cases, the RTC time is always in line with expectations.

And I have to apologize to you about the incorrect descriptions.

In my example, the RTC Time becomes to 19:20:10 from 10:10:10, instead of 19:10:10.

The LSE counting is correct but "HOURS" is tricky and sometimes the situation occurs at "YEAR", too.

I will check the status which you mentioned, including VDDA, VBAT, LSE and so on, and reply the results here. Thanks for your kindly suggestions very much.

Frank Weng
Associate II

Hi JW,

Answer your questions as below.

1.     Are all grounds, including analog ones, connected?

Frank > All the ground are connected together including VSSA.

2.     Is VDDA powered properly?

Frank > Yes , all the power pins are supplied by same power source.

3.     Aren’t there bad solder joints on the power pins?

Frank > Yes, there aren’t bad solder.

4.     How is the VBAT powered properly?

Frank > The VBAT will be supplied in run and standby mode.

5.     How is the LSE crystal connected?

Frank > There is a 32.768kHz crystal that connect to OSC32_IN and OSC32_OUT.

I have no explanation for hours (or years) jumping in this way, sorry.

JW