Ohh... excellent, that answers a question from my next message :-) In fact I don't mind if I see the falling edges as well - only I should detect them somehow, by timing calculation if there's no other way, and ignore them in the servo policing loop.
As my application is tcpdump timestamping (rather than serving ptp), I'd prefer to use UTC for the timestamps. Oh wait. I'll be timestamping PTP traffic. So I'd better use TAI to have a common timescale inside the packets captured and in the timestamps :-) Allright, I'll probably just subtract a few seconds when setting the PHC's. Frank On 13 Feb 2018 at 8:05, Richard Cochran wrote: > On Tue, Feb 13, 2018 at 11:45:37AM +0100, Frantisek Rysanek wrote: > > Interestingly to me, your program seems to instruct the "slave PHC" > > (PPS master) to send the pulses every 2 seconds, rather than every 1 > > second... am I reading this correctly? > > > > int index = 0, perout = 2000000000; > > The reason for this is that that the i210 latches the time on both > rising and falling edges of the input signal. You can't program it > for rising edge only, for example. > > > I understand that the PHC's work in wall time, > > and I should be able to prime them with the system time, > > once on program startup (as I won't have a PPS master / PTP slave PHC > > in my system). It's just a matter of asking clock_gettime() of the > > system timebase, rather than a particular PHC, in your function > > synbc_settime(). > > Normally the PHC time scale is TAI, which is offset from the system's > UTC by an integer number of seconds. You *can* use whatever time > scale you want, but PTP nodes will expect TAI by default. > > 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-devel mailing list Linuxptp-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linuxptp-devel