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

Why does PCF85263A show one outage window when its 32.768 kHz crystal never stopped?

Check which events the timestamps store. PCF85263A can retain the first switch to battery and independently update the last return to VDD. The first slot accepts a new first event only after its flag is cleared; the last slot updates on each relevant event. Subtracting those two retained timestamps does not necessarily give one outage or total downtime. The crystal and calendar can be functioning correctly. Do not start by replacing the 32.768 kHz crystal for this symptom.

Why two values can belong to different outages

The three slots are not a continuously appended event queue. Each has configurable event semantics. In the manufacturer's example, TSR3 records the first battery switch and TSR2 the last return to VDD. If TSR3F is not cleared, later outages do not update the first slot, while later restorations can update the last slot. The two values can span several distinct outages.

Suppose the unit switches to battery at 08:00:00, returns at 08:00:20, switches again at 08:01:00 and returns at 08:01:30. With the first flag left set, the two displayed endpoints are 08:00:00 and 08:01:30, 90 seconds apart. The two illustrative battery intervals are 20 and 30 seconds, a total of 50. The 40 seconds between them had main power. Without a separate record of each interval, the UI should not report 90 seconds as measured cumulative downtime.

Use distinct fields for first, last and interval records

Record modeOn a new eventWhat can be reported
FB, first battery switchKeeps the previous record while flag is setFirst detected battery entry
LB, last battery switchUpdates on the latest matching eventMost recent battery entry
LV, last switch to VDDUpdates on the latest restorationMost recent return to VDD
Host stores each interval separatelyRequires capture and persistence for each intervalIndividual and accumulated intervals if complete

Even the latest two slots have limits. While currently running on battery, the last restoration can belong to a prior outage. Check current supply state and ordering before displaying duration. If the evidence only shows battery operation is ongoing, report that rather than computing a negative or unverified elapsed interval.

Check whether the software clears flags before reading

Preserve mode, flags, raw timestamp fields and current supply status. If startup code restores defaults and clears a first-event flag, it changes what can be stored next. Define when firmware is merely reading existing evidence and when it intentionally rearms first capture. A retry that silently clears flags changes the evidence being compared.

Receiving an interrupt does not prove each interval was stored. The manufacturer explains that updates can generate interrupts independently of whether a prior flag is still set. Notification, reading the matching slot and persisting the record are separate actions. When events arrive rapidly, validate whether software can save them before overwrites occur. Test missed events if a complete history is required; three slots are not unlimited storage.

Interpret stopwatch and calendar fields differently

Timestamp fields follow the selected calendar or stopwatch format. If an application switches modes but still interprets elapsed data as month and day, the display may appear to jump or omit fields even if the reference frequency is sound. Store RTCM and the read time with the raw data. If the project uses elapsed time, document that. For absolute date, verify calendar initialization against the system reference.

The calendar counter can include hundredths, but the RTC timestamp fields described here begin with seconds. Do not display a claimed difference of a few milliseconds without separate timing evidence. Capture faster events at a suitable signal and relate them to absolute time if required. A lower-tolerance 32.768 kHz unit does not change register resolution.

When the crystal actually needs investigation

Investigate the oscillator when the calendar stops, drifts persistently against an independent reference, or an oscillator-stop indication agrees with signal evidence. Check fitted parts, effective load and PCB construction. Epson's PCF85263 pairing page lists FC-135R X1A0001410003 as a 32.768 kHz, 12.5 pF example with stated evaluation conditions. It is a concrete candidate reference, not approval for every PCF85263A layout. Check the actual board's configuration before changing parts.

A probe can disturb a low-frequency crystal node. If using an approved output, identify its division and power mode before comparing to calendar advancement. A transition reading cannot establish long-term clock error. For backup continuity, measure the before and after readings against an independent reference.

Test two outage intervals, not just one

Use the same board revision, known-good battery and controlled main supply. Introduce one short outage, restore, then create another outage and restore again. Retain the observed power switching and each slot readback. Compare a test that leaves the first flag set to one that reads and rearms under the approved procedure. This separates clock accuracy from FIRST/LAST meaning. If switching itself was not reproduced, check the configured mode and thresholds. Report only intervals that the evidence supports rather than treating a post-boot read as an entire outage history.

If boot software writes a new calendar time before reading the retained slots, record that action. Past event stamps were captured on the earlier timebase and do not automatically inherit a later correction. For tests that cross midnight or a month boundary, retain the calendar date along with time; otherwise a previous day's last recovery can be misread as today's. In stopwatch mode, verify that the counter was not cleared between events. Record observed power state to distinguish a transition that never happened from a transition whose record was overwritten.

Separate the purchase decision from the logging decision

Check first and last capture semantics and whether software actually saves each interval before replacing a part. An overwritten slot is not a crystal failure. If the calendar is discontinuous after recovery, check the oscillator circuit against the approved board and component specification. A purchase record needs exact code, load, package and lot; a software acceptance record needs rearm timing, reportable intervals and accumulation limits. That keeps two short outages from being reported as one long outage.

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.