ble time sync among nrf52840 devices high frequecy timer vs rtc

Hi,

I am trying to use BLE time sync code and it seems working well with 16Mhz timer and rtc as well.

Here is the previous ticket.

 ble time sync among nrf52840 devices with old SDK 

One thing I noticed is about after stopping the time sync by calling ts_tx_stop();

The timestamp with 16Mhz timer has much more time difference (time drift) between time synced devices like 14 s in 2 hour while the timestamp with RTC had only 40ms time difference.

I tested with 3 devices, 1 device is time sync master and 2 devices are time sync slaves.

Once the 2 slave devices get time synced, I stopped the time sync mode by calling ts_tx_stop() in the master device.

I believe the timers for timer value and counter value is still running and there is no change in the slave device except no more time sync data.

And I saved the log for a couple of hours with window system time and compare how much time difference they have from each other.

It seems odd to me but Is that big time diff expected after ts_tx_stop()? or Do I need something else to do to minimize the time drift in the slave devices?

Thanks!

Related