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

RTC Inaccuracy

I'm finding fairly large lags with the RTC2 I'm using. I use an app_timer to sample the current RTC count value as a timestamp (MM:SS:Hundredth-of-a-second) and send it out via an HVX. However I'm noticing after about 2mins the RTC is lagging a reference time by almost a second. I have set the prescalar to 327 (to get ~10msec resolution), to capture fractions of a seconds. I don't use the interrupts except for on overflow, so I know its not an interrupt lag from a BLE event. Could the BLE traffic really interrupt my RTC counter get function enough to cause this drift?

I'm really at a loss how to get accuracy (millisecond) timestamps for HVX transmissions, almost seems impossible on this chip.

Parents
  • It should be more related to LF CLK source. Do you have external 32kHz crystal and is it used during SD enabling? Once it runs there should be no interference between RTC HW peripheral and MCU activity... also question how exactly you "display" the RTC counter from main FW (because there might be delays between your read of counter and when you "look" at it from the outside;)

Reply
  • It should be more related to LF CLK source. Do you have external 32kHz crystal and is it used during SD enabling? Once it runs there should be no interference between RTC HW peripheral and MCU activity... also question how exactly you "display" the RTC counter from main FW (because there might be delays between your read of counter and when you "look" at it from the outside;)

Children
Related