AM1805 XTAL Calibration

I have a question regarding AB1805 (AM1805) XTAL calibration (sec 5.9.1 in their manual). Seeing as this IC is commonly used in Particle designs, perhaps you could help me understand this calibration. Is this something that should be performed per unit, per batch or per design? I was looking at how its setup for the tracker som in the device os (6.2.0) and there is a call in hal/src/tracker/am18x5.h

xtOscillatorDigitalCalibration(HAL_PLATFORM_EXTERNAL_RTC_CAL_XT);

where HAL_PLATFORM_EXTERNAL_RTC_CAL_XT appears to be -45 in hal/src/tracker/hal_platform_config.h, so it appears to be a per design type calibration, is this correct?

I believe we set the value based on a production sample of the crystal we selected. That's probably sufficient; it would be cumbersome and probably unnecessary to test and set it on each unit manufactured.

2 Likes

Yes that would be a big burden to manually run on each device. I am wondering if it would be possible to perform at runtime in firmware, if the square wave output was connected to a pin on an input. Seems like it would just have to be able to measure the 32.768KHz frequency and compute the offset live.