Thank you for helping me. I'm going to reiterate to make sure I'm
understanding correctly. I need to physically connect the 1 PPS output pin
to an input pin on my network card. Then I need to write a program that
reads the 1 PPS from the PHC and sets the PHC clock to match the GPS time
(using testptp.c as an example). Then I need to use phc2sys to synchronize
the system clock to the PHC. Is that correct?

Does this mean I don't need an NTP server like ntpd or chrony? I've read
about other configurations where people feed the PPS and NMEA sentences
from the GPS into gpsd, which then feeds the time to ntpd/chrony to set the
Linux system clock, which is then used to synchronize the PHC using
phc2sys. Your method is skipping NTP altogether. Wouldn't an NTP server
more smoothly adjust the system clock? Or does PTP handle that, too?

On Mon, Aug 13, 2018 at 9:55 AM Richard Cochran <richardcoch...@gmail.com>
wrote:

> On Mon, Aug 13, 2018 at 09:43:13AM -0500, Keith Squier wrote:
> > How do I feed the 1 PPS to the PHC? Do I use phc2sys?
>
> No, you must physically connect the output pin of the GPS to the input
> pin of your MAC.  (Of course, make sure the signals are compatible!)
>
> > What API do I use to
> > read the 1 PPS time stamps from the PHC and set the PHC?
>
> It is the same Linux PTP Hardware Clock API we use for everything.
> See the testptp.c program in the Linux kernel sources.
>
> > Instead of feeding the PPS to the PHC, reading the time stamps from the
> > PHC, and then setting the PHC to match the GPS time, wouldn't it be
> better
> > to have a separate program that reads the PPS and time from the GPS and
> > sets the PHC?
>
> This is exactly what I am suggesting.
>
> > Of course, then I wonder what the point of the PPS is if I
> > have the time from the GPS.
>
> If you don't use the PPS, then the PHC won't be synchronized to the
> GPS.  You want to be a GM, right?
>
> > Is it really this difficult to synchronize a system to a GPS receiver, or
> > am I overthinking things?
>
> Yes, it is difficult, but it isn't rocket science either.
>
> HTH,
> Richard
>
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Linuxptp-users mailing list
Linuxptp-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxptp-users

Reply via email to