Hi,

I am facing an issue (clockcheck: clock jumped forward or running faster than 
expected!) when I try to sync the system clock with the phc clock:

Below are the ethtool -T of both my hardware:
Slave(PC):
ime stamping parameters for enp4s0:
Capabilities:
        hardware-transmit     (SOF_TIMESTAMPING_TX_HARDWARE)
        software-transmit     (SOF_TIMESTAMPING_TX_SOFTWARE)
        hardware-receive      (SOF_TIMESTAMPING_RX_HARDWARE)
        software-receive      (SOF_TIMESTAMPING_RX_SOFTWARE)
        software-system-clock (SOF_TIMESTAMPING_SOFTWARE)
        hardware-raw-clock    (SOF_TIMESTAMPING_RAW_HARDWARE)
PTP Hardware Clock: 0
Hardware Transmit Timestamp Modes:
        off                   (HWTSTAMP_TX_OFF)
        on                    (HWTSTAMP_TX_ON)
Hardware Receive Filter Modes:
        none                  (HWTSTAMP_FILTER_NONE)
        all                   (HWTSTAMP_FILTER_ALL)

Master(Nvidia Xavier):
Time stamping parameters for enp4s0:
Capabilities:
        hardware-transmit     (SOF_TIMESTAMPING_TX_HARDWARE)
        software-transmit     (SOF_TIMESTAMPING_TX_SOFTWARE)
        hardware-receive      (SOF_TIMESTAMPING_RX_HARDWARE)
        software-receive      (SOF_TIMESTAMPING_RX_SOFTWARE)
        software-system-clock (SOF_TIMESTAMPING_SOFTWARE)
        hardware-raw-clock    (SOF_TIMESTAMPING_RAW_HARDWARE)
PTP Hardware Clock: 0
Hardware Transmit Timestamp Modes:
        off                   (HWTSTAMP_TX_OFF)
        on                    (HWTSTAMP_TX_ON)
Hardware Receive Filter Modes:
        none                            (HWTSTAMP_FILTER_NONE)
        ptpv1-l4-sync             (HWTSTAMP_FILTER_PTP_V1_L4_SYNC)
        ptpv1-l4-delay-req    (HWTSTAMP_FILTER_PTP_V1_L4_DELAY_REQ)
        ptpv2-l4-sync             (HWTSTAMP_FILTER_PTP_V2_L4_SYNC)
        ptpv2-l4-delay-req    (HWTSTAMP_FILTER_PTP_V2_L4_DELAY_REQ)
        ptpv2-l2-sync             (HWTSTAMP_FILTER_PTP_V2_L2_SYNC)
        ptpv2-l2-delay-req    (HWTSTAMP_FILTER_PTP_V2_L2_DELAY_REQ)
        ptpv2-event               (HWTSTAMP_FILTER_PTP_V2_EVENT)

