On 09/11/2017 02:21 PM, Richard Cochran wrote:
So, when all of the ports of a system are in the MASTER state, then the system is the Grand Master (GM). Normally, a GM has some global time reference like GPS, but if you don't have that, then you can tell phc2sys to use the GM's CLOCK_REALTIME in that case. phc2sys -a -r -r With two -r flags, the PHC's will be synchronized to the local Linux system clock. That is not exactly what you asked for, but maybe that will work for you? Thanks, Richard
Richard,
Thanks for the reply. We do have GPS but it's not used to regulate time (don't ask) only the frequency of the oscillator for one of the ports. E.G. When both ports are in PTP MASTER state it's possible that the oscillator rate for one of the PHC devices is actually being regulated via the GPS device. I just happen (pure luck, believe me) to have configured ptp4l such that when both PTP ports are in MASTER state phc2sys picks that GPS regulated port as the "master". So, while I could use the double "-r" thing I would have to modify phc2sys to make it aware of when the PTP port is being regulated by the GPS device and make the other PTP port and CLOCK_REALTIME by synchronized to that port anyway. Maybe someday I'll play around with that a bit. In the mean time I simply made a local modification to phc2sys to set the state of CLOCK_REALTIME such that it will be regulated under the conditions I described. It seems to work OK at this point but I completely expect something to jump up and bite me at some point. :-)
Mike ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ Linuxptp-devel mailing list Linuxptp-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linuxptp-devel