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.

Parents Reply Children
  • I confirmed with the development team, so no documentation on that part.  

  • Can you confirm with the development team the exact thing I say: " you can't have a sub-microsecond round trip every few seconds using Nordic RF devices"

  • From the team:

    We don't have a framework/support for accurate timestamps.  The only real-time clock available on nRF7002 is the RTC clock which has 32us error. It could work if you can do timestamps in the host and not entirely sure how it can be done.

  • 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. 

Related