don't force-reset the state of the RTC when rebooting
This commit is contained in:
@@ -61,9 +61,7 @@ void rtc_init(void) {
|
|||||||
MCLK->APBAMASK.reg |= MCLK_APBAMASK_RTC;
|
MCLK->APBAMASK.reg |= MCLK_APBAMASK_RTC;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// if (rtc_is_enabled()) return; // don't reset the RTC if it's already set up.
|
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;
|
|
||||||
|
|
||||||
_rtc_sync();
|
_rtc_sync();
|
||||||
CTRLREG.bit.SWRST = 1;
|
CTRLREG.bit.SWRST = 1;
|
||||||
|
|||||||
Reference in New Issue
Block a user