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

The DS3231 keeps time on its battery. Why does INT/SQW stop pulsing?

A backup logger timestamps events from a DS3231 square wave. After main power drops, the logic analyzer sees no pulses. The calendar nevertheless advances during the outage. The internal oscillator keeps time, while INT/SQW is a multiplexed open-drain output. Check whether backup operation enables the pin, where its pull-up is powered, and whether its receiver still has power.

Follow the oscillator to the output

ADI defines EOSC, BBSQW and INTCN in the control register. Verify EOSC permits backup timekeeping. For a battery-backed square wave, select square-wave operation with INTCN cleared and enable BBSQW. With BBSQW cleared, INT/SQW goes high impedance when VCC falls below the power-fail threshold. Check the RS bits for the intended frequency. An alarm and a continuous square wave compete for the same pin function. The separate 32 kHz pin has its own EN32kHz control.

Some firmware writes a default control word before application code restores the intended value. Backup behavior can differ if power is lost during that interval. Save the final control word before testing the transfer and purposely cut power before initialization ends. Read during the outage only if power and I²C access conditions permit it. If a return to main power is necessary, capture the original state before the driver overwrites it. A post-initialization register read cannot establish what was active during the outage.

The pull-up needs a surviving rail

The output actively sinks current and needs a pull-up to rise. A pull-up on the main rail cannot provide a valid high after that rail disappears. With a 47 kΩ pull-up to an assumed 3.0 V retained rail and negligible output-low voltage, instantaneous current while low is about 63.8 µA. At about 50% duty cycle, the average is 31.9 µA. Add that branch to the battery budget if it shares the backup source. Draw the actual current path so a measurement does not attribute pull-up current to the RTC timekeeping circuit.

A larger resistor reduces current and slows the edge. With 40 pF total load, 47 kΩ gives a time constant of 1.88 µs and an ideal 10% to 90% rise of about 4.14 µs. One hertz leaves ample period in this example. At 8.192 kHz the half-period is about 61 µs. Still check the actual receiver threshold, leakage, edge accuracy, and capacitance. Changing an edge timestamp threshold from 50% to 70% also moves the timestamp even if frequency is steady.

Capture both sides of the power transfer

Capture VCC, the retained rail, INT/SQW and the receiver input together for several cycles. If the signal stops low, look for a surviving pull-up and a possible input clamp. If it stays high with a good retained rail, check for high-impedance mode and a complete sink path. An analog trace shows slow ramps and changes following a rail that logic capture can hide. Verify the receiver's powered-off input behavior so the retained pull-up cannot feed an unpowered rail through it.

Also save the calendar increment after a longer outage and read the original oscillator stop flag before clearing it on first access. The waveform establishes interface availability. The calendar establishes continuity of timekeeping. Record where the board gets its backup and pull-up rails for repair. Pass the board only after a complete power-loss test verifies calendar continuity, successful receiver capture, and actual backup consumption.

If the square wave times another circuit, specify how much interruption is allowed at transfer. A receiver that permits resynchronization can renumber events after a verified full period. If it requires continuous edges, compare adjacent pulse intervals across handover and count individual missing events. Returning to 1 Hz afterwards is insufficient. Define which edge carries time so that receiver threshold and pulse-shaping changes have a clear retest target.

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.