This is on a Kria K26 SOM, though granted, it's the development board KV260 
version and not the production SOM.  I can test on a production SOM if that's 
an issue.

Here's the ptp4l entries in syslog:
https://pastebin.com/54dqNgkB

ntpd is stopped, chrony isn't installed.

The output is the same when changing phc2sys start is:

ExecStart=/usr/sbin/phc2sys -w -s eth0 -c CLOCK_REALTIME -S 1 -u 60

Brian Lilly / Senior Firmware Engineer 
Email: bri...@neuralynx.com

-----Original Message-----
From: Richard Cochran <richardcoch...@gmail.com> 
Sent: Thursday, September 8, 2022 3:08 PM
To: Brian Lilly <bri...@neuralynx.com>
Cc: linuxptp-users@lists.sourceforge.net
Subject: Re: [Linuxptp-users] Help with what is undoubtedly a problem with my 
configuration

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

Reply via email to