[...] Incorrect CL should never be off by the 3% you claim here. There may be other factors at play here.
eg TI have an app note showing a 7pF crystal loaded with just 1pf will be off by 1-32778/32768 = 305ppm
Good you stressed on that. I indeed fixed a few bugs in my calibration software after I measured the crystal frequency without any load capacitor. I'll redo the measurement again and see. Thanks for pointing that
So is the Raspberry Pi the time standard against which the crystal is measured? Do you have any reason to believe it is more accurate than the watch crystal, or the 328P's crystal for that matter?
Good question. If you read my
previous post, you'll see I hinted about that¹. Of course I have no means to assess the precision of that crystal. I initially thought (rather hoped) synchronizing the Pi with NTP would yield a rather stable clock (in the millisecond drift, kind of) but later realized/read the timer I'm using in my software isn't affected by NTP. But I also later read the precision of Pi's timers is "pretty accurate" without any data to back that up...
So since I don't have the proper gear to measure the frequency of interest, I'm left with measuring accumulated errors, relatively to a clock that is known to be somehow accurate. I stuck to that method I described. Anyway I have planned to use the EEPROM of the MCU to store a correction factor, which I explained the use earlier in my posts, i.e. a 32-bit duration after which the MCU shall skip or add a second.
BTW the watch crystal
is the ATmega328's crystal². It is not an Arduino but a bare microcontroller that I wired on a breadboard (alright, not the best context to calibrate the thing, I admit). The only barebone clock source in that thing is the internal RC oscillator. There's also an internal, low power 32kHz oscillator but the latter accuracy is rated... 30% while the former's is in the percent range.
¹ Quoting myself «I get the accumulated drift (
compared to the clock of the measuring device, of course)»
² Just not the main clock but programmed to be timer 2's
asynchronous clock source.