Closed cpainchaud closed 3 years ago
I guess both options should be given but for sure it's now clear that RTC based one will be way more flexible.
one last question: while (RTC.STATUS > 0 ); this will wait for registers sync. Does it happen at CPU clock timing or RTC/PIT clock timing? I am trying to evaluate the potential lag introduced by this statement which cannot be avoided (going to sleep before waiting for this sync to happen will make CPU sleep forever)
It's like all the rest of the 2-flipflop-synchronizers; it's clocked ffrom CLK_RTC; Takes 2-3 (depending on where in the clock the input changes state) RTC clocks.
Closing - no defect in core. Feel free to open issue if there are further problems - though consider using discussion if the matter at hand appears to be the weird behavior of the chip itself, as opposed to the core.
while (RTC.STATUS > 0) is never ending loop when RTC_init() is run from main() instead of setup();