the ptp4l cmd is running fine on both sides:
ptp4l[251039.089]: selected /dev/ptp0 as PTP clock
ptp4l[251039.090]: port 1: INITIALIZING to LISTENING on INIT_COMPLETE
ptp4l[251039.090]: port 0: INITIALIZING to LISTENING on INIT_COMPLETE
ptp4l[251045.327]: selected local clock 7085c2.fffe.f7f1e9 as best master
ptp4l[251052.602]: selected local clock 7085c2.fffe.f7f1e9 as best master
ptp4l[251058.243]: port 1: new foreign master 00044b.fffe.cbaa5f-1
ptp4l[251059.985]: selected local clock 7085c2.fffe.f7f1e9 as best master
ptp4l[251062.688]: selected best master clock 00044b.fffe.cbaa5f
ptp4l[251062.688]: port 1: LISTENING to UNCALIBRATED on RS_SLAVE
ptp4l[251064.910]: master offset -4494031274 s0 freq      +0 path delay      
1396
ptp4l[251066.021]: master offset -4494010664 s1 freq  +18546 path delay      
-382
ptp4l[251067.132]: master offset      -8981 s2 freq   +9565 path delay      -382
ptp4l[251067.132]: port 1: UNCALIBRATED to SLAVE on MASTER_CLOCK_SELECTED
ptp4l[251068.243]: master offset      -2603 s2 freq  +13249 path delay      1396
ptp4l[251069.354]: master offset       1595 s2 freq  +16666 path delay      1477
ptp4l[251070.466]: master offset        342 s2 freq  +15892 path delay      3156
ptp4l[251071.577]: master offset       1682 s2 freq  +17334 path delay      3051
ptp4l[251072.688]: master offset       1148 s2 freq  +17305 path delay      3195
ptp4l[251073.800]: master offset        779 s2 freq  +17280 path delay      3255
ptp4l[251074.911]: master offset        433 s2 freq  +17168 path delay      3255
ptp4l[251076.022]: master offset        268 s2 freq  +17133 path delay      3302
ptp4l[251077.133]: master offset         74 s2 freq  +17019 path delay      3360
ptp4l[251078.245]: master offset         -3 s2 freq  +16965 path delay      3379
ptp4l[251079.356]: master offset         78 s2 freq  +17045 path delay      3379
ptp4l[251080.467]: master offset         26 s2 freq  +17016 path delay      3393
ptp4l[251081.578]: master offset         -3 s2 freq  +16995 path delay      3393
ptp4l[251082.690]: master offset        -15 s2 freq  +16982 path delay      3385
ptp4l[251083.801]: master offset        -14 s2 freq  +16978 path delay      3385
ptp4l[251084.912]: master offset        130 s2 freq  +17118 path delay      3374
ptp4l[251086.023]: master offset        -36 s2 freq  +16991 path delay      3374
ptp4l[251087.135]: master offset        -32 s2 freq  +16984 path delay      3369
ptp4l[251088.245]: master offset        -16 s2 freq  +16991 path delay      3360
ptp4l[251089.357]: master offset         15 s2 freq  +17017 path delay      3360
ptp4l[251090.468]: master offset        -15 s2 freq  +16992 path delay      3351
ptp4l[251091.580]: master offset        129 s2 freq  +17131 path delay      3351
ptp4l[251092.691]: master offset       -125 s2 freq  +16916 path delay      3361
ptp4l[251093.802]: master offset        -12 s2 freq  +16991 path delay      3361
ptp4l[251094.913]: master offset         14 s2 freq  +17014 path delay      3351
...

