[ntp:questions] Making ntpd tweak a TCXO

Hal Murray hmurray at megapathdsl.net
Fri Jan 29 20:32:58 UTC 2016

mark at hau.nz said:
> The A/D is a sigma-delta type where you set the output sample rate and it
> runs autonomously (locked to the input clock of course).  "Sample ready" is
> indicated by a falling edge on the SPI MISO line, and I am bitbanging the
> serial interface from the PRU ...

I'd expect some sort of data ready signal but maybe they don't need one if 
you are running it with a clock derived from your main CPU clock.

 > What I am unclear on is how to take that timer snapshot/timestamp, and
> convert it into wall-clock time.  The latter is only available from inside
> the OS (Linux).  I do not understand, practically speaking, how these single
> instants in time are carried across the boundary from the realtime world
> into the nondeterministic world of the OS.  Presumably this is what the
> Linux PPS code does? 

The PPS code just grabs a time stamp on an interrupt.  There is an RFC on the 
API.  It's running on the main CPU rather than a PPU.  It's not cycle 
accurate, just as good as you can get using interrupts.

You can get more accurate results if you have a counter/timer that can 
capture the counter on the edge that makes the interrupt.  I don't know if 
the ARM PPS code does that.

These are my opinions.  I hate spam.

More information about the questions mailing list