Precision Time Protocol (PTP) enables highly accurate time synchronization between devices in a network. Compared to NTP, PTP can reach synchronization accuracies in the microsecond range.

PTP is typically used in industrial networks, measurement systems, or real-time applications.

PTP-capable Network Ports #

PTP is only supported by RevPi Connect 4 and RevPi Connect 5.

Device PTP-capable Network Ports

RevPi Connect 4

Port A (eth0)

RevPi Connect 5

Port A (eth0) and Port B (eth1)

Hardware Timestamps #

For high accuracy, PTP uses hardware timestamps generated directly by the network hardware.

Depending on the device, timestamps may be generated either in the MAC or in the PHY of the network controller.

Checking Timestamp Capabilities #

You can use ethtool to check the timestamp capabilities of a network port.

▷ Log in to the RevPi via terminal.

▷ Check the capabilities of eth0:

ethtool -T eth0

On supported devices, the following capabilities are shown, among others:

hardware-transmit
hardware-receive
hardware-raw-clock

Using PTP with ptp4l #

On Linux, PTP is usually implemented using ptp4l from the LinuxPTP project.

A test with ptp4l shows that supported RevPi devices can generate hardware timestamps for;

  • PTP over Ethernet

  • PTP over UDP

Limitations #

The hardware timestamps of the supported network ports are primarily intended for PTP.

Timestamps for arbitrary network frames are not supported on all devices or configurations.

Troubleshooting #

Problem Cause Solution

No hardware timestamps available.

Unsupported device or wrong network port used.

Use PTP only on supported ports.

ethtool -T does not show hardware capabilities.

Network hardware does not support hardware timestamping.

Check for a network port support.

ptp4l reports missing TX timestamp.

TX timestamp becomes available with delay
(RevPi Connect 5).

Use ptp4l --tx_timestamp_timeout=5.

PTP does not work.

PTP not started on a supported port.

Use eth0 or eth1 of a supported device.

Further Resources #