Skip to main content
Audrey Hendon
Associate
June 5, 2020
Solved

Using RTC on STM32l4 as a fail safe monthly wake up?

  • June 5, 2020
  • 4 replies
  • 1194 views

Wondering if the STM32l4 RTC could be used to wake the processor from standby mode after 1 month.

Powered by the LSI, would the time drift beyond usability? Ie. It does not matter if the device wakes up 30 days or 31 days later. Just as long as its in the "ballpark".

Is a 30 day wakeup interval supported?

Thanks in advance!

This topic has been closed for replies.
Best answer by Jack Peacock_2

You can configure the RTC alarm to trigger on a specific day of the month for a monthly wakeup. Accuracy depends on using LSE or LSI oscillator for the RTCCLK. For LSI there is a cumulative error which will become significant over a long period. You can reduce the error by calibrating the LSI. For LSE with a low PPM crystal cumulative error is less of a problem.

Jack Peacock

4 replies

Jack Peacock_2
Jack Peacock_2Best answer
Associate II
June 5, 2020

You can configure the RTC alarm to trigger on a specific day of the month for a monthly wakeup. Accuracy depends on using LSE or LSI oscillator for the RTCCLK. For LSI there is a cumulative error which will become significant over a long period. You can reduce the error by calibrating the LSI. For LSE with a low PPM crystal cumulative error is less of a problem.

Jack Peacock

berendi
Principal
June 5, 2020

You can find the worst case LSI frequencies in the datasheet.

0693W000001q8RcQAI.png

Does your definition of ballpark include 2 days earlier or 2.5 days later?

waclawek.jan
Super User
June 5, 2020

That's actually not bad at all, LSIs in other STM32 families tend to spread over tens of %.

JW

Audrey Hendon
Associate
June 5, 2020

Thanks for the responses! This helps a lot