applet.calibrate_clock: internal&external clock error measurement against external frequency ref#1160
applet.calibrate_clock: internal&external clock error measurement against external frequency ref#1160i-infra wants to merge 5 commits intoGlasgowEmbedded:mainfrom
Conversation
… Rb freq standard or GPS PPS, supporting measuring internal XCO or external input against external reference.
whitequark
left a comment
There was a problem hiding this comment.
Looks good overall. Please include documentation and tests as discussed elsewhere.
I think the placement of the applet is not correct. "internal" is a catchall category for things that are exclusively used to self-maintain the Glasgow device; it is not expected that an end user would ever want to use an "internal" applet to do an unrelated task.
I do not have a better name, let's just kick this can down the road and decide on it once the other fixes go in.
…rate_clock.rst, fixes to applet smell
|
@whitequark I think I have addressed all your comments / suggestions for this applet! We still should figure out where it goes in the tree, and then I'll update this branch accordingly ^^ |
Let's add a |
|
And some more "weird fake analog stuff" (LC meter with better dynamic range than ~any other open source ones?) (an implementation of the AVR Transistor Tester that uses a small external PCB with a few passives + a SPI ADC / DAC+Comparator, but with much better dynamic range than the clock-limited AVR version?) |
…re.calibrate_clock via git mv to preserve blame, all refs fixed
Oh this looks great! |
|
Looks all good! Please squash the commits (or rebase them into a series of self-contained diffs, up to you in this case) and then you can merge it (I think you should be able to click the button yourself). |
This PR adds a clock calibration applet supporting calibrating the Glasgow's internal crystal oscillator against an external frequency reference, as well as measuring the frequency error of an external signal against an external frequency reference.
I have tested with two references: GPS PPS (1Hz) input, as well as with a Rubidium frequency standard (0-2v sine wave @ 2**23 Hz), against both the internal crystal oscillator and a Si5351a clockgen chip as external signal.
This PR benefits from #1157 (or workaround firmware mentioned in that issue) - esp to allow the GPS receiver to not lose satt. lock when switching applets, as well as PR #1158 to offer more ergonomic control of a si5351a (for calibrating the Si5351a module's onboard crystal.)
Cheers!