stm32duino / STM32RTC

Arduino RTC library for STM32.
125 stars 48 forks source link

fix: ability to set alarm after reset #77

Closed ABOSTM closed 1 year ago

ABOSTM commented 1 year ago

fix: ability to set alarm after reset

Be sure to set default value for alarmday, and thus avoid IS_RTC_DATE(day) being false when is not usd in alarm setting

Take into account Reset usecase (being able to set new alarma after a reset)

Factorize change of RTC clock source in the RTC_begin() function which imply a reset of BackupDomain. Save configuration before this BackupDomain reset, and restore after.

Tested with sketches from RTC and LowPower libraries, on both Nucleo F103RB and Nucleo L476RG

fixes stm32duino/STM32LowPower#82

tshcherban commented 1 year ago

You meant that #82?

ABOSTM commented 1 year ago

You meant that #82?

yes