Specialist Supplier of Crystals & Frequency Control Componentssales@mecxtal.com.cn0755-26500570
MERLIN home / Rednote / Measurement and Acceptance

The RTC was calibrated and still reads 32768.45 Hz. What actually changed?

A board receives a replacement 32.768 kHz passive crystal. After writing a calibration value to the PCF85063A, the counter still displays 32768.45 Hz. That can be the right measurement. This RTC corrects timekeeping by changing the divided timing ticks. The crystal and oscillator circuit still determine the underlying frequency. Use the 32.768 kHz output to measure the crystal error, then look at the 1 Hz output and the timing of corrections to verify the calibration.

Get the raw frequency from CLKOUT

Run the board at the specified temperature, supply, and test state. Select 32.768 kHz and measure at the buffered CLKOUT pin. A probe attached directly to the quartz pins adds capacitance. Its effect can be comparable to the error under test. Preserve the specified loading if another device shares CLKOUT, verify the counter trigger, and log both temperature and the instrument timebase with the result.

The manufacturer's clock-output table shows that 32.768 kHz is unaffected by either offset mode, while 1 Hz is affected by both. One output pin selects one frequency at a time. Capture two records with their configuration and reference timestamps. Check whether a change in output selection also affected the stop bit, timekeeping state, or output enable. Leave transition edges out of the measurement.

Calculate the code and residual error

Suppose a reliable reference gives 32768.45 Hz, or 0.45 Hz high. Divide by 32768 and multiply by one million to get about +13.733 ppm. In PCF85063A fast correction mode, MODE=1, NXP specifies 4.069 ppm per code step. A code of +3 corrects about 12.207 ppm, leaving about +1.526 ppm. This example describes a steady room-temperature condition, with negligible higher-order terms. Other boards need their own measurement.

Over 240 reference seconds the uncorrected clock would gain about 3.296 milliseconds. Three fast-mode steps remove about 2.930 milliseconds on average over a complete correction cycle, leaving about 0.366 millisecond. The 32.768 kHz output remains close to 32768.45 Hz. On the 1 Hz setting, compare cumulative edge timing against a reference across many seconds to check whether the expected correction appears.

The calibration field is a seven-bit two's-complement number. The mode bit is separate. Decode both on readback. An incorrect sign can move the accumulated error in the wrong direction. If the written configuration is correct but raw offset is unexpectedly large, verify crystal loading, stated crystal frequency conditions, and assembly. A trim code that barely brings a large room-temperature error into tolerance can leave little margin for another lot or temperature.

Cover the times when corrections occur

Fast mode initiates corrections every four minutes and schedules pulses by second. Normal mode initiates them every two hours and schedules pulses by minute. Corrections do not occur uniformly across individual seconds. Ten edges from the next minute can miss the correction entirely. Record several full correction cycles, or use interrupt activity to align the windows and compare endpoint error over complete cycles.

NXP allows correction interrupts with CIE enabled. The pulses on INT identify the correction events. The pin can also signal alarms or timer events, so check the enabled sources and isolate unrelated events when needed. The interrupt edge is for alignment. Measure timekeeping against the reference using the 1 Hz output edges. Interrupt pulse width should not be substituted for cumulative timing correction.

If an oscilloscope cannot store long records, use continuous timestamp capture on a logic or frequency instrument. Software polling of the seconds register can have millisecond-scale timing variation, making the submillisecond residual in the example difficult to resolve. That polling method might still reveal the time gained in a day. Qualify the setup against a known reference over the same record length before trying to attribute a correction to a particular cycle.

Make two checks after a crystal substitution

Specify an allowable raw crystal offset and a separate requirement for corrected timekeeping, with a measurement window for each. A large raw offset calls for reviewing specified load, assembly variation, and the temperature characteristic. If raw frequency is plausible and corrected timing is wrong, check the code sign, mode, timestamps, and observation window first. If another function uses 1 Hz, check whether individual corrected seconds stay within its timing tolerance.

Record crystal lot, temperature, raw output, code and mode, valid accumulation interval, and reference uncertainty for both parts. Where the product uses backup power, confirm the register and output states after the permitted supply transition. Two passive crystal lots can give the same final room-temperature error on one board while needing different trim values or leaving different residuals elsewhere in the temperature range. Evaluate both raw offset and corrected timing when judging interchangeability.

Agree on how to handle missing edges while investigating timekeeping. If continuous capture shows a sudden step of about one second, align the raw pin waveform, event count, and software log. Check for buffer overflow or a supply transition. Subtracting endpoints across a gap can turn a capture fault into an apparent crystal error. Swapping reference and recording inputs can also establish whether the apparent error follows a particular acquisition channel.

Keep the reference timebase unchanged when comparing two trim values on one board. Where possible, begin and end at corresponding phases of the correction cycle. If the allowable residual is smaller than measurement uncertainty, extend the observation or use a better reference acquisition. Agreement between comparable intervals helps distinguish the effect of one successful write from timing that can be reproduced after power-up.

References

WeChat

MERLIN · TIMING COMPONENTS

Scan with WeChat to contact Sales

Add our WeCom contacts from your usual WeChat app.

On desktop, scan with your phone. On mobile, save the QR image and select it from your album in WeChat Scan.