time stamp accuracy problem

Hi,

    My time stamp is calculated by RTC counter.And I found that the time stamp was about 12s faster when comparing nrf-connect logs after a day.

Here is the configuration I set up.The accuracy of the external crystal oscillator is 20ppm. And I use the app timer to progressive increase the time stamp every 1 second.

I want to know what causes such a large time drift.Thank you.

Parents Reply Children
  • Hardware: The chip is 52832, the low-frequency crystal frequency is 32.768kHz, and the crystal precision is ±20ppm  

    Our application is to make a second level timestamp (Unix timestamp)function, it can synchronize the time through the phone.  I start a 1-second app timer and increment the timestamp by 1s as every second time out.  The code is as follows  

     

    Test procedure: Synchronize the time at a point where the phone time is consistent with the firmware timestamp.  After running 9 hours, the firmware timestamp is read from the mobile phone. The time when the firmware is read is displayed on the log. The firmware time is 11s faster than that of the mobile phone. 

Related