[ntp:questions] Fwd: Re: NetBSD GPS/PPS using 4.2.6p3
unruh
unruh at wormhole.physics.ubc.ca
Tue Aug 23 19:24:27 UTC 2011
On 2011-08-23, Dave Hart <davehart at gmail.com> wrote:
> On Tue, Aug 23, 2011 at 13:02, Thomas Laus <lausts at acm.org> wrote:
>> The capture / assert configuration options does
>> not select reading the leading or trailing edge of a PPS pulse, NTP
>> only reads timestamps to the on the leading edge and you may require
>> an inverter to swap polatity for NetBSD to read and sync to your PPS
>> pulse.
>
> Actually, fudge flag2 does determine whether ntpd refclocks using the
> common PPSAPI code (such as the atom/PPS, NMEA, and WWVB drivers)
> request timestamps for the assert or clear transition. See
> ntp_refclock.c refclock_params():
>
>
> /*
> * Solaris serial ports provide PPS pulse capture only on the
> * assert edge. FreeBSD serial ports provide capture on the
> * clear edge, while FreeBSD parallel ports provide capture
> * on the assert edge. Your mileage may vary.
> */
> if (mode & CLK_FLAG2)
> ap->pps_params.mode = PPS_TSFMT_TSPEC | PPS_CAPTURECLEAR;
> else
> ap->pps_params.mode = PPS_TSFMT_TSPEC | PPS_CAPTUREASSERT;
> if (time_pps_setparams(ap->handle, &ap->pps_params) < 0) {
> msyslog(LOG_ERR,
> "refclock_params: time_pps_setparams: %m");
> return (0);
> }
>
> As the comment notes, not all PPSAPI implementations can actually
> timestamp either edge. So it's not a limitation of ntpd, but of
> NetBSD's timepps.h, in your case.
But from his test, his system is labelling both edges.
>
> Cheers,
> Dave Hart
More information about the questions
mailing list