[time-nuts] ARM boards for low-cost GPSDOs

Michael Tharp gxti at partiallystapled.com
Thu Apr 10 18:33:18 EDT 2014


On 04/10/2014 05:38 PM, Hal Murray wrote:
>
> Does anybody have a favorite low-cost ARM board?  I'm looking for a simple
> Arduino like setup rather than something that runs Linux.  The idea is to get
> 32 bit counters so a bunch of the recent discussion can be ingnored.
>

Another endorsement for a STM32 Discovery board from me. The F3 and F4 
ones have plenty of peripherals to play with and they're cheap as dirt.

For a concrete example of how the kind of PPS capture that's being 
discussed would pan out on STM32, here's mine:

https://github.com/mtharp/laureline-firmware/blob/master/src/ppscapture.c

The timers are 16-bit but I extend it to 64 bits in software. When the 
timer rolls over I add 65536 to the software variable "mono_epoch". At 
both the rollover and at the half-way mark I poll the timer-capture 
peripheral to see if it captured a PPS. It's polled twice per period to 
ensure that I can disambiguate whether the captured value came from the 
current period or the previous one. The result is a 64-bit timestamp 
from the free-running clock, and it's completely glitch-free and not 
affected by interrupt latency in any way.

The same timer is also used as the base for the UTC clock, which is a 
software-disciplined clock like you'd find in any OS kernel. That makes 
it easy to compare the phase of the PPS captured to the nearest UTC 
second and feed into the PLL. Not as interesting for a GPSDO where you 
need to actually steer a hardware oscillator, but useful nonetheless.


More information about the time-nuts mailing list