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
rtc1 OR rtc2? Your code seems to initialize rtc1 but looks for an event on rtc2.
I initialised the rtc2 , just i use the name rtc1
1) You are initializing RTC1 and checking for RTC2 events in ISR. You need to check RTC1 events in ISR.
2)
if(NRF_RTC2->EVENTS_OVRFLW==1) { NRF_RTC2->TASKS_CLEAR = 1; sd_power_system_off(); printf("overflw"); }
printf will never be executed since the sd_power_system_off will never return. Any wakeup will reset the chip. If you want to return here, then use sd_app_evt_wait() instead of system off.
thanks ,
I initialised the RTC 2 (const nrf_drv_rtc_t rtc1 = NRF_DRV_RTC_INSTANCE(2); /**< Declaring an instance of nrf_drv_rtc for RTC2. */)
the problem is the system does not go into sleep mode