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

False power-loss logs on the 32.768 kHz RX8111CE RTC: The EVDET wait

If an Epson RX8111CE logs an apparent power loss during startup, first check how firmware arms the event instead of assuming that the main rail dropped or replacing the crystal. With automatic backup switchover enabled, the application manual requires at least 31.25 ms between setting INIEN and setting EVDET. Results obtained without that wait are unreliable. This is not a guaranteed delay from a real power loss to a log entry, nor is it a voltage-droop response specification. It constrains the two initialization writes.

Automatic switchover and timestamp arming are different actions

INIEN enables the automatic switchover configuration, subject to the switch-selection bits. EVDET controls whether the relevant voltage detection and transition to backup produces a timestamp. Successful switchover does not prove that logging was reliably armed. An empty log does not prove there was never a switchover; one could have occurred before arming, or the record could have been affected by subsequent configuration or clearing. Do not use EVDET as though it were the same logging mechanism in a fixed-switch configuration; the manual specifically excludes that use.

The same RTC can timestamp external EVIN input, command triggers, or internal status. Know which sources are enabled on the board. VBAT versus VDD comparison, low backup-battery voltage, and oscillator-stop detection are different conditions. Do not merge them into a main-rail-loss report merely because they occurred near one another. Preserve raw status and configuration before the software labels the source. A shared interrupt does not, by itself, identify a power loss.

Measure between the writes, not between software function names

A common error is to issue adjacent bus writes in the same initialization routine and assume bus traffic itself provides enough time. The interval runs from setting INIEN to setting EVDET. On a logic analyzer, measure conservatively from the end of the first write to the start of the next. Firmware can start a monotonic timer after the first transaction reports success. Do not rely on incidental scheduling time, an early scheduler wake, or a wall clock that can jump during synchronization. If the first write fails or its result is unknown, verify or retry rather than arming on the original timetable.

If an example board starts the second write 5.00 ms after the first completes, that conservative measurement is 26.25 ms short. Requiring at least 40.00 ms before starting the second write gives an 8.75 ms margin above the documented minimum. That value illustrates the calculation. Select an actual margin from timer resolution, scheduling behavior, and measurements of the shortest interval. An integer-millisecond delay must not round the requirement down to 31 ms. Time since firmware startup is also not interchangeable with the RTC’s running calendar.

ObservationMeaningAcceptance check
INIEN and switch-selection bitsAutomatic switchover configurationCheck the full mode, not one bit alone
INIEN to EVDETTime between configuration writesAt least 31.25 ms, with measured margin
Backup transition after armingTarget logging eventVerify source and time against a known transition
Fixed-switch configurationDo not use this automatic logging flowAn empty log is not a part failure

Start in two stages and show the monitoring gap

If boot time matters, the rest of the system need not block on a delay. Configure automatic switching and enter a waiting state while other initialization runs. Arm EVDET once the interval has elapsed and the configuration remains valid. Expose distinct states for an RTC that responds, a switchover configuration that is set, and a backup-event logger that is armed. A host request during the wait should distinguish logging not ready from logging ready with no events. Otherwise a quick disconnect and reconnect is hard to interpret.

Host reset and loss of RTC power are different. The RTC might retain settings and history on backup after the host reboots. Determine whether the design keeps the old configuration or reinitializes it; blindly rewriting switches and clearing timestamps can erase evidence. If reconfiguration is required or the state cannot be established, verify the wait again and identify any possible monitoring gap in the service log. A report cannot fill a period the hardware and software did not monitor.

Use controls to separate configuration errors from real supply problems

Capture VDD and VBAT at the RTC pins, bus writes, and the interrupt line when relevant. Initialize with a valid interval on a stable supply, then use a controlled supply to create a known transition to backup. Compare the analog traces with the source, status, and time of the recorded event. Repeat startup under equivalent supply conditions and check for spurious entries. On an isolated validation board, a deliberately short interval is a useful negative control for verifying that firmware rejects or quarantines the result. No spurious entry in one short-wait run does not validate the sequence. An unreliable result is not necessarily a reproducible failure on each run.

If the supply really fluctuates, investigate ripple, the switchover waveform, and probe location. Extending the initialization delay is no substitute for fixing the supply. Keep both the write sequence and measured minimum interval, and separately keep the actual supply and log evidence for the controlled switchover. Record other enabled triggers and the possible presence of earlier entries. Service teams can then determine whether an alert corresponds to a new event, an old observation read again, or an unreliable initialization record.

Keep purchasing records separate from system acceptance

Keep the full RX8111CE ordering identity and application-manual revision. At factory acceptance, archive the firmware revision, backup configuration, and the two sets of test evidence. Component sampling can check identity or selected electrical parameters. It cannot validate firmware’s wait between register writes. If changing to another RTC with an integrated 32.768 kHz crystal, do not copy these bit names or this delay without verification. Compare its backup mode, clearing behavior, supply monitoring, and interrupt handling with the replacement’s own documentation.

For equipment that requires lot traceability, tie the sample, bus capture, and supply waveform to one test identifier. If the alarm wording later changes, service staff can retrieve the original evidence instead of inferring the trigger from a translated label.

Does 31.25 ms specify timestamp accuracy or response time?

No. It is the wait between two initialization actions. Check timestamp resolution, supply sampling, and event-to-interrupt behavior separately. It does not promise that the system will log a dip of any duration.

Should I delete a questionable entry after boot?

Not first. Save the raw timestamp, related status, firmware revision, and configuration. If the required interval was not met, mark the entry as unvalidated rather than evidence of a real outage. Keeping the entry and bus trace helps separate a configuration problem from a real supply fault.

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.