- Thu Oct 01, 2020 7:30 pm
#219401
I've being having the odd problem with the RTC on my custom Artemis boards freezing occasionally. It's only specific to some hardware, or perhaps high humidity, and is horribly intermittent -ie. on one board, after resoldering things the RTC works fine, but a few hours later it freezes again. I've not had this issue with any Sparkfun boards. I don't know if I'm using the same crystal but I matched the 15pF capacitors from the Sparkfun boards as it all seemed pretty generic and transferrable.
I'm using this crystal (apparently pretty bog standard):
https://au.mouser.com/ProductDetail/ecs ... cycode=AUD
In my travels I came across some theory on how crystals and loading capacitors work, and it seems like the 2x 15pF are almost certainly too high for the nominal 12.5pF in my crystal datasheet, right on the edge of "will just work, in most cases". They probably should be 6pF, although I didn't finish figuring that out because...
Page 525 of the Apollo3 datasheet (exerpt below) actually says that these capacitors aren't necessary! It has compensation stuff internally. Lower part count, cool. I've just removed the loading capacitors on a few custom boards and the RTC still works. The datasheet then goes on to sort of contradict itself by talking about minimising leakage in load capacitors.
I'd be interested to hear from Sparkfun what crystal is used on the stock boards and any rationale behind loading cap selection. I'll be removing loading resistors off most of my custom boards and seeing how they go.
PS: Anyone who got this far might be interested to learn the datasheet also references (on page 526) an "Oscillator Fail (OF) flag" which can be used to detect failure of the external crystal.
I'm using this crystal (apparently pretty bog standard):
https://au.mouser.com/ProductDetail/ecs ... cycode=AUD
In my travels I came across some theory on how crystals and loading capacitors work, and it seems like the 2x 15pF are almost certainly too high for the nominal 12.5pF in my crystal datasheet, right on the edge of "will just work, in most cases". They probably should be 6pF, although I didn't finish figuring that out because...
Page 525 of the Apollo3 datasheet (exerpt below) actually says that these capacitors aren't necessary! It has compensation stuff internally. Lower part count, cool. I've just removed the loading capacitors on a few custom boards and the RTC still works. The datasheet then goes on to sort of contradict itself by talking about minimising leakage in load capacitors.
I'd be interested to hear from Sparkfun what crystal is used on the stock boards and any rationale behind loading cap selection. I'll be removing loading resistors off most of my custom boards and seeing how they go.
PS: Anyone who got this far might be interested to learn the datasheet also references (on page 526) an "Oscillator Fail (OF) flag" which can be used to detect failure of the external crystal.
12.1.3 High Precision XT Oscillator (XT)
The high accuracy XT Oscillator is tuned to an external 32.768 kHz crystal, and has a nominal frequency of32.768 kHz. It is used when frequency accuracy is critically important. Because a crystal oscillator uses a significant amount of power, the XT is only enabled when an internal module is using it. Digital calibration logic is included. The output of the XT oscillator may be digitally calibrated to ±1 ppm (part per million).
It should be noted that the XT oscillator is also optional if the requirements of the design can tolerate the internal LFRC/HFRC oscillator specifications. It should also be noted that external capacitors are not required to tune an internal divided clock of the crystal input to achieve a precise scaling of 32.768kHz. This is handled within the Apollo3 Blue MCU.
NOTE: The XTAL is highly sensitive to external leakage on the XI pin. Therefore it is recommended to minimize the components on XI and to use extremely low leakage load capacitors.