[time-nuts] Raspberry Pi NTP server

Matthias Welwarsky time-nuts at welwarsky.de
Sun Jul 12 11:51:47 UTC 2020


On Sonntag, 12. Juli 2020 12:35:54 CEST Trent Piepho wrote:
> That interrupt line does not go straight to the processor.  It goes to
> an interrupt controller, such as the ARM GIC or a proprietary
> controller.  The AM3358 uses a TI controller.  This controller deals
> with priority of interrupts, masking, level/edge triggering (this is
> about how the interrupt line from the UART or GPIO controller to the
> INTC acts, not about how a GPIO will trigger an interrupt), steering
> of interrupts to multiple CPU cores, and finally raising the interrupt
> line in a CPU core.  Which might not happen immediately if another
> interrupt is already executing.  The interrupt controller has its own
> clock domain too, running at maybe 1/2 the processor's frequency.  It
> takes a non-zero and non-constant amount of time for the INTC to pass
> on the interrupt.

If you think about using an AM3358, there's zero reason to use a GPIO for PPS 
input. There are much better options, like the gptimer inputs or the eCAP 
engine, which runs on a 200MHz clock and is therefore able to create much more 
accurate timestamps.

GPIO is especially unsuited for fast response, since they typically have 
multiple sources of jitter and latency. One reason is that there's only one 
interrupt line per GPIO bank, each bank grouping 32 individual i/o lines. That 
means a lot of code to run to figure out the actual GPIO, plus dealing with 
level vs. edge triggering on the OS level etc.

You definitely want a timestamping mechanism that is hardware supported.

BR,
Matthias






More information about the Time-nuts_lists.febo.com mailing list