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 ( |
RevPi Connect 5 |
Port A ( |
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. |
|
Network hardware does not support hardware timestamping. |
Check for a network port support. |
|
TX timestamp becomes available with delay |
Use |
PTP does not work. |
PTP not started on a supported port. |
Use |