Thank you for the suggestions. I have fixed the slow SPI access issue, made frequency adjust around 25ms. now it works fine. dump is like below, looks good. sync rate 16 pkts/sec, PI servo parameters: P 0.7 I 0.05.
ptp4l[196554.809]: rms 53 max 66 freq -87 +/- 20 delay 9052 +/- 0 ptp4l[196555.809]: rms 15 max 28 freq -88 +/- 6 delay 9052 +/- 0 ptp4l[196556.809]: rms 18 max 23 freq -64 +/- 7 delay 9052 +/- 0 ptp4l[196557.809]: rms 21 max 23 freq -44 +/- 4 delay 9052 +/- 0 ptp4l[196558.809]: rms 11 max 17 freq -38 +/- 1 delay 9053 +/- 0 ptp4l[196559.809]: rms 2 max 3 freq -42 +/- 2 delay 9053 +/- 0 ptp4l[196560.809]: rms 5 max 7 freq -48 +/- 2 delay 9052 +/- 0 ptp4l[196561.809]: rms 5 max 7 freq -52 +/- 1 delay 9052 +/- 0 ptp4l[196562.809]: rms 2 max 3 freq -52 +/- 1 delay 9052 +/- 0 ptp4l[196563.809]: rms 1 max 2 freq -53 +/- 1 delay 9053 +/- 0 ptp4l[196564.809]: rms 2 max 3 freq -51 +/- 1 delay 9052 +/- 0 ptp4l[196565.810]: rms 2 max 3 freq -49 +/- 1 delay 9052 +/- 0 ptp4l[196566.809]: rms 1 max 3 freq -48 +/- 1 delay 9052 +/- 0 ptp4l[196567.809]: rms 2 max 3 freq -50 +/- 1 delay 9052 +/- 0 ptp4l[196568.809]: rms 1 max 3 freq -51 +/- 1 delay 9052 +/- 1 ptp4l[196569.809]: rms 1 max 2 freq -50 +/- 1 delay 9053 +/- 0 ptp4l[196570.810]: rms 1 max 1 freq -50 +/- 1 delay 9052 +/- 0 ptp4l[196571.809]: rms 1 max 2 freq -51 +/- 1 delay 9052 +/- 0 ptp4l[196572.809]: rms 1 max 2 freq -51 +/- 1 delay 9052 +/- 0 ptp4l[196573.810]: rms 1 max 2 freq -50 +/- 1 delay 9052 +/- 0 ptp4l[196574.809]: rms 1 max 2 freq -50 +/- 1 delay 9052 +/- 0 ptp4l[196575.809]: rms 2 max 3 freq -49 +/- 1 delay 9052 +/- 0 ptp4l[196576.809]: rms 1 max 2 freq -49 +/- 1 delay 9052 +/- 0 ptp4l[196577.809]: rms 1 max 2 freq -50 +/- 1 delay 9052 +/- 0 ptp4l[196578.809]: rms 1 max 2 freq -51 +/- 1 delay 9053 +/- 0 ptp4l[196579.809]: rms 1 max 2 freq -51 +/- 1 delay 9052 +/- 0 ptp4l[196580.809]: rms 1 max 2 freq -50 +/- 1 delay 9052 +/- 0 ptp4l[196581.809]: rms 1 max 2 freq -50 +/- 1 delay 9052 +/- 0 ptp4l[196582.809]: rms 1 max 1 freq -50 +/- 1 delay 9052 +/- 0 ptp4l[196583.809]: rms 1 max 2 freq -49 +/- 1 delay 9052 +/- 0 ptp4l[196584.810]: rms 1 max 2 freq -50 +/- 0 delay 9052 +/- 0 ptp4l[196585.809]: rms 1 max 2 freq -50 +/- 1 delay 9052 +/- 0 ptp4l[196586.809]: rms 1 max 2 freq -50 +/- 1 delay 9052 +/- 0 ptp4l[196587.810]: rms 1 max 2 freq -50 +/- 1 delay 9052 +/- 0 ptp4l[196588.809]: rms 1 max 2 freq -50 +/- 1 delay 9052 +/- 0 ptp4l[196589.809]: rms 1 max 2 freq -50 +/- 1 delay 9052 +/- 1 ptp4l[196590.809]: rms 1 max 2 freq -50 +/- 1 delay 9052 +/- 0 ptp4l[196591.809]: rms 1 max 3 freq -51 +/- 1 delay 9053 +/- 0 Erez <erezge...@gmail.com> 于2022年9月4日周日 21:57写道: > > > On Sun, 4 Sept 2022 at 07:24, Hamilton Alex <alexzanda...@gmail.com> > wrote: > >> I think i have found the cause. >> my DPLL is accessed by SPI, though frequency adjustment is only writing >> to one register, it takes about 1.2 seconds! >> > > You can try increasing the intervals, "xxxSyncInterval". > It will take longer to synchronize, but you will be able to use your slow > SPI. > > Erez > > > >> so everytime after servo calculates the the ppb, it takes 1.2 seconds to >> make ppb change, during that time, the master offset >> has already shifted a lot. that's why the result is totally different >> from simulation. >> >> Thanks >> Alex >> >> Hamilton Alex <alexzanda...@gmail.com> 于2022年9月3日周六 12:54写道: >> >>> what i have verified is: >>> 1. Use syncE mode, so don't need to adjust frequency, use linuxptp to >>> adjust phase offset only, everything works fine. >>> 2. manually test frequency adjust function and it works well, let the >>> board run in freerun mode, can manually adjust frequency and phase to make >>> phase offset within +/- 10NS. >>> 3. use linuxptp servo for frequency adjustment, it can't converge. >>> >>> Richard Cochran <richardcoch...@gmail.com> 于2022年9月3日周六 10:57写道: >>> >>>> On Sat, Sep 03, 2022 at 08:09:14AM +0800, Hamilton Alex wrote: >>>> >>>> > I didn't use custom vendor linux driver, Zarlink provided steps to >>>> adjust >>>> > its DPLL frequency and I implement >>>> > it by my self. >>>> >>>> Oh, well, in that case, probably your own custom driver has a bug. >>>> >>>> Good luck, >>>> Richard >>>> >>> _______________________________________________ >> Linuxptp-devel mailing list >> linuxptp-de...@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/linuxptp-devel >> >
_______________________________________________ Linuxptp-users mailing list Linuxptp-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linuxptp-users