Skip to main content
*于.1
Associate II
Dec 7, 2020 11:18 AM UTC
Solved

STM32L051C8T6, standby mode using RTC to wake up,RTC clock choose the 37k LSI ,wakeup time problem

0693W000006EpKJQA0.png0693W000006EpLRQA0.png0693W000006EpMtQAK.pngUse STM32L051C8T6 for low-power design. In standby mode, RTC is used to wake up. The RTC clock is internal 37K clock. After 1Hz frequency division, the program sets 180s to wake up. As a result, it wakes up at 160s. Please ask if there is a problem with the configuration.

This topic has been closed for replies.
Peter BENSCH
Peter BENSCHBest answer
ST Technical Moderator
Dec 7, 2020 12:05 PM UTC

Despite the fact STM32CubeMX gives 37kHz for the LSI, the real frequency is in the range of 26...56kHz, typically 38kHz, i.e. -31...+47%. Please check the datasheet of the STM32L051, section 6.3.7, currently page 71: LSI oscillator characteristics.

This clock source is based on an RC oscillator and is completely independent of the other clock sources to provide additional security when used in conjunction with the IWDG (Independent Watchdog).

Please use one of the other clock sources if you need an accurate clock, e.g. the LSE with an external crystal of 32.768kHz.

When your question is answered, please close this topic by choosing Select as Best.

/Peter

In order to give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

4 replies

Peter BENSCH
Peter BENSCHBest answer
ST Technical Moderator
Dec 7, 2020 12:05 PM UTC

Despite the fact STM32CubeMX gives 37kHz for the LSI, the real frequency is in the range of 26...56kHz, typically 38kHz, i.e. -31...+47%. Please check the datasheet of the STM32L051, section 6.3.7, currently page 71: LSI oscillator characteristics.

This clock source is based on an RC oscillator and is completely independent of the other clock sources to provide additional security when used in conjunction with the IWDG (Independent Watchdog).

Please use one of the other clock sources if you need an accurate clock, e.g. the LSE with an external crystal of 32.768kHz.

When your question is answered, please close this topic by choosing Select as Best.

/Peter

In order to give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
MM..1
Super User
Dec 7, 2020 6:55 PM UTC

Hi or you can calibrate LSI to 32768 or recalculate 180 to real 180s :beaming_face_with_smiling_eyes:

Peter BENSCH
ST Technical Moderator
Dec 8, 2020 10:47 AM UTC

Calibrating/recalculating would only be a temporary action as LSI does not provide long-term stability and is therefore not recommended.

An alternative clock source could be the MSI (65.5 kHz...4.2 MHz, depending on the selected frequency range) or the HSI (16 MHz). Their accuracy is comparable to any free-running oscillator, but better than LSI and possibly applicable for UART communication.

Regards

/Peter

In order to give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.