I'm attempting to synchronize/correlate measurements made by two separate nRF9160 devices and was hoping to use a timestamp to do so. Essentially I would like to measure the time between the same event measured by two nRF9160 based systems. Is there any way to obtained real time from the cellular network with predictable latency to achieve this? Is there any guarantee with regards to latency when reading the network time? I'm hoping for some direction with how best to achieve something like this.
Hi Phipi,It really depends on how great the resolution you need for the timing.
A quick suggestion that has a 1second resolution.
This can be solved by setting XNETTIME (network time support) then get the XTIME and set the CCLK based on that.
How accurate do you need it?
Accuracy to actual time is not so important but the difference in time base between the two boards would need to be synchronized to withing 10s-100s of ms. I'm thinking that I'm going to need some way for the two devices to talk to each other directly but unfortunately I don't think that's going to be possible so I'm hoping there's another way. Would GPS time be more accurate?
Hi Phipi,Yes, GPS would be a more accurate option.Another option is to get the time from an NTP server, similar to what is done in this sample.