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

RTC1 behavior in low power mode

I intend to keep a long running clock in the system and use the app_timers(hence RTC1) in a soft device enabled nrf51822 firmware. I basically have a minute tick and update local time every minute, However, I've observed that once I call the sd_power_mode_set(NRF_POWER_MODE_LOWPWR), I see the RTC not being updated regularly and begin to see a drift in the local clock because of this. The code would then mainly be at WFE() - is this correct ? Is this a possibility, what is the accuracy of RTC1 when in low power mode? I am using a 32Khz NRF_CLOCK_LFCLKSRC_XTAL_20_PPM and internal RTC1 via app_timer approach to keep track of time.

Parents
  • Fix: I set the RTC_COMPARE_OFFSET_MIN=3, APP_TIMER_PRESCALER=0X1FF and the tick_timer at 125ms timeout, then I don't see the drift even on entering a system defined low power mode. However, the result of this is an increase in power consumption in the low power mode by about 6uA. This I presume is because the RTC1 IRQ Handler would be called every 15.625ms, unlike previous case of every 125ms (although my tick_timer is properly called at 125ms in both the cases).

Reply
  • Fix: I set the RTC_COMPARE_OFFSET_MIN=3, APP_TIMER_PRESCALER=0X1FF and the tick_timer at 125ms timeout, then I don't see the drift even on entering a system defined low power mode. However, the result of this is an increase in power consumption in the low power mode by about 6uA. This I presume is because the RTC1 IRQ Handler would be called every 15.625ms, unlike previous case of every 125ms (although my tick_timer is properly called at 125ms in both the cases).

Children
No Data
Related