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 Reply
  • Hi William,

    Yes, it looks like that is correct. I created a sample application that will use PPI+GPIOTE to toggle GPIOs on the TICK and COMPARE0 events from the RTC. The COMPARE0 event will also clear the RTC through a PPI fork.

    As you can see from the logic trance, there is a delay between the COMPARE0 event where the RTC is cleared before the first TICK event occurs. This is what is described in the image you posted.

    Best regards,
    Jørgen

Children
No Data
Related