A calibration station changes the DS3231 aging offset from 0x00 to 0x06. Readback confirms the write, yet the counter shows almost no movement. Keep that record before reaching for a larger adjustment. The register write, the update to the oscillator and the measurement of the frequency change are three separate events. A missing conversion or a counter window that straddles the update can make an effective adjustment appear to do nothing.
After the write, the oscillator still needs a capacitor update
The DS3231 uses a switchable capacitor array to compensate its crystal over temperature. The chip calculates a setting from the temperature and applies the user’s aging offset to that setting. Register 0x10 holds a signed eight-bit two’s-complement code. A positive value adds capacitance and slows the oscillator. A negative value removes capacitance and speeds it up. For example, 0x06 is +6 and 0xFA is −6. These are trim steps whose frequency effect depends on temperature and the device.
The normal conversion cycle runs every 64 seconds. During a normal conversion the array picks up the new offset if the temperature code has changed since the previous conversion. A manual conversion can also apply the new setting. At a stable room temperature you can wait through a normal cycle and still see the old setting in effect. Triggering one manual conversion after each write gives the station a defined point at which to begin a new measurement. The manual request leaves the automatic schedule in place. ADI DS3231 datasheet, aging offset on page 14
Check BSY first, then watch CONV for the manual request
- Run the device with stable power and temperature. Record the original
0x10value, the temperature registers, the reference timebase and the 32.768 kHz output frequency. Allow the device to finish its initial temperature measurement before taking the baseline. - Write one new trim code and read it back. Check
BSYat bit 2 of status register0x0F, and check that no manual request remains pending. When idle, setCONVat bit 5 of control register0x0Ewhile preserving other control bits. - Poll
CONVuntil the device clears it. Then start the measurement window.BSYmay take about 2 ms to reflect the manual request, so an immediateBSY=0can start the count while the old setting is still in use. Set a timeout using the specified conversion timing and a margin for host communications. If the request times out, record the register values and the I²C result. - Read the temperature and offset again after conversion. Keep the same signal path and instrument settings for the new reading. If you restore the original code, request another conversion and remeasure once it completes.
The temperature reading in registers 0x11 and 0x12 has a 0.25 °C increment. The datasheet specifies ±3 °C temperature accuracy under its stated test conditions. Record an independent temperature reference for controlled acceptance tests. If a read fails, the fixture temperature moves or an automatic conversion overlaps the operation, reestablish comparable conditions before trying a second trim. ADI control register and conversion timing on page 13 · ADI temperature registers on page 15
How big is one step at 32.768 kHz?
One part per million of 32,768 Hz is 0.032768 Hz. At +25 °C, the typical sensitivity in the datasheet is about 0.1 ppm per step, or about 0.00328 Hz. A whole-hertz display hides that increment. For a frequency counter that counts raw pulses in a fixed window, one count represents 1 Hz with a one-second gate, about 0.00833 Hz with 120 seconds, and about 0.00327 Hz with 306 seconds. Those figures only describe count quantization. Reference error, trigger jitter and temperature changes affect the result as well.
For a trial, choose a reversible step large enough to see above the measurement noise. Suppose a unit at +25 °C reads 32,768.0246 Hz with an offset of 0x00, about 0.75 ppm fast. At the typical sensitivity, adding six steps would lower the output by about 0.0197 Hz, to roughly 32,768.0049 Hz. Treat that target as an estimate and use the measurement after conversion to decide which code to retain. An illustrative reading of 32,768.0051 Hz would be about +0.156 ppm, a gain of roughly 0.013 seconds per day if the error remained constant. Restoring the original code, converting and reading 32,768.0244 Hz would bring the frequency close to its starting point.
To resolve a single step, consider a longer window or a reciprocal counter, period comparison or phase comparison with a traceable reference. Record the timebase calibration, observation time and repeated readings. Check the pull-up and input threshold at the 32kHz pin as part of validating the measurement setup. A slow edge that causes missed counts will skew the trim calculation. ADI datasheet electrical table and trim sensitivity on page 3
Verify repeatability before carrying a trim into production
Use an A–B–A sequence. Measure the original code, the trial code and then the original code again, using the same observation time after each conversion. If both A readings agree within measurement uncertainty and B moves in the expected direction, you have evidence that the adjustment took effect. If B overlaps A within uncertainty, investigate the counter, reference and missed edges. If the second A fails to come back, check board temperature, power and conversion status. Repeat on another unit before assuming the first unit’s sensitivity holds for the lot.
An aging offset shifts the frequency-versus-temperature curve. The DS3231 electrical limits over temperature are stated with the aging offset at 00h and with the specified supply. If a product will ship with a nonzero setting, check the resulting frequency at relevant temperatures and under operating power conditions before setting its acceptance limits. For an offered “calibrated” lot, request the complete part number and lot, test temperature, starting and final codes, measurement reference and duration, and the before-and-after frequencies. Those details let incoming inspection reproduce the supplier’s result. ADI typical operating curves for different aging offsets
