On Tue, Sep 06, 2022 at 08:20:48PM +0000, Brian Lilly wrote: > Some background: > > I'm building a Petalinux image (Xilinx' Yocto project based build system > thing) that includes linuxPTP. I have it starting as a service, and > subsequently, I also have phc2sys running to synchronize the system clock to > the clock from eth0 and my PTP master. This seems to be working, to some > degree. > > Problem is that the behavior is erratic, to say the least. > > For example: > phc2sys[46.726]: CLOCK_REALTIME phc offset -93776 s2 freq +32031 delay > 1020 > phc2sys[47.727]: CLOCK_REALTIME phc offset -83999 s2 freq +32168 delay > 1020 > phc2sys[48.727]: CLOCK_REALTIME phc offset -119501 s2 freq +27423 delay > 1020 > phc2sys[49.727]: CLOCK_REALTIME phc offset -479032 s2 freq -13320 delay > 1020 > phc2sys[50.727]: CLOCK_REALTIME phc offset -1923240 s2 freq -176973 delay > 1020 > phc2sys[51.727]: CLOCK_REALTIME phc offset -3395674 s2 freq -358174 delay > 1020 > phc2sys[52.727]: CLOCK_REALTIME phc offset -3394547 s2 freq -392006 delay > 1010 > phc2sys[53.728]: CLOCK_REALTIME phc offset -2828314 s2 freq -363666 delay > 1010 > phc2sys[54.728]: CLOCK_REALTIME phc offset -2187172 s2 freq -321424 delay > 1020 > phc2sys[55.728]: CLOCK_REALTIME phc offset -1661911 s2 freq -285517 delay > 1020
Are you sure no other program is fiddling with CLOCK_REALTIME? ntpd? chrony? > ExecStart=/usr/sbin/phc2sys -w -s eth0 -c CLOCK_REALTIME -P 0.1 -I 0.01 -m Maybe weights are making PI controller unstable? Defaults for SW time stamping are: #define SWTS_KP_SCALE 0.1 #define SWTS_KI_SCALE 0.001 Thanks, Richard _______________________________________________ Linuxptp-users mailing list Linuxptp-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linuxptp-users