don't force-reset the state of the RTC when rebooting

This commit is contained in:
Alessandro Genova
2025-12-07 21:09:39 -05:00
parent e353d4760f
commit f6fad64eeb

View File

@ -61,9 +61,7 @@ void rtc_init(void) {
MCLK->APBAMASK.reg |= MCLK_APBAMASK_RTC;
#endif
// if (rtc_is_enabled()) return; // don't reset the RTC if it's already set up.
// Reset everything, once things are stabilized we can think about preserving some state
CTRLREG.bit.ENABLE = 0;
if (rtc_is_enabled()) return; // don't reset the RTC if it's already set up.
_rtc_sync();
CTRLREG.bit.SWRST = 1;