Other Parts Discussed in Thread: AM5718
Tool/software: Linux
We are not able to make PTP working with HSR PRU FW.
SDK: Linux RT SDK 5.02
PHY: dp83822
Here are the steps:
1. Configure HSR using this script (eth1 and eth2 are used):
ETH1="${1:-eth1}"
ETH2="${2:-eth2}"
IP="${3:-192.168.33.187}"
ifconfig ${ETH1} 0.0.0.0 down
ifconfig ${ETH2} 0.0.0.0 down
ifconfig ${ETH1} hw ether ${MAC}
ifconfig ${ETH2} hw ether ${MAC}
ethtool -K ${ETH1} hsr-rx-offload on
ethtool -K ${ETH2} hsr-rx-offload on
ifconfig ${ETH1} up
ifconfig ${ETH2} up
ip link add name hsr0 type hsr slave1 ${ETH1} slave2 ${ETH2} supervision 45 version 1
ethtool -C ${ETH1} rx-usecs 200
ethtool -C ${ETH2} rx-usecs 200
ethtool -C ${ETH1} adaptive-rx on
ethtool -C ${ETH2} adaptive-rx on
ifconfig hsr0 ${IP}
Observation: Able to perform HSR ping tests with other HSR devices (IDK, PC with redbox).
2. Connect a PTP master clock source using a redbox into the HSR ring. This PTP master clock is successfully used to sync our HW using GMAC and PRUETH interfaces.
3. Run PTP daemon using the command:
root@am57xx-evm:~# ptp4l -2 -P -f oc-hsr0.cfg -s -m
ptp4l[148.290]: selected /dev/ptp1 as PTP clock
ptp4l[148.350]: port 1 (eth1): INITIALIZING to LISTENING on INIT_COMPLETE
ptp4l[148.353]: port 0 (/var/run/ptp4l): INITIALIZING to LISTENING on INIT_COMPLETE
ptp4l[155.648]: port 1: announce timeout
ptp4l[155.651]: selected best master clock 0e7e20.fffe.41037c
ptp4l[162.039]: port 1: announce timeout
ptp4l[162.041]: selected best master clock 0e7e20.fffe.41037c
ptp4l[169.285]: port 1: announce timeout
ptp4l[169.287]: selected best master clock 0e7e20.fffe.41037c
ptp4l[176.997]: port 1: announce timeout
ptp4l[176.999]: selected best master clock 0e7e20.fffe.41037c
ptp4l[184.934]: port 1: announce timeout
ptp4l[184.936]: selected best master clock 0e7e20.fffe.41037c
ptp4l[191.462]: port 1: announce timeout
ptp4l[191.464]: selected best master clock 0e7e20.fffe.41037c
ptp4l[199.121]: port 1: announce timeout
ptp4l[199.122]: selected best master clock 0e7e20.fffe.41037c
root@am57xx-evm:~# cat oc-hsr0.cfg
[global]
tx_timestamp_timeout 10
logMinPdelayReqInterval -3
logSyncInterval -3
twoStepFlag 1
summary_interval 0
[eth1]
egressLatency 726
ingressLatency 186
Observation: Repeated "port 1: announce timeout" messages logged by PTP daemon.