This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

RTC1 forever counter (64 bits). Detect RTC1 overflow with S130

Can I detect overflow on RTC1 when using timers with S130? In my App, I use timers but also count time with NRF_RTC1->COUNTER. I need to know If overflow happens. It seems that the IRQHandler doesn't mather about event.

void RTC1_IRQHandler(void) { // Clear all events (also unexpected ones) NRF_RTC1->EVENTS_COMPARE[0] = 0; NRF_RTC1->EVENTS_COMPARE[1] = 0; NRF_RTC1->EVENTS_COMPARE[2] = 0; NRF_RTC1->EVENTS_COMPARE[3] = 0; NRF_RTC1->EVENTS_TICK = 0; NRF_RTC1->EVENTS_OVRFLW = 0;

// Check for expired timers
timer_timeouts_check();

}

Parents Reply Children
No Data
Related