[LinuxPPS] Using LinuxPPS for Event Counting

Cirilo Bernardo cirilo.bernardo at gmail.com
Tue Sep 30 04:30:26 CEST 2008


On Tue, Sep 30, 2008 at 1:57 AM, Thiago Tiedtke <tiedtke at gmail.com> wrote:
> Hi everybody,
>
> I´m using the LinuxPPS with ntp to adjust a pc clock, using the DCD pin to
> catch the PPS signal from gps, and NMEA messages from a GPS Novatel DL4
> ...and this is task is ok, my question is:
>
> I can use the LinuxPPS to "poll" other type of events, e.g., a interruptor,
> or a photodiode ??
>
> By fact, i'm doing these tests, "catching" events with 1/1000s of
> duration...but without the regularity from signal PPS (e.g. at each 1 sec
> +/- 20ns) from a GPS device....
>
> This can be applied? What the "quality" of timestamp of each event?
>
> Thanks for any help
>
> Thiago Tiedtke dos Reis

The timestamp you have will be the kernel's estimate of time (based
primarily on internal clock, depends whatever frequency it is using)
plus the interrupt dispatch latency time.  You need to test this
yourself to see what values to expect, and these values may differ
based on CPU load.  If you use a hard real-time kernel then you can
get an exact idea on the expected variation due to latency.  There are
also more or less fixed length delays due to signal propagation and
code execution times (if you need to tie the events to some absolute
time rather than just measuring the time intervals precisely).

- Cirilo



More information about the LinuxPPS mailing list