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

RTC not accurate

hi support team,

i have ESB project for customer, and now i have one fundamental question about RTC cc compare event, i am struggled in this problem.

static __INLINE void radio_rtc_compare0_set(uint32_t value)

{

    RADIO_RTC->CC[0] = value -1;

}

I set the value as 16, so the frequent would be 16/32768 == 488us, and it is true, most case, the event happens in about 488us,

But sometime it would be 520us(just power down and power up the device), I could not figure out the reason for this.  

The consequence for this is that, the frequent for the VR gaming handles would not correct (1/2*520 ==960 HZ). 

After the device reset, the frequent changed, so it is not correct. It happens 20% of the chance after resetting.

The debug pin singal is simple "nrf_gpio_pin_toggle(DATA_SENDING_P1)"  from RADIO_RTC_IRQHandler(void)

any idea or suggestion on this? it would be very helpful.

Thanks in advance!

Regards,

William.

Parents
  • Hi William,

    I have some questions that needs clarification:

    • Which clock source are you using for the LFCLK? LFRC or LFXO
    • If using LFRC, do you calibrate the LFCLK after powerup and at regular intervals?
    • Is there any other peripherals running at higher priority that could delay the handling of the RTC event? To get exact timing without being affected by other higher priority peripherals, you can connect the COMPARE event from the RTC to a toggle a GPIO using GPIOTE through PPI. 
    • Is the delay in RTC event handling consistent for every event, or does it differ after powerup?
    • Are you seeing this on multiple devices, or just one device?

    Best regards,
    Jørgen

Reply
  • Hi William,

    I have some questions that needs clarification:

    • Which clock source are you using for the LFCLK? LFRC or LFXO
    • If using LFRC, do you calibrate the LFCLK after powerup and at regular intervals?
    • Is there any other peripherals running at higher priority that could delay the handling of the RTC event? To get exact timing without being affected by other higher priority peripherals, you can connect the COMPARE event from the RTC to a toggle a GPIO using GPIOTE through PPI. 
    • Is the delay in RTC event handling consistent for every event, or does it differ after powerup?
    • Are you seeing this on multiple devices, or just one device?

    Best regards,
    Jørgen

Children
No Data
Related