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

Best Way to Keep Track of Time with the nRF52

I need to keep track of time on a device featuring the nRF52 and have an RTC run continuously in the background. The drift should not be more than a few seconds over a year. Is this possible to achieve with a moderate power consumption?

I am a bit overwhelmed with the number of of ways to keep track of time in the SDK:

  • app_timer*
  • Also, the changes to app_timer posted in this forum by Clem Taylor. This dates back to 2015, though and targets the nRF51?
  • app_simple_timer*
  • nrf_drv_timer*
  • nrf_drv_rtc*
  • nrf_drv_clock*

Is there anything that comprehensively explains the difference between these? Also, what should my approach be to get a system clock with as little time drift as possible?

Parents
  • That's a pretty strict drift requirement. I didn't do the math but that might be less than 1 ppm. You won't get that kind of performance out of the internal RC, and I haven't seen an external crystal that was that good. If you really need to hit that you will also need to calibrate the clock for is natural offset, and probably temperature compensate it periodically.

Reply
  • That's a pretty strict drift requirement. I didn't do the math but that might be less than 1 ppm. You won't get that kind of performance out of the internal RC, and I haven't seen an external crystal that was that good. If you really need to hit that you will also need to calibrate the clock for is natural offset, and probably temperature compensate it periodically.

Children
No Data
Related