cancel
Showing results for 
Search instead for 
Did you mean: 

Setting RTC Alarm for 1 Year from now

deckhard
Associate III

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!

3 REPLIES 3
berendi
Principal

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
Associate III

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.

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