Warning: session_start(): open(/tmp/sess_3372dcb4afbcf3d3a86d9fd82ad719de, O_RDWR) failed: No such file or directory (2) in /var/www/html/dokuwiki/inc/init.php on line 273

Warning: session_start(): Failed to read session data: files (path: ) in /var/www/html/dokuwiki/inc/init.php on line 273

Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/dokuwiki/inc/init.php:273) in /var/www/html/dokuwiki/inc/auth.php on line 535

Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/dokuwiki/inc/init.php:273) in /var/www/html/dokuwiki/inc/Action/Export.php on line 109

Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/dokuwiki/inc/init.php:273) in /var/www/html/dokuwiki/inc/Action/Export.php on line 109
pixo_replacement

Table of Contents

Raspberry Pi XO Replacement

Context:

Success!

Made an initial attempt on the evening of 2023-03-26 on a Pi 2 B. Drop in replacement is working surprisingly well right off. Have not performed any longitudinal testing yet, but initial tracking numbers are positive.

Pi 2 B with replaced XO Pi 2 B with stock XO

Notable Test Points

PP3 GND
PP4 GND
PP5 GND
PP6 GND
PP7 5V after polyfuse
PP8 3V3
PP9 1V8

Pi 3 B v1.2 Stock XO

Marked AEL19.2

As far as I can tell, the Pi 2B through 3B+ all use this part, as well as a number of the A models. The Pi 4B uses two AEL crystals, one at 25MHz, the other at 54MHz. I have not yet experimented with replacing these parts.

New TCXO

Quantifying Results

There are a number of different methods for quantifying the results of this sort of modification. A few that I am exploring will be detailed below.

chrony tracking

(Graphs coming eventually)

Python Frequency Generator

sigGen.py
#!/usr/bin/python
 
import RPi.GPIO as GPIO
from time import sleep
 
GPIO.setmode(GPIO.BCM)
GPIO.setup(10,GPIO.OUT)
p=GPIO.PWM(10,1140)
p.start(20)
sleep(3600)
p.stop()
GPIO.cleanup()
exit()

WiringPi GPIO_CLOCK

The WiringPi toolset has a function to use the SoC's PLLs to generate a precise clock using the GPIO_CLOCK function. This can be initiated easily from the linux userspace by first setting the pin mode, then the output frequency. Only WiringPi Pin 7 (GPIO 4) supports this mode.

gpio mode 7 clock
gpio clock 7 1000000 # frequency in Hz