TECH Signal 459
Raspberry Pi CM4 yields a $103 Stratum 1 PTP Grandmaster with hardware timestamping
An engineer built a nanosecond-accurate Stratum 1 PTP grandmaster clock using a Raspberry Pi CM4 and roughly $103 in new parts, leveraging the BCM54210PE PHY's hardware timestamping support.
It demonstrates a low-cost path to learning and deploying IEEE 1588v2 PTP for industrial or homelab environments, avoiding multi-thousand-dollar commercial clocks. The tradeoff is holdover accuracy, as the standard crystal lacks temperature compensation compared to more expensive alternatives like the TimeHAT.
Written by elseif from the cluster below · every claim links back to a sourceThe three things worth knowing
The build uses a Raspberry Pi CM4's BCM54210PE Ethernet PHY, which supports IEEE 1588v2 hardware timestamping at the wire level.
Total cost for new parts was approximately $103, significantly cheaper than commercial GPS-disciplined grandmasters or the $475+ TimeHAT path.
The standard crystal oscillator caused 15ms of drift over 10 hours of GPS holdover, making it unsuitable for production environments where holdover accuracy is critical.
THE READ
What the cluster adds up to.
The author constructed a Stratum 1 PTP grandmaster clock using a Raspberry Pi Compute Module 4 and approximately $103 in newly purchased components. Commercial GPS-disciplined PTP grandmaster clocks typically cost several thousand dollars, and even a dedicated learning board like the TimeHAT runs around $475. This build achieves nanosecond-accurate time synchronization by pairing the CM4 with a u-blox M10 based GPS module and an active antenna. The low cost makes IEEE 1588v2 Precision Time Protocol accessible for homelab learning and experimentation.
Sub-microsecond synchronization is possible because the CM4 uses a BCM54210PE Ethernet PHY with full IEEE 1588v2 hardware timestamping support. This PHY timestamps packets directly at the wire, before they enter the kernel network stack, eliminating jitter from kernel scheduling and interrupt handling. The author tested the grandmaster against a Turing Pi 2 cluster board with RK1 and CM4 client nodes. All clients and the grandmaster share a single RTL8370MB-CG+ switch fabric, ensuring PTP packets pass through only one switch hop without routing.
The primary limitation of this budget build is the oscillator. The CM4 uses a standard crystal with no temperature compensation, unlike the TCXO found in the TimeHAT path. During a 10-hour GPS holdover test, the standard crystal allowed 15ms of drift, which the author deemed acceptable for learning but unsuitable for production. In environments where holdover accuracy is critical, the temperature-compensated oscillator is worth the higher cost. The build also relies on jumper wires and lacks the proper SMA connectors of more expensive hardware.
Adopting this approach requires specific software conditions. The author used Ubuntu 24.04 on the CM4 because the necessary BCM54210PE PTP support was not present in the older Ubuntu 22.04 kernel. Engineers replicating this build must ensure their kernel supports hardware timestamping for this specific PHY. Starting from zero hardware, the TimeHAT path with an Intel i226 NIC remains easier and cleaner. However, for engineers who already possess a CM4 and want to understand PHY-level time synchronization, this build offers a functional, low-cost entry point.
Written by elseif from the cluster below · checked for specifics the sources never containedTHE CLUSTER
↗