From: Alessandro Genova Date: Mon, 8 Dec 2025 02:09:39 +0000 (-0500) Subject: don't force-reset the state of the RTC when rebooting X-Git-Url: https://git.earman.xyz/?a=commitdiff_plain;h=f6fad64eebe0b93b086c8bc0685fb049cef0e518;p=sensor-watch.git don't force-reset the state of the RTC when rebooting --- diff --git a/watch-library/hardware/watch/rtc32.c b/watch-library/hardware/watch/rtc32.c index 934564b..d4ac9b2 100644 --- a/watch-library/hardware/watch/rtc32.c +++ b/watch-library/hardware/watch/rtc32.c @@ -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;