Hello ,
I am working on the development kit nrf52, i want to know how i canget the value of the RTC overflw and then how i can reset the RTC to zero.
thank you in advance
Best regards
Hello ,
I am working on the development kit nrf52, i want to know how i canget the value of the RTC overflw and then how i can reset the RTC to zero.
thank you in advance
Best regards
1) enable the overflow event and interrupt
You forgot to clear the even in RTC2 ISR, but that cannot be the reason for the system not to go to deep sleep. Also move the printf to the start of the condition.
if(NRF_RTC2->EVENTS_OVRFLW==1)
{
printf("overflw");
NRF_RTC2->EVENTS_OVRFLW = 0;
NRF_RTC2->TASKS_CLEAR = 1;
sd_power_system_off();
}
This is very basic thing to work. Please look at the SDK examples to see how this things work