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

Missing Second Updates on the RX-8571NB? Separate the 7.813 ms IRQ Pulse from UF

If a controller samples the pin every 20 ms but sometimes misses the Epson RX-8571NB's second update, do not replace the quartz clock first. The output is a short active-low pulse, while UF is a retained one-bit event flag. Missing a pulse, knowing that an update occurred, and knowing exactly how many occurred are three different things. Use hardware capture or different scheduling if every event needs a response. If you only need to know whether time advanced, follow a controlled read-and-clear sequence.

What does one update leave behind?

Epson's ETM29E-02 manual distinguishes update selection USEL, update flag UF, and update interrupt enable UIE. USEL selects a once-per-second or once-per-minute internal update. UF is set when an update is detected and remains set until cleared by writing zero. UIE controls whether the update pulls the interrupt output low. It does not stop the calendar. The manual also says time-update events do not occur when STOP is 1. Check that timekeeping is allowed when diagnosing recovery, not just the interrupt enable.

The time-update section lists automatic release after 7.813 ms and separately gives a maximum of 23.44 ms from the internal update to the interrupt output going low. The first describes pulse duration, the second asserts latency. Do not use the larger number as pulse width. Automatic release means this interrupt stops driving low and goes high impedance. The board's visible return high also depends on pull-up, line capacitance, and other sources that may still assert the shared output. Some text calls that state /INT; the pin and section's diagram identify the output as /IRQ.

Distinguish output release from clearing UF. The first can let the controller pin return high without causing the second. On entry to the driver, record status before clearing handled flags according to the manual. Avoid having two tasks independently read and clear a shared register. Give one handler ownership of pending flags. When update, alarm, and timer events are used together, one flag says nothing about the other flags.

Why can 20 ms software polling still miss it?

Consider an ideal example. The controller samples at 100 ms and 120 ms. The low pulse from an update begins at 105 ms and releases at 112.813 ms. Neither sample falls inside it, so both read high. These times are illustrative; the device is not specified to assert at 105 ms. Favorable phase may let software catch many pulses. A persistent unfavorable phase between two stable timing sources can cause repeated misses. A probable random capture rate is not a guarantee of responding to every event.

If nothing else cleared the flag, reading UF at 120 ms establishes that at least one update occurred. Now suppose another task is delayed until 3.2 s after the same update reference point, crossing ideal second boundaries at 1 s, 2 s, and 3 s. UF still reads 1. It does not mean exactly one update, and it cannot itself establish there were three. To catch up on work, a host can compare valid current and previous calendar snapshots if time remained trustworthy and was not manually adjusted. After a reset, a backward correction, or loss of valid time, record the uncertainty rather than inventing an event count.

Polling faster does not automatically guarantee capture. Evaluate the longest gap during interrupt masking, task preemption, and low-power wake-up rather than the average interval. Also avoid using an arbitrary pull-up or capacitance change to stretch the observed pulse. It changes the board's rise behavior rather than the internal timing. Do not actively drive an interrupt line without first verifying electrical limits.

Which readout fits each application?

If every update drives a task, prefer a verified GPIO edge interrupt, hardware timer capture, or wake facility that stays operational in sleep. Confirm what the controller detects while asleep and verify minimum recognizable pulse width, pull-up availability, and worst-case service latency. One falling edge does not imply exactly one cause on a shared line. If another source already holds it low, a new cause may not create a new edge. Read and classify flags in the handler and log them separately from the number of edges observed.

If the host merely needs to know that time advanced or catch up on wake, read UF and the calendar, clear the processed flag as specified, and retain the values and clear time. A new update can happen between the read and clear. Test that race rather than assuming that software clears the flag in sync with the internal clock. For lossless counts, use a suitable counter or capture path instead of treating one bit as an event queue. Preserve raw time readings and validity checks so an invalid calendar value during power recovery does not create an erroneous catch-up.

On the bench, capture an independent reference, RTC /IRQ, handler entry, and bus transactions together. First enable update events alone, then add other functions and check what changes on the shared output. If the issue appears only during sleep, record the host's wake settings, disabled signal domains, and pin multiplexing. That can distinguish an absent RTC update, a pulse that did not reach the board input, and a host that did not respond on time. A scope screenshot does not prove the application task ran.

Keep the test conditions distinct as well. Capture multiple updates with a free-running acquisition, then compare fixed-phase sampling, intentionally offset samples, and host sleep. Synchronized bench clocks can accidentally hide polling gaps. If a log entry is only written after an event is received, that log cannot reveal every missed event on its own. Use an independent timeline or have the test software log each sample. Before release, ask a second engineer to reconstruct one event solely from the raw record, identifying the update, low pulse, status read, flag clear, and task execution. Mark an unobserved event as such rather than filling it with a neighboring timestamp.

Driver and board checklist

CheckEvidenceDecision
Update cadenceActual USEL and STOP readbackDistinguish cadence selection from stop state
Pulse path/IRQ waveform, pull-up, and host wake stateVerify pulse width and delivery separately
Retained statusFirst UF value and clear timingOne bit does not count events
Application actionCaptures, calendar checks, and task logsDistinguish missing edge, missing update, and missing execution

Frequently asked questions

Does a high controller pin rule out an update?

No. The pulse may already have released, or the update output may be disabled. Check UF, the enable bit, and the time conditions. If another source is holding the line low, do not attribute the low level to the second update alone.

Does switching from second to minute updates make polling reliable?

Not necessarily. Changing the time between events does not mean the individual low pulse is longer on this device. Fewer events may help scheduling, but still verify pulse width against the worst-case sampling gap.

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.