However the phc2sys is giving me the following error on the slave side, where 
the phc clock took a big jump:
$ sudo ./phc2sys -s /dev/ptp0 -c CLOCK_REALTIME -w -m
phc2sys[251211.780]: CLOCK_REALTIME phc offset 39434682283 s0 freq    -801 
delay   7410
phc2sys[251212.781]: CLOCK_REALTIME phc offset 39434724040 s1 freq  +40945 
delay   7410
phc2sys[251213.781]: CLOCK_REALTIME phc offset 39432354542 s2 freq +100000000 
delay   7420
phc2sys[251214.781]: CLOCK_REALTIME phc offset 39321261386 s2 freq +100000000 
delay   6669
phc2sys[251215.782]: CLOCK_REALTIME phc offset 39210184587 s2 freq +100000000 
delay   6669
phc2sys[251216.782]: CLOCK_REALTIME phc offset 39099103944 s2 freq +100000000 
delay   6678
phc2sys[251217.782]: CLOCK_REALTIME phc offset 38988025910 s2 freq +100000000 
delay   6669
phc2sys[251218.782]: CLOCK_REALTIME phc offset 38876945714 s2 freq +100000000 
delay   6678
phc2sys[251219.782]: CLOCK_REALTIME phc offset 38765868467 s2 freq +100000000 
delay   6678
phc2sys[251220.782]: CLOCK_REALTIME phc offset 38654770437 s2 freq +100000000 
delay   6669
phc2sys[251221.783]: CLOCK_REALTIME phc offset 38543684871 s2 freq +100000000 
delay   6678
phc2sys[251222.783]: CLOCK_REALTIME phc offset 38432605630 s2 freq +100000000 
delay   6678
phc2sys[251223.783]: CLOCK_REALTIME phc offset 38321527331 s2 freq +100000000 
delay   6678
phc2sys[251224.783]: CLOCK_REALTIME phc offset 38210450947 s2 freq +100000000 
delay   6678
phc2sys[251225.783]: CLOCK_REALTIME phc offset 38099370862 s2 freq +100000000 
delay   6669
phc2sys[251226.783]: CLOCK_REALTIME phc offset 37988290771 s2 freq +100000000 
delay   6669
phc2sys[251227.783]: CLOCK_REALTIME phc offset 37877210589 s2 freq +100000000 
delay   6678
phc2sys[251228.784]: CLOCK_REALTIME phc offset 37766135304 s2 freq +100000000 
delay   6669
phc2sys[251229.784]: CLOCK_REALTIME phc offset 37655031231 s2 freq +100000000 
delay   6660
phc2sys[251230.784]: CLOCK_REALTIME phc offset 37543917265 s2 freq +100000000 
delay   6678
phc2sys[251231.785]: CLOCK_REALTIME phc offset 37432837073 s2 freq +100000000 
delay   6678
phc2sys[251232.785]: CLOCK_REALTIME phc offset 37321741444 s2 freq +100000000 
delay   6669
phc2sys[251233.785]: CLOCK_REALTIME phc offset 37210655961 s2 freq +100000000 
delay   6678
phc2sys[251234.785]: CLOCK_REALTIME phc offset 37099579705 s2 freq +100000000 
delay   6678
phc2sys[251235.785]: CLOCK_REALTIME phc offset 36988499222 s2 freq +100000000 
delay   6678
phc2sys[251236.785]: CLOCK_REALTIME phc offset 36877422495 s2 freq +100000000 
delay   6669
phc2sys[251237.786]: CLOCK_REALTIME phc offset 36766344850 s2 freq +100000000 
delay   6678
phc2sys[251238.786]: CLOCK_REALTIME phc offset 36655236687 s2 freq +100000000 
delay   6669
phc2sys[251239.786]: CLOCK_REALTIME phc offset 36544157584 s2 freq +100000000 
delay   6678
phc2sys[251240.787]: CLOCK_REALTIME phc offset 36433045318 s2 freq +100000000 
delay   6678
phc2sys[251241.787]: CLOCK_REALTIME phc offset 36321949422 s2 freq +100000000 
delay   6669
phc2sys[251242.787]: CLOCK_REALTIME phc offset 36210862833 s2 freq +100000000 
delay   6669
phc2sys[251243.787]: CLOCK_REALTIME phc offset 36099784588 s2 freq +100000000 
delay   6669
phc2sys[251244.787]: CLOCK_REALTIME phc offset 35988703421 s2 freq +100000000 
delay   6678
phc2sys[251245.788]: clockcheck: clock jumped forward or running faster than 
expected! <-- the error
phc2sys[251245.788]: CLOCK_REALTIME phc offset 39378909599 s0 freq +100000000 
delay   6678
phc2sys[251246.788]: CLOCK_REALTIME phc offset 39267830987 s2 freq -100000000 
delay   6669
phc2sys[251247.793]: CLOCK_REALTIME phc offset 39359279176 s2 freq +100000000 
delay   8162
phc2sys[251248.793]: CLOCK_REALTIME phc offset 39248204685 s2 freq +100000000 
delay   6678
phc2sys[251248.847]: CLOCK_REALTIME phc offset 39242213151 s2 freq +100000000 
delay   6678

Is the a HW limitation ? Any recommendation on how to fix this issue?

Thanks,
Wen Bin Leong


_______________________________________________
Linuxptp-users mailing list
Linuxptp-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxptp-users

Reply via email to