Hello Toradex Community,
I am working on a point-to-point PTP synchronization setup between two NXP i.MX95 19x19 Verdin EVK boards running a PREEMPT_RT kernel (6.12.34-rt11) built from the NXP Yocto walnascar BSP. IEEE 1588 synchronization using default.cfg works correctly between the two boards. However when I attempt to use 802.1AS (gPTP) both boards become grandmaster and synchronization fails.
Master Config
root@imx95-19x19-verdin:\~# cat /etc/linuxptp/gPTP.cfg
#
# 802.1AS example configuration containing those attributes which
# differ from the defaults. See the file, default.cfg, for the
# complete list of available options.
#
\[global\]
gmCapable 1
priority1 124
priority2 124
logAnnounceInterval 0
logSyncInterval -3
syncReceiptTimeout 3
neighborPropDelayThresh 800
min_neighbor_prop_delay -20000000
assume_two_step 1
path_trace_enabled 1
follow_up_info 1
transportSpecific 0x1
ptp_dst_mac 01:80:C2:00:00:0E
network_transport L2
delay_mechanism P2P
tx_timestamp_timeout 100
root@imx95-19x19-verdin:\~# phc2sys -s CLOCK_REALTIME -c /dev/ptp0 -O 37 -m > /var/log/phc2sys.log 2>&1 & ptp4l -i eth0 -p /dev/ptp0 -f /etc/linuxptp/gPTP.cfg -m > /var/log/ptp4l.log 2>&1 &
\[1\] 5851
\[2\] 5852
root@imx95-19x19-verdin:\~# ptp4l -i eth0 -p /dev/ptp0 -f /etc/linuxptp/gPTP.cfg -m > /var/log/ptp4l.log 2>&1 & phc2sys -s /dev/ptp0 -c CLOCK_REALTIME -O 37 -m > /var/log/phc2sys.log 2>&1 &^C
root@imx95-19x19-verdin:\~# tail /var/log/ptp4l.log
ptp4l\[422808.421\]: selected /dev/ptp0 as PTP clock
ptp4l\[422808.464\]: port 1 (eth0): INITIALIZING to LISTENING on INIT_COMPLETE
ptp4l\[422808.465\]: port 0 (/var/run/ptp4l): INITIALIZING to LISTENING on INIT_COMPLETE
ptp4l\[422808.465\]: port 0 (/var/run/ptp4lro): INITIALIZING to LISTENING on INIT_COMPLETE
ptp4l\[422811.772\]: port 1 (eth0): LISTENING to MASTER on ANNOUNCE_RECEIPT_TIMEOUT_EXPIRES
ptp4l\[422811.773\]: selected local clock 160716.fffe.bf1d7a as best master
ptp4l\[422811.773\]: port 1 (eth0): assuming the grand master role
Slave Config
root@imx95-19x19-verdin:\~# cat /etc/linuxptp/gPTP.cfg
#
# 802.1AS example configuration containing those attributes which
# differ from the defaults. See the file, default.cfg, for the
# complete list of available options.
#
\[global\]
gmCapable 0
priority1 248
priority2 248
logAnnounceInterval 0
logSyncInterval -3
syncReceiptTimeout 3
neighborPropDelayThresh 800
min_neighbor_prop_delay -20000000
assume_two_step 1
path_trace_enabled 1
follow_up_info 1
transportSpecific 0x1
ptp_dst_mac 01:80:C2:00:00:0E
network_transport L2
delay_mechanism P2P
tx_timestamp_timeout 100
root@imx95-19x19-verdin:\~# ptp4l -i eth0 -p /dev/ptp0 -f /etc/linuxptp/gPTP.cfg -m > /var/log/ptp4l.log 2>&1 & phc2sys -s /dev/ptp0 -c CLOCK_REALTIME -O 37 -m > /var/log/phc2sys.log 2>&1 &
\[1\] 5946
\[2\] 5947
root@imx95-19x19-verdin:\~# tail /var/log/ptp4l.log
ptp4l\[422842.496\]: selected /dev/ptp0 as PTP clock
ptp4l\[422842.548\]: port 1 (eth0): INITIALIZING to LISTENING on INIT_COMPLETE
ptp4l\[422842.549\]: port 0 (/var/run/ptp4l): INITIALIZING to LISTENING on INIT_COMPLETE
ptp4l\[422842.549\]: port 0 (/var/run/ptp4lro): INITIALIZING to LISTENING on INIT_COMPLETE
ptp4l\[422846.297\]: port 1 (eth0): LISTENING to MASTER on ANNOUNCE_RECEIPT_TIMEOUT_EXPIRES
ptp4l\[422846.297\]: selected local clock da2eeb.fffe.1a6499 as best master
ptp4l\[422846.297\]: port 1 (eth0): assuming the grand master role