Skip to main content

High Accuracy Time Synchronisation with NVIDIA Jetson AGX Orin and IEEE-1588

GPU accelerated platform for time synchronisation

GPU accelerated platform features PTP support for sub-microsecond time synchronisation.

High-accuracy time synchronisation is a key enabler for many advanced applications, such as robotics, autonomous vehicles, professional audio/video distribution, communications networks and power grids. IEEE-1588 Precision Time Protocol (PTP) has become the industry standard for sub-microsecond time sync in Ethernet networks, providing orders of magnitude better performance and a much more robust and sophisticated solution than Network Time Protocol (NTP).

The NVIDIA Jetson AGX Orin boasts Ethernet with PTP hardware support, along with other advanced synchronisation features, which together enable high accuracy time sync across both distributed networked systems, and components within a Jetson Orin AGX system.

In this article, we take a look at Jetson AGX Orin IEEE-1588 support and associated features and get hands-on using the Linux PTP software to synchronise an AGX Orin Developer Kit (253-9662) to an IEEE-1588 grandmaster clock which is referenced to GPS.

For a PTP primer, see the article An Introduction to IEEE 1588 Precision Time Protocol.

A simple test

Simple test using Jetson AGX Orin Developer Kit

For this simple test, we had a Jetson AGX Orin Developer Kit connected to the LAN via WiFi, with its Ethernet port directly cabled to an IEEE-1588 grandmaster, which has a Rubidium atomic clock and is referenced to GPS. The use of a Rubidium oscillator means that the grandmaster has improved stability in a “holdover” scenario where the GPS signal is temporarily lost. The grandmaster also has a management Ethernet port, which was connected to the LAN.

Note that we could have connected the grandmaster and Jetson AGX Orin via an Ethernet switch, but this would need to be a PTP-aware switch if we wanted to achieve high-accuracy clock synchronisation; using a regular Ethernet switch will drastically reduce performance. There are plenty of switches available which support PTP, ranging from small desktop models with Gigabit Ethernet, through to rack switches with 100G ports, plus also industrial models.

verify that an Ethernet port is capable of PTP hardware timestamping

We can use the ethtool Linux utility to verify that an Ethernet port is capable of PTP hardware timestamping. Above we can see the supported capabilities and modes reported for the AGX Orin dev kit. We can also see that there is a /dev/ptp0 Linux device which corresponds to this port.

There are two PTP software options available via the Jetson Linux package repositories: PTP Daemon and Linux PTP. We installed the latter with:

$ sudo apt install linuxptp

The Linux PTP software comes supplied with a default configuration and this was used to attempt to synchronise the AGX Orin Ethernet adapter hardware clock with the grandmaster.

$ cd /etc/linuxptp
$ sudo ptp4l -i eth0 -f ptp4l.conf -m

timestamp_timeout warnings

However, the default configuration resulted in tx_timestamp_timeout warnings and huge clock offset delay figures, with Linux PTP cycling between selecting the grandmaster and then after a short while marking it as faulty.

timeout value

Fortunately, after a quick search online we found an NVIDIA forum post with a fix, which simply involved increasing the tx_timestamp_timeout value.

Success timestamp after fix

Executing ptp4l again now resulted in success and we could see our hardware clock offset steadily decreasing, as it converged with PTP time.

At this point, we had managed to synchronise the PTP hardware clock (PHC) in the Jetson AGX Orin Ethernet subsystem with our grandmaster. Next, we had to synchronise the AGX Orin system clock with the PHC, which was achieved by running:

$ sudo phc2sys -a -r -m

large offset figure

Once again we see an initially large offset figure and this reducing as the system clock converges.

Obviously, in a production scenario, this software would be started and managed by systemd.

Logging on to our grandmaster

Logging on to our grandmaster via its management port we could see that we had one client connected.

confirm the client IP address

And we could confirm the client IP address and various other information.

Advanced features

Orin Series SoC Technical Reference Block Diagram

Orin Series SoC Technical Reference Manual, page 5792.

The Jetson Orin series System-on-Chip (SoC) has a sophisticated system of timers and this includes the TimeStamp Counter (TSC), which is started at boot before the Linux kernel is loaded and is used as a reference for other timers, such as the Arm processor generic timers. The main TSC (MTSC) is a numerically controlled oscillator (NCO) derived from a 32,768 Hz clock. A secondary TSC takes its initial value from the main TSC, but has the option of then tracking an external reference, such as a pulse per second (PPS) input from a GNSS receiver, or PTP from Ethernet.

Block diagram how a PTP grandmaster can be used to provide a time reference

Above we can see how a PTP grandmaster can be used to provide a time reference, with the TSC being synchronised to the PTP second boundary, which in turn can be used to then generate a PTP phase synchronised, camera frame sync (Fsync) signal. In other words, we can align camera frame capture with PTP and hence the global time standard, International Atomic Time (TAI).

Camera frame capture alignment is interesting enough within a single system where we might have multiple cameras attached (Jetson AGX Orin can have up to 8x MIPI CSI cameras directly attached and its Video Input (VI) engine supports a maximum of 6x concurrent video streams). However, this becomes even more interesting in applications with multiple networked systems.

Other advanced time synchronisation features include:

PTP bridge in Tegra MAC. This allows time sync to be transferred from the primary Ethernet port — which is connected to the PTP grandmaster — to another port and in turn device, such as an Ethernet-connected sensor.

A Time Co-relation Module, which provides a concurrent and correlated snapshot of multiple time domains like CCPLEX TSC, PTP etc. on a given event to be consumed by upper layer software.

Further details can be found in the NVIDIA DRIVE OS Linux SDK Developer Guide.

Applications

A significant number of applications stand to benefit from high accuracy time synchronisation and the list is growing all the time in the endless quest for increased performance across many areas. It’s clear to see how PTP can find use in robotics, autonomous vehicles and advanced manufacturing operations, where sensor fusion is a hot topic and a high degree of coordination is typically vital.

IEEE-1588 has been embraced by the professional audiovisual industry, where it plays a foundational role in standards such as AES67 audio over IP/Ethernet. Similarly in the Time Sensitive-Networking (TSN) set of standards, which grew out of audiovisual requirements, but are now finding applications in aerospace, automotive, industrial automation and others.

Telecommunications networks were a major driver for the development of PTP and it is used extensively in 4G and 5G networks, where it ensures that base stations are operating on the correct frequency and air interface framing is suitably aligned, without which seamless handover would not be possible and overall network performance would be seriously degraded.

Many industries have their own IEEE-1588 profiles which define a common set of parameters, optimised for a particular class of application and facilitating interoperability. This includes the power profile standards, which enable PTP to replace older technologies such as IRIG-B. Applications include power grid synchronisation and energy and power quality measurement.

Final words

NVIDIA Jetson AGX Orin not only enables high-performance compute to be embedded into systems and placed at the edge of the network, but for applications to benefit from high accuracy time synchronisation and advanced time sync features. And in this article, we have seen just how easy it is to get up and running with Jetson AGX Orin and IEEE-1588 PTP time synchronisation.

  — Andrew Back

Open source (hardware and software!) advocate, Treasurer and Director of the Free and Open Source Silicon Foundation, organiser of Wuthering Bytes technology festival and founder of the Open Source Hardware User Group.