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

Epson RX-4803 RTC: Why Can a One-Minute Setting Interrupt After 20 Seconds?

The oscillator is not necessarily fast. In the Epson RX-4803 SA/LC minute mode, the timer counts internal calendar minute updates. It does not start a fresh sixty-second interval after each command. If it is enabled at second 40 and the preset is 1, the first event occurs at the next minute boundary, about 20 seconds later. Verify the source and arming instant before diagnosing oscillator or bus behavior.

Choose a timing reference, not just a number

ETM33E-04 lists four fixed-cycle timer sources: 4096 Hz, 64 Hz, second updates, and minute updates. TSEL1:TSEL0 = 11 selects minute updates as countdown ticks. The preset can be 1 through 4095. The transition from 1 to 0 produces a timer event and sets TF. A low on /INT also depends on TIE and other shared interrupt sources. After the event, the timer reloads its preset automatically. Initial delay and time between subsequent events are different quantities.

Epson's Japanese FAQ explicitly discusses requesting a minute at second 40. There are only about 20 seconds to the next whole minute. The manual also gives a first-interval range from programmed time minus one source period to the programmed time. In minute mode one source period is a full minute. That arming-phase effect is separate from the timebase's frequency accuracy in ppm.

Give the two requirements different names in software. “Mark the next whole minute” belongs to the calendar. “Wait at least one full minute after the action” concerns elapsed time. A nearly immediate initial event can be correct for the first requirement and wrong for the second. Calling both “one minute later” in a log invites the wrong acceptance criterion.

Three examples separate the first interval from repetition

Assume ideal timekeeping, no other interrupt, and no change to the clock or timer state. Arm preset 1 at 12:34:40. Its first boundary is 12:35:00, about 20 seconds later. Preset 2 requires two minute updates, reaching 12:36:00 after about 80 seconds. Arm preset 1 at 12:34:05 instead and the first event is still at 12:35:00, after about 55 seconds. These calculated examples describe the mechanism and do not promise microsecond alignment on a physical board.

Now leave the timer running. For preset 1, if events occur at 12:35:00 and then 12:36:00, the gap is about a minute. For preset 2, an initial wait of 80 seconds does not turn later intervals into 80 seconds. Automatic reload continues counting two whole-minute updates per event. Software that stops and rearms the timer after every event introduces a new arming phase each time; that is not the same as automatic reload.

For a full sixty-second delay from an application action, use a verified elapsed-time deadline. The second-update source reduces the phase window, but retains its own tick alignment, timebase error, and communication delay. It should not be assumed to enforce a strict minimum. Define both earliest and latest acceptance times when they matter, then evaluate controlled monotonic timekeeping or independent high-resolution measurement.

Measure the first pulse from the real arming edge

The manual calls for TE to be zero before writing the preset and starts the countdown when TE transitions to one. Its timing reference is the CLK rising edge at the end of the relevant serial write, not the application call or log entry. Capture serial clock, actual arming, the RTC second reference, and /INT together. Observe TF at expiration and isolate other enabled interrupt sources or record their statuses at the same time. Make sure the low pulse is actually observable. Missing it in one poll does not prove there was no event.

Arm the same preset early, midway through, and late in a minute to see whether the first edge moves with phase. Then keep the timer running and verify the second and third edges. If they still disagree with the documented mechanism, check for repeated TE writes, incorrect timer-source readback, a time adjustment by another task, or an interrupt from a different source. Mark unresolved gaps; do not substitute the time the host task started executing for the hardware event.

For a replacement RTC, specify minute alignment, first wait, automatic reload, and shared interrupt behavior separately. A one-minute setting on both devices does not establish identical behavior between arming and the first event. Keep synchronized writes, readbacks, output traces, and application logs. If the product needs a full elapsed delay, testing only starts near the minute boundary can turn one favorable case into a false guarantee.

Record calendar time and independent monotonic instrument time separately. If a script repeatedly sets the RTC, log device states around the writes. If the RTC is allowed to advance normally, use an independent timing reference for the observed trace. The calendar identifies the boundary being counted, while the external clock measures actual elapsed time at the pin. A host wall clock subject to synchronization can jump, making it a poor elapsed-time reference.

Sometimes the apparent fault is an undocumented expectation. If billing, polling, data collection, and power switching share the same timer feature, decide which events must align to whole minutes and which must wait a full interval. Give them separate acceptance cases and retain each source and preset readback. If multiple code paths configure the register, the trace should identify which changed the mode last. Do not mistake software ownership issues for oscillator drift or defective hardware when qualifying a substitute.

Put the acceptable first-interval range near the test report heading. After a board or driver change, repeat the same phase and sequence rather than confusing a newly armed timer with one that continued running.

Timer event checklist

CheckEvidence to retainWhat to verify
Timer sourceTSEL, preset, and readbackA calendar minute update is not a restarted stopwatch
First eventTE write edge, RTC seconds, and output traceFirst wait depends on arming phase
Zero count and notificationTF, TIE, and other interrupt sourcesAttribute the physical edge to the timer
Subsequent eventsAutomatic reload versus application rearmingDo not use initial wait as the repeat period

Frequently asked questions

Why is a two-minute setting at 12:34:40 not 120 seconds?

It counts two minute updates. In the example they occur at 12:35:00 and 12:36:00, so the first wait is about 80 seconds.

Does an initial 20-second wait mean the oscillator runs three times too fast?

No. Verify timer mode and phase, then check timekeeping accuracy separately. The time between whole-minute updates is not the time remaining until the first update.

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.