PZ-TIO Manual
Version 1.01
© 2022 XIA LLC
38
Connect PTP PHY to CAT-5 cable through the RJ45 connector.
These hardware features require a number of (open source) control software for operation,
as described in the following sections. Timing resolutions between 300 ns and 200 ps have
been achieved with this technique, depending strongly on the network capabilities. This
“PTP
hardware
timestamping” operation has not been tested on current hardware or
firmware.
10.6.2 PTP Stack Software: LinuxPTP
The PTP stack software manages the clock adjustments based on PTP messages exchanged
between the PTP nodes. The PTP PHY is supported by the open source software
LinuxPTP
9
, which is installed in the PZ-TIO’s Ubuntu 18 operating system. To work with
the PTP PHY, LinuxPTP needs specific kernel drivers and firmware, which is part of the
boot files provided for the PTP variant. (The standard boot files will let LinuxPTP
communicate only with the built-in Zynq PTP functions).
To start LinuxPTP in the foreground with status messages, type
ptp4l -i eth0 -m –q
in the PZ-TIO terminal session. If another PTP node is present in the network, the PZ-TIO
will try to link with it. The master clock node is determined automatically; for a defined
setup we recommend start ptp4l in one PZ-TIO as shown above and wait until it assigns
itself as the clock master, then start ptp4l in the second/third PZ-TIO with the added
–s
option to force it to clock slave mode.
It is often more convenient to start LinuxPTP as a service, or a background task and the
PZ-TIO data acquisition as a foreground task. Please see the LinuxPTP documentation for
the various options. As long as LinuxPTP is running, the clock generated by the PTP PHY
is synchronized to the network’s PTP master. The Linux system clock can be additionally
synchronized to the PTP clock with a second LinuxPTP utility, phx2sys.
10.6.3 PTP PHY Control Software: ptp-mii-tool
The secondary Ethernet PHY with PTP function has a number of registers that specify
additional functions, such as the frequency of the generated PTP clock and the timing of
GPO triggers. To program these registers, XIA adapted the
mii-tool
Linux utility to
specifically communicate with the PTP PHY. The adapted program,
ptp-mii-tool
, is
invoked by typing:
ptp-mii-tool
print basic status information, including PTP time
ptp-mii-tool –v
print more status information
ptp-mii-tool –v -v
print even more status information
ptp-mii-tool –s
toggle on/off synchronous Ethernet mode (PTP clock
derived from upstream Ethernet device)
ptp-mii-tool –p
turn on the pulse per second (PPS) signal on the
PZ-TIO’s PPS output 3 seconds from
“now”
ptp-mii-tool –t
print current PTP and system time
ptp-mii-tool –-enable=TON –-duration=DUR
create PTP triggers at PTP time TON and TON+DUR
9
http://linuxptp.sourceforge.net/