Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs
This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

RTC overflw handler

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

Parents Reply
  • 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. 

Children
Related