phc2sys Waiting for ptp4l...

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

phc2sys Waiting for ptp4l...

Jump to solution
5,680 Views
deepanrajanbara
Contributor IV

Hi,

We are using ptp4l in our Ls1046a based custom board and it is able to run in our system and the 1588 pulse is in sync with the system. But when we run phc2sys -s fm1-mac3 -w command for the clock to get the UTC offset from the ptp4l automatically. we are observing "Waiting for ptp4l..." log continuously. the phc2sys is stuck in this state for long time. please help us resolve this issue.

Thank you,

Deepanraj.A

0 Kudos
1 Solution
5,618 Views
yipingwang
NXP TechSupport
NXP TechSupport
The config file is from upstream linuxptp git repo: git://git.code.sf.net/p/linuxptp/code $ ls configs/ automotive-master.cfg default.cfg G.8265.1.cfg G.8275.2.cfg P2P-TC.cfg ts2phc-generic.cfg UNICAST-MASTER.cfg automotive-slave.cfg E2E-TC.cfg G.8275.1.cfg gPTP.cfg snmpd.conf ts2phc-TC.cfg UNICAST-SLAVE.cfg

View solution in original post

0 Kudos
5 Replies
5,655 Views
yipingwang
NXP TechSupport
NXP TechSupport

I cannot reproduce your issue, when you observe this issue, could you please check ptp4l is running correctly and keeps synchronizing with master?

 

Following is my testing log for your reference:

// console1: run ptp4l first to sync your 1588 clock to master # root@ls1046ardb:~/linuxptp# ./ptp4l -i fm1-mac3 -s -m ...

ptp4l[1382.218]: master offset         -8 s2 freq  +16086 path delay      1810

ptp4l[1383.218]: master offset         25 s2 freq  +16116 path delay      1809

ptp4l[1384.218]: master offset        -21 s2 freq  +16078 path delay      1809

ptp4l[1385.218]: master offset          3 s2 freq  +16096 path delay      1809

ptp4l[1386.218]: master offset          3 s2 freq  +16096 path delay      1809

ptp4l[1387.218]: master offset         -5 s2 freq  +16089 path delay      1809

 

// console2: then run phy2sys to sync system clock to 1588 clock root@ls1046ardb:~/linuxptp# ./phc2sys -s fm1-mac3 -w -m ...

phc2sys[1210.948]: CLOCK_REALTIME phc offset       -33 s2 freq  +16135 delay    400

phc2sys[1211.948]: CLOCK_REALTIME phc offset       -34 s2 freq  +16124 delay    440

phc2sys[1212.948]: CLOCK_REALTIME phc offset       -38 s2 freq  +16110 delay    440

phc2sys[1213.948]: CLOCK_REALTIME phc offset        -8 s2 freq  +16129 delay    440

phc2sys[1214.948]: CLOCK_REALTIME phc offset       -11 s2 freq  +16123 delay    440

phc2sys[1215.949]: CLOCK_REALTIME phc offset         8 s2 freq  +16139 delay    400

phc2sys[1216.949]: CLOCK_REALTIME phc offset       -15 s2 freq  +16118 delay    400

 

 

0 Kudos
5,647 Views
deepanrajanbara
Contributor IV

Hi

We are actually using g.8275.1 profile and when we run ptp4l we are not getting any isseue. But when we run phc2sys with -w option we are observing waiting for ptp4l . Please let us know, Do we need to do any configuration in ptp4l so that it will be in sync with the phc2sys

0 Kudos
5,634 Views
yipingwang
NXP TechSupport
NXP TechSupport

please find the  testing log for g.8275.1 profile

 

//master

root@ls1046ardb:~/linuxptp# ./ptp4l -i fm1-mac3 -f configs/G.8275.1.cfg -m

ptp4l[35564.353]: selected /dev/ptp0 as PTP clock

ptp4l[35564.384]: port 1 (fm1-mac3): INITIALIZING to LISTENING on INIT_COMPLETE

ptp4l[35564.384]: port 0 (/var/run/ptp4l): INITIALIZING to LISTENING on INIT_COMPLETE

ptp4l[35564.384]: port 0 (/var/run/ptp4lro): INITIALIZING to LISTENING on INIT_COMPLETE

ptp4l[35564.867]: port 1 (fm1-mac3): LISTENING to MASTER on ANNOUNCE_RECEIPT_TIMEOUT_EXPIRES

ptp4l[35564.867]: selected local clock 00e00c.fffe.001000 as best master

ptp4l[35564.867]: port 1 (fm1-mac3): assuming the grand master role

 

 

//slave console 1 for ptp4l

root@localhost:~/linuxptp# ./ptp4l -i fm1-mac3 -f configs/G.8275.1.cfg -m ...

ptp4l[34959.195]: rms    5 max   10 freq  -3067 +/-   8 delay  1296 +/-   1

ptp4l[34960.195]: rms    4 max    8 freq  -3064 +/-   7 delay  1298 +/-   1

ptp4l[34961.196]: rms    7 max   16 freq  -3078 +/-   9 delay  1300 +/-   2

ptp4l[34962.196]: rms    5 max   10 freq  -3071 +/-   9 delay  1296 +/-   1

ptp4l[34963.196]: rms    9 max   15 freq  -3059 +/-  12 delay  1300 +/-   1

 

 

//slave console2 for phy2sys

root@localhost:~/linuxptp# ./phc2sys -s fm1-mac3 -w -n 24 -m ...

phc2sys[35008.855]: CLOCK_REALTIME phc offset      -139 s2 freq   -3145 delay    440

phc2sys[35009.855]: CLOCK_REALTIME phc offset       -54 s2 freq   -3102 delay    400

phc2sys[35010.855]: CLOCK_REALTIME phc offset       -12 s2 freq   -3076 delay    400

phc2sys[35011.855]: CLOCK_REALTIME phc offset       -16 s2 freq   -3083 delay    440

phc2sys[35012.856]: CLOCK_REALTIME phc offset         6 s2 freq   -3066 delay    400

phc2sys[35013.856]: CLOCK_REALTIME phc offset       -17 s2 freq   -3087 delay    440

phc2sys[35014.856]: CLOCK_REALTIME phc offset         7 s2 freq   -3069 delay    440

 

0 Kudos
5,628 Views
deepanrajanbara
Contributor IV

Hi ,

Can you please share your config file so that we can also test with the same config file .

Thank you,

Deepanraj.A

0 Kudos
5,619 Views
yipingwang
NXP TechSupport
NXP TechSupport
The config file is from upstream linuxptp git repo: git://git.code.sf.net/p/linuxptp/code $ ls configs/ automotive-master.cfg default.cfg G.8265.1.cfg G.8275.2.cfg P2P-TC.cfg ts2phc-generic.cfg UNICAST-MASTER.cfg automotive-slave.cfg E2E-TC.cfg G.8275.1.cfg gPTP.cfg snmpd.conf ts2phc-TC.cfg UNICAST-SLAVE.cfg
0 Kudos