Skip to main content
Emm1592
Associate II
April 14, 2019
Question

How inaccurate is the RTC?

  • April 14, 2019
  • 6 replies
  • 1646 views

Hello!

I wanted to know how inaccurate the RTC is when working with LSI or LSE.

Reading from posts and data sheet of the MCU, I saw that LSI is much more imprecise than the LSE.

I wanted to know if there was an equation that would allow me to estimate that deviation from the "real" measure of time for both the LSI and the LSE.

I'm working with the Nucleo board STM32L476RG.

Thank you!

This topic has been closed for replies.

6 replies

Clive1 (HNL)
Explorer
April 14, 2019

>>I wanted to know if there was an equation that would allow me to estimate that deviation from the "real" measure of time for both the LSI and the LSE.

Like a percentage? If the clock is 10% fast, time will run faster, a "second" will have 900ms in it for example.

1ppm fast, the "second" will have 999.999ms in it.

The LSI isn't just inaccurate, it is unstable.

Emm1592
Emm1592Author
Associate II
April 14, 2019

Hello Clive, thank you for your response.

What do you mean by "LSI is unstable"?

I wanted to use the LSI and know how much error generates in a day, a week, a month. For example, how much does it deviate from the "real" time during a week. Knowing this I could restart the RTC by obtaining the updated time via serial with another device (with updated time).

I need to use the LSI because my project need to work with imprecise time, but I'm worried about the part you said of being unstable.

Thank you.

MikeDB
Senior II
April 14, 2019

Just use LSE. 32k crystals are 5 cents each on AliExpress.

Emm1592
Emm1592Author
Associate II
April 14, 2019

Hello Mike, thank you for your response.

The Nucleo Board STM32L476RG doesn't include LSE?

MikeDB
Senior II
April 14, 2019

Common features

  • STM32 microcontroller in LQFP64 package
  • 1 user LED shared with Arduino™
  • 1 user and 1 reset push-buttons
  • 32.768 kHz crystal oscillator

........

So seems it does