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

Why an Epson RX8804CE Crystal RTC Can Flag an Event but Show an Old Timestamp

Separate three pieces of evidence: the current level on EVIN, whether the module has detected an event, and whether this event updated the timestamp. Epson's RX8804CE provides EVMON, EF, and timestamp registers for these purposes. The timestamp depends on ECP and RCE. EF set to one does not make the date already in the registers the time of the current alarm.

Detection, capture, and interrupt notification have separate controls

The ETM59E-07 application manual from Japan's Seiko Epson places the RX8804CE timestamp data at 10h through 16h, capture enable ECP and repeat capture RCE at 17h, and event history EF and input monitor EVMON at 18h. EVMON reports the EVIN level, not its edge history. EF records detection history; it is not a counter and carries no timestamp version. Preserve the field names separately even when fields share a byte. Do not have the interface relabel them all as “event OK.”

ECP controls timestamp capture. With RCE zero, a valid capture automatically clears ECP. No new timestamp is captured until ECP is set again. With RCE one, a valid capture does not automatically clear ECP; subsequent detections overwrite the same set of timestamp registers rather than joining a queue. Single capture can freeze one event after arming, while repeat capture can retain the most recent capture. Neither supplies a device-level event log, and reading EF does not by itself associate that read with existing timestamp bytes.

EIE separately controls the event's contribution to /INT, which other interrupt sources can also pull low. Deciding a capture succeeded from a pin level alone confuses host notification with data storage. The timestamp month byte also carries voltage-related flags captured with the record. If the record is old, interpret those flags in the context of that earlier event rather than assigning them to a current alarm. During verification, collect raw bytes and settings before applying any application-level interpretation.

Worked example: which timestamp survives two events 7 s apart?

For a simplified example, complete setup and set ECP before 14:20:00. A separate test instrument generates two events at 14:20:03 and 14:20:10, meeting the EVIN polarity, pulse duration, and spacing requirements, with margin from second boundaries. Assume that the displayed whole-second timestamps, if captured, are those two times. Assume no voltage faults, resets, or interfering accesses. The host examines the result at 14:20:12.

With RCE zero and no rearming between events, the first capture leaves 14:20:03, then ECP clears automatically. The second event does not write new timestamp fields. Calling the stored result the second event time would report it 7 s early. With RCE one and capture remaining enabled, the second capture overwrites the first and the host sees 14:20:10 under these assumptions. Calling that the first event would report it 7 s late. A single stored record does not prove there were two events; the independent source provides that fact in this example.

If the project plans to save every event in single-capture mode, do not use this 7 s test as proof. The previous record must be recognized and saved and the module rearmed as planned. An event arriving before then is at risk of going unrecorded. If every event in a burst is required, choose a solution with suitable recording depth for the minimum spacing, likely host busy intervals, and loss-of-power scenarios. Do not claim that overwrite mode provides that buffer, or that bus bit rate proves software can read each event in time.

Make the log say whether it holds the first event or the newest capture

Begin a debug run in a known state before the host has read or cleared flags. Capture one external trigger, a second without rearming, and one more after rearming. Stay within applicable pin polarity, debounce configuration, and supply conditions. Preserve raw EVIN and /INT waveforms together with the bus trace, and record EF, EVMON, ECP, RCE, and timestamp data separately. Mark read times and identify which software cleared flags so a background task does not silently change the evidence.

For application testing, have the external source emit distinguishable event identifiers and keep them in an independent record. Establish state-machine behavior first with well-spaced events away from whole-second boundaries, then test closely spaced events, host blocking, and power recovery as appropriate. A whole-second field cannot independently distinguish multiple captures within the same second. Do not start by generating events with identical displayed values and treating an unchanged number as proof of no capture. If the application must order events within a second, use a separate source of ordering or finer timing rather than appending milliseconds from host processing.

Also consider a read that overlaps a new event. In repeat capture, the record present before the read may not be the one present afterward. Read using the documented method, check for any applicable coherency behavior, and verify the overlap boundary on a controlled sample. Without sufficient evidence, do not combine multiple bus reads and call the result one guaranteed coherent timestamp. Preserve the raw data and error state or use a design that explicitly freezes and transfers a record.

The application log should distinguish waiting for an event, receiving a complete timestamp, and detecting an event without a new timestamp. In tests with independent event identifiers, log each rearm and associate it with the relevant capture window. Then even when a value happens to match the previous one, the test state can distinguish whether to read again, wait, or report.

Give maintenance a minimal reproducible example: establish a known old record, save it and the settings, then let a new alarm arrive. If the interface displays the old bytes as the new event, correct data validity handling and display text instead of tuning the crystal or rewriting historical logs. After a driver change, repeat the same alarm sequence and check that normal single-capture and overwrite behavior is still reported correctly.

Engineering and purchasing checklist

CheckEvidence to retainInterpretation
Trigger and levelEVIN trace, EVMON, polarity, and configurationCurrent level is not detection history
Event historyRaw EF and access timingA flag does not prove an updated timestamp
Capture policyECP, RCE, and rearm timeSingle capture and repeat overwrite differ
Application needsFirst or latest event, minimum spacing, and required depthOne group of registers is not a queue

When qualifying a replacement, specify which event must be retained. Do not list only a built-in 32.768 kHz crystal clock and external event input. A sample can keep entirely correct calendar time while applying different rules for capture, clearing, and overwrite. Attach the applicable controlled manual to the replacement record and repeat the same externally generated event sequence. Matching displayed dates does not establish event identity.

FAQ

Does writing zero to clear EF also erase the old timestamp?

Do not infer that. EF controls event history; it is not a command to advance the timestamp version or initialize the captured data. The application must manage record validity separately rather than treating old fields as a new capture.

Does changing RCE to one recover previous missed events?

No. Repeat overwrite changes how later valid captures write the current fields. It cannot reconstruct records that did not get saved or have already been overwritten. A complete history needs separate acquisition and storage.

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.