[time-nuts] Good clean-up oscillators

Achim Gratz Stromeko at nexgo.de
Thu Jan 24 20:48:46 UTC 2019


Poul-Henning Kamp writes:
> The TODO point is to take a RaspBerry Pi, run a tight loop with all
> which wiggles a GPIO pin with all interrupts disabled, and measure
> the phase noise.

You'll quickly find out that the ARM part of the BCM SoC is not fully in
command.  The VC4 GPU is calling all the shots and can freeze the ARM
cores whenever it feels like, which by default it does every half second
to re-tune the SDRAM interface.

> It's going to wander all over the place, because it comes up from
> a 1 cent Xtal, but the phase noise will be from the on-chip resonator,
> whatever that is.

Now, _that_ you can have more easily: you can output the crystal or one
of the unused PLL outputs to the GPIO header (one of the three GPIO_GCLK
pins), you can use the hardware PWM to generate a lower frequency signal
that is directly clocked by the crystal without any CPU intervention or
you can use one of the HDMI/DSI clocks.

The 19.2MHz crystal in question is made by AEL on all the boards I have
(mostly from RS, but also one from element14).  I haven't been able to
find a datasheet online and it quite certainly isn't an AT cut.  The
temperature dependence is downward parabolic with the vertex around
60°C.  I use the CPU to ovenize the crystal and regulate it to within
0.2K of the turnover point, which greatly reduces any load and
environmental effects.  All crystals have been a few ppm slow.  The
drift has been relatively fast and positive in the first few months, but
settles to something around single digit ppb/day (almost zero drift on
my oldest system).  As you thought, the system clock is rather noisy,
and wanders around about ±5ppb after drift elimination.  All this is
measured through NTP which gets steered via a PPS driven from a GPS
module.

I also have two TinkerBoard, those have a 24Mhz crystal for the system
clock and also 5 PLL apparently.  Not sure how to get any of those
clocks out to GPIO and if one of them is unused like on the rasPi.  The
turnover point is even higher at around 70°C so you'll need to move the
thermal throttling limits a bit, but then these can be ovenized with the
CPU cores as well.  They run around 10ppm fast and also drift positively
with a very noticeable retrace if the temperature changes abruptly.  But
the noise (after removing drift and residual environmental influences)
is under 1ppb.

> If it's any good, buy a Pi-Zero, rip out the X-tal and feed it
> from your LPRO instead.  If you only need one GPIO pin, I doubt
> the exact clock frequency matters much.

I still want to use a GPS timing module and feed the 19.2MHz in from
there.  However, I'd rather lock the quartz from the external reference
so when that input fails the quartz will at least keep the system
running.  It _should_ be possible to capacitively couple the reference
to the board, but I haven't tried that yet.

> (The BeagleBone is interesting too, since the PRU units run
> autonomously at 200 MHz from their own memory, so the main
> CPU could do other jobs for you.)

In principle the VC4 could be used on a headless rasPi for this, however
it's hard to find documentation on it.


Regards,
Achim.
-- 
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+

Wavetables for the Waldorf Blofeld:
http://Synth.Stromeko.net/Downloads.html#BlofeldUserWavetables




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