Raspberry Pi 5 PCIe HAT with I226 NIC (TimeHATv6)
Raspberry Pi 5 PCIe HAT with I226 NIC — TimeHAT
The TimeHAT brings precision timing and advanced network functionality to the Raspberry Pi 5. Leveraging the PCIe interface via an FPC connection, it integrates a high-performance Intel I226 Ethernet NIC, precise timing inputs and outputs via SMA connectors, and a GNSS module slot for global time synchronization. It's a powerful tool for building small form-factor PTP (Precision Time Protocol) clients — ideal for time-sensitive networking applications.
What's in the Box
- TimeHAT
- 40-pin spacer
- 16-pin FPC PCIe cable
- Spacers, nuts, and screws for mounting to Raspberry Pi 5
Key Features
I226 Ethernet NIC
The HAT features an Intel I226 NIC connected to the Raspberry Pi 5 over the PCIe interface, delivering fast, reliable Ethernet connectivity — perfect for applications requiring high-speed networking combined with precise timing.
Precision Timing via SMA Ports
Two SMA connectors provide timing signal input and output:
- SMA Input (SDP1 on I226): Receive a 1PPS (one pulse per second) signal to discipline the NIC's internal clock.
- SMA Output (SDP0 on I226): Output a 1PPS signal from the NIC to synchronize external equipment or measure precise time intervals.
- Spare U.FL (SDP3 on I226): Raw unbuffered connection usable as input or output. Warning: This is also a strapping pin on the I226 — connecting it at boot may affect Ethernet functionality.
These features enable the HAT to act as either a PTP client or a PTP grandmaster.
OCP M.2 GNSS Slot (2242 Form Factor)
An M.2 slot designed for OCP-compliant GNSS modules adds satellite-based time synchronization to your Pi:
- UART Connection: The GNSS module communicates with the Pi via the standard HAT header.
- 1PPS from GNSS to SDP2 on I226: The GNSS 1PPS signal connects directly to the NIC, enabling GPS-disciplined timekeeping — essential for a reliable grandmaster clock.
Built-in TCXO
A high-precision Temperature-Compensated Crystal Oscillator (TCXO) ensures timing stability even during network loss, and allows tighter disciplining parameters to reduce PTP timing jitter. Stability: ±280 ppb across temperature.
Applications
- PTP Client or Grandmaster: Synchronize network devices with sub-microsecond accuracy.
- GNSS Disciplined Clock: Build a highly accurate, satellite-synchronized clock.
- 1PPS Signal Measurement: Measure and verify 1PPS signals for precise timekeeping.
- Edge Networking: Deploy in edge computing environments where precise timing is critical.
- Home Labs: Create a PTP client network for your home lab with ease.
- IoT Gateways: Build precise IoT gateways with synchronized time across devices.
- Research & Development: Experiment with PTP, GNSS, and timing protocols in various network configurations.
Resources
- TimeHAT GitHub Repo — discussions, issues, and setup documentation
- Jeff Geerling's time-pi GitHub Repo — community resources related to this product
Setup & Usage Guide
Pre-Setup Steps
A. Install linuxptp
sudo apt install linuxptpB. Download testptp
cd ~ ; mkdir testptp; cd testptp
wget https://raw.githubusercontent.com/torvalds/linux/refs/heads/master/tools/testing/selftests/ptp/testptp.c
wget https://raw.githubusercontent.com/torvalds/linux/refs/heads/master/include/uapi/linux/ptp_clock.h
sudo cp ptp_clock.h /usr/include/linux/ptp_clock.hC. Compile testptp
gcc -Wall -lrt testptp.c -o testptpD. Install testptp
sudo cp testptp /usr/bin/E. Verify testptp works
sudo testptp -d /dev/ptp0 -lShould see:
pi@raspberrypi:~/testptp $ sudo testptp -d /dev/ptp0 -l
name SDP0 index 0 func 0 chan 0
name SDP1 index 1 func 0 chan 0
name SDP2 index 2 func 0 chan 0
name SDP3 index 3 func 0 chan 0Fix 1PPS input to only use rising edge (New Method, much easier)
Procedure documented on GitHub: https://github.com/Time-Appliances-Project/TimeHAT
Configure 1PPS Output
1. Setup SDP0 (SMA1, closest to HAT header) as periodic output:
sudo testptp -d /dev/ptp0 -L0,2
sudo testptp -d /dev/ptp0 -p 1000000000Read 1PPS SMA Input
A. Setup SDP1 (SMA2, furthest from HAT header) as timestamp input:
sudo testptp -d /dev/ptp0 -L1,1B. Read timestamps. Use -1 to read forever and ctrl+C to stop; using 5 here as a demo.
Note: The I226 driver passes both edges to Linux, so both rising and falling edges will be listed. A fix for this is listed below and requires patching and building the kernel.
sudo testptp -d /dev/ptp0 -e 5Discipline to 1PPS SMA Input
Procedure documented on GitHub: https://github.com/Time-Appliances-Project/TimeHAT
Access GNSS UART
A. Enable UART (but not serial console) for Raspberry Pi. Use raspi-config: 3. Interface Options → I6 Serial Port
sudo raspi-configLogin shell → No
Serial port hardware → Yes
Finish
rebootB. Once rebooted, link GNSS UART to a ttyS name for tools to use:
sudo ln -s /dev/ttyAMA0 /dev/ttyS10C. Simple serial check using tio (use ctrl+t q to quit):
tio -b 38400 /dev/ttyS10Use gpsd / cgps to See GPS Status
A. Install gpsd and cgps:
sudo apt-get install gpsd gpsd-clientsB. Configure gpsd to point to /dev/ttyAMA0, the GNSS UART:
sudo vim /etc/default/gpsdC. Add /dev/ttyAMA0 to GPSD_OPTIONS and set baud rate:
GPSD_OPTIONS="/dev/ttyAMA0 -s 38400"D. Enable gpsd on startup:
sudo systemctl enable gpsdE. Start gpsd now:
sudo systemctl start gpsdF. Use cgps to see GPS status (use ctrl+c to exit):
sudo cgpsUse pygpsclient to See GPS Status (Requires Monitor)
A. Install pygpsclient (installation docs):
python3 -m pip install --upgrade pygpsclientB. Run pygpsclient from terminal:
pygpsclientC. Select /dev/ttyS10 as the serial port, set baud rate to 38400, then click the USB/UART button.
Automatic Discipline to GNSS Module (Including TOD)
Procedure is documented on GitHub: https://github.com/Time-Appliances-Project/TimeHAT
After setting this up, the NIC PHC will be automatically updated by the GPS when available, and cgps can be used to monitor the GPS. This is the recommended method for setting up TimeHAT with GPS to discipline the NIC.
Manual Discipline to 1PPS from GNSS Module
Note: To have this work properly, you'll need to install the PPS input fix (see GitHub).
A. Install the GNSS module and make sure it's locked. You should see a blinking LED on the M.2 module when 1PPS is being generated.
B. Enable PPS input on GNSS → I226 SDP2 pin:
sudo testptp -d /dev/ptp0 -L 2,1C. Set NIC PHC based on system time to get Time-Of-Day:
sudo phc_ctl eth1 "set;" adj 37D. Use ts2phc to discipline NIC from 1PPS:
sudo ts2phc -c /dev/ptp0 -s generic --ts2phc.pin_index 2 -m -l 7