PTP-like Synchronization Over WiFi using Nordic NRFs

I want to achieve time synchronization over a wireless connection with sub-microsecond latency. While PTP (Precision Time Protocol) can provide nanosecond-level accuracy on wired networks, I know wireless setups make this difficult. Still, there should be a way to get close (e.g. 250ns)

The latency issues with WiFi - often in the tens of milliseconds - are mostly due to the software stack latency and frequency contention in shared space (retries). WiFi 6 shows improved performance, partly because its frequency range isn’t fully saturated yet. I’m testing with a couple of nRF7002-EK modules to see what they can do.

My main question is: with a dedicated wireless system (both software and hardware) solely for clock synchronization, could I use a Nordic chip to transfer timestamps with sub-microsecond latency? It doesn’t have to be perfectly reliable. If I can achieve sub-microsecond latency a few times per minute and know when those moments occur, that’s enough for my needs.

  • This sounds promising! Here’s how I understand it:

    Imagine you have two hosts dedicated solely to handling the nRF7002's interrupts. The nRF configuration is as lean as possible: no buffering, no power-saving features, no encryption - the most responsive configuration possible.

    The "leader" host timestamps and sends a SYNC message with a unique serial number 10 times per second, precisely at the 0, 100ms, 200ms, and so on time within every second according to its clock. The "follower" then responds with an ACK message, including the same serial number, as quickly as possible. When the leader receives this ACK, it timestamps the response. Since the leader's clock is used for both sending and receiving timestamps, it can determine the round-trip time with high precision.

    If the round-trip time is below 50 microseconds (or something small), the leader considers it valid and sends a VALID message back to the follower, again including the serial number. The follower, upon receiving this VALID message, calculates an offset based on the timing of the SYNC message it initially received. It then adjusts its local time accordingly if necessary (there are algorithms that balance the size of the adjustment with the confidence on the latency)

    This setup enables synchronization between the two hosts with better than (for example) 50-microsecond accuracy. For sustained accuracy, the leader could use an OCXO and the follower a TCXO, allowing them to maintain synchronization within a few microseconds for several seconds.

    The core requirement seems to be a single "fast" round-trip every couple of seconds. There may be additional details to refine, but the overall concept appears solid.

    So I guess the question is, realistically what is the minimum round trip one can expect from two nRF7002s within e.g. 5 seconds?

  • We can provide api to read TSF timer from Wi-Fi to implement PTP if you need it. 

  • Hi everyone,

    I wanted to ask if anyone has managed to find information on timing accuracy and what level of precision is realistically achievable?

    In my case, I’m aiming for an accuracy level around 500 µs.

    Additionally, it would be great if there was an API available for easy access to TSF timers.

    Thanks in advance for any tips or information!

  •  This API would be extremely valuable for us as we work on a project where this functionality could make a significant difference.

Related