I corrected for the frequency offset and tried to run phc2sys to sync my
ptp clock with real time clock. There's something unusual I noticed: the
corrections being passed to the driver were pushing it in wrong
direction, for instance, my ptp clock was ahead of the real time clock,
so going by the do_phc_loop in phc2sys:
offset = (dst1+interval/2) - src (I simplified by not splitting nsec and
sec)
since src is ptp here, the offset should be -ve and hence the ppb
At this point I see that the sign of ppb sent to driver in update_clock
is reversed, so it will push the driver to speed up the ptp clock
further. This causes the ppb and hence the max adjustments to saturate
after some cycles.
Is there something I'm missing in how phc2sys is working ? I don't doubt
the driver and the servo code since it's shared with ptp4l, but I'm not
sure if I get the above correctly
Best Regards,
Makarand
Post by Makarand KulkarniPost by Richard CochranIf you don't believe me, just try running phc2sys with the calls to
clock_adjtime() disabled (commented out). By plotting the rate of
change of the offset, you can figure the frequency offset. If this is
more than about 200 PPM (that is, 0.02%) then you probably have a bug
in your driver, or maybe your board's clock frequencies are not what
you think they are...
I believe you :) the board's clock frequency is not what it says
Post by Richard CochranIn addition, ensure that your adjust frequency ptp call is not continuously applying the ppb at each call to the current rate, but to the base rate. The adjfreq call is a ppb adjustment from the nominal clock frequency, not from the current clock frequency. I believe that could be the result of what you see here.
yes, I got it clarified with you guys earlier on a different mail thread
------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60134791&iu=/4140/ostg.clktrk
_______________________________________________
Linuxptp-devel mailing list
https://lists.sourceforge.net/lists/listinfo/linuxptp-devel