
First create ptp config file as follow for both board A and B:
cat ptp.cfg
[global]
#
# Run time options
#
logAnnounceInterval -4
logSyncInterval -4
logMinDelayReqInterval -4
logMinPdelayReqInterval -4
tx_timestamp_timeout 10
— Board A
sysctl -w net.ipv4.igmp_max_memberships=20
ifconfig eth0 up 192.168.0.100
ptp4l -f ./ptp.cfg -A -4 -H -m -i eth0
— Board B
sysctl -w net.ipv4.igmp_max_memberships=20
ifconfig eth0 up 192.168.0.101
ptp4l -f ./ptp.cfg -A -4 -H -m -i eth0
10. BC synchronization
For BC synchronization, run OC using the below command. It can be observed that the slave synchronizes with the master
with time.
$ ptp4l -i eth0 -p /dev/ptp0 -f /etc/ptp4l_default.cfg -m
If the board is used as BC with several PTP ports, the ‘-i ’ argument could point more interfaces. For running BC with
more than one interfaces, use the below command:
$ ptp4l -i eth0 -i eth1 -p /dev/ptp0 -f /etc/ptp4l_default.cfg –m
11. TC synchronization
For TC synchronization, set the two-step end-to end transparent clock configuration for SJA1105 on TC (LS1021ATSN).
Free running PTP clock is used for TC because the residence time is very short (about 2 ~ 3 μs as per test results). Even
if synchronization is implemented for TC, the improvement for residence time accuracy is still very small and can be
ignored.
$ sja1105-ptp-free-tc.sh
Run OC using the below command:
$ ptp4l -i eth0 -p /dev/ptp0 -2 -m
It can be observed that slave synchronizes its time with the master clock. If you use the '-l 7' argument to enable debug
message for slave, the correction field value of Sync and Delay_resp messages are displayed, which are the residence
time of Sync and Delay_req messages.
NXP Semiconductors
Industrial features
Open Industrial User Guide, Rev. 1.8, 05/2020
User's Guide
52 / 199