https://github.com/NordicPlayground/nrf5-calendar-example
What is lowest power mode where real time clock could run?
How could retain RTC value during reset?
Thanks
https://github.com/NordicPlayground/nrf5-calendar-example
What is lowest power mode where real time clock could run?
How could retain RTC value during reset?
Thanks
After a reset has occurred, register RESETREAS can be read to determine which source has triggered the reset.
I also recommend doing some sanity check on the retained data when you wake-up.
Hi Sigurd,
The RTC in System ON mode, with LFCLK and RTC running – how can check inside the callback event handler that I’m in such mode in order to skip/bypass the other stuff that normally is done there in regular mode like showing a clock etc. that cant run in low power mode? Or to block interrupts from the RTC other way?
The 'sanity check' is a good point, still didn’t find though reliable enough logic as the value in question is a timestamp, so far have idea how to check for out of range only the bottom limit (i.e.the compile or download timestamp), but with the upper limit is a tricky … so will leave if for a while in the TODO list until fix more important problems
Thank you and best regards!
In System OFF, everything is turned off, including clocks. You can read about the power modes here.
There is no function to stop the callback, but one can easily be implemented. All you have to do is set the callback pointer to 0:
void nrf_cal_clear_callback(void)
{
cal_event_callback = 0;
}