Thanks for the response. Between what you wrote and some more spelunking, I think I finally understand. I'll summarize it here in case it's useful to others.
1. The PPS from the GPS that you feed into the PHC has nothing to do with the kernel PPS system. It is simply an input on one of the pins of the PHC. The PHC has the capability of timestamping such an input event (once programmed correctly). It timestamps the event with the PHC time. This timestamp then effectively gives you the offset between the GPS time and PHC time. Which can be used to train the PHC clock to match the GPS time. 2. The PPS that the PHC itself generates is fed into the kernel PPS system, and that works as usual whereby the kernel timestamps the PPS event with the timestamp from the sysclock. This gives you the offset between the PHC and sysclock, which can be used to train the sysclock to match the PHC (which is what phc2sys does). 3. The timestamp in 1 is done in hardware. So it yields a very accurate offset, allowing you to synchronize to the GPS time suitable for a grandmaster. The timestamp in 2 is subject to latency in the kernel, depending on how it timestamps the PPS (interrupts or polling). This offset is not as accurate as the former. On Mon, May 20, 2019 at 12:36 AM Richard Cochran <richardcoch...@gmail.com> wrote: > On Sun, May 19, 2019 at 09:22:58AM -0400, Sanjay Bhandari wrote: > > This seems to imply that the PPS timestamps are from the PHC. So one can > > compute the offset from the GPS time, and use that to discipline the PHC > > clock. > > > > I am a bit confused about this. Doesn't the PHC generate it's own > > PPS? > > Not necessarily. Not many PHCs have this capability. > > > Which is used when the -d option to phc2sys is used? > > That option is used when a PHC provides an interrupt to the kernel > once a second, generating events in the Linux kernel PPS subsystem. > > But this won't help you unless the PHC is already synchronized to your > GPS. That is problem you are trying to solve, right? > > > The phc2sys code seems to imply that the PPS timestamps for this are > > the system clock. Is this correct? > > Yes, but see above. > > > Then what does it mean to "feed the PPS from the GPS into the PHC"? > > Connect a copper wire from the GPS's PPS output pin to an input pin on > your PHC. > > HTH, > Richard >
_______________________________________________ Linuxptp-users mailing list Linuxptp-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linuxptp-users