Skip to main content
deckhard
Associate III
March 16, 2020
Question

Setting RTC Alarm for 1 Year from now

  • March 16, 2020
  • 3 replies
  • 795 views

Hi,

Is it possible to set the RTC Alarm (on STM32L496VG) to wake from low power for a specific date from now?

For example 1 year from now or 10 years from now?

Thanks for your help!

This topic has been closed for replies.

3 replies

berendi
Principal
March 16, 2020

No. See the description of the RCC alarm registers in the reference manual, they have no fields for the month, they can only match the day of the month, so the maximal duration is one calendar month.

deckhard
deckhardAuthor
Associate III
March 17, 2020

So theoretically I could set the duration for one month, wake up from low power and than go back to low power repeatedly for 12 times and that would be the equivalent of 1 year, right?

I don't need to clear the RTC registers each time or set it back again, just go to low power.

berendi
Principal
March 17, 2020

Yes, just repeat it 12 times, but I think you should clear the alarm flag in RTC->ISR before going back to low-power.