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

The RX8804CE crystal RTC reports 60 seconds: leap second or bad data?

A seconds reading of 60 from Epson’s RX8804CE is not automatically corrupt. Check the raw register byte, find the last time-setting operation, and see what happens at the next update.

This real-time clock (RTC) contains a temperature-compensated 32.768 kHz crystal oscillator. Oscillator stability and register validity are different tests. Keep ordinary reads in the 00–59 range. In a controlled positive leap-second test, accept the special value only if the device, the write, the time source and subsequent observations all agree.

Where does a seconds value of 60 come from?

The RX8804CE seconds register, SEC, is at address 0x00. Its normal count rolls from 59 to 00 without passing through 60. The application manual describes a different behavior when software writes decimal 60 into SEC: the value returns to 00 at the next update. This supports a positive leap-second adjustment initiated by the system. It does not show that the module knows when to insert a leap second or that another RTC follows the same rule.

The distinction depends on binary-coded decimal (BCD). A tens digit of 6 followed by a units digit of 0 produces the byte 0x60, which an ordinary unsigned-integer display shows as 96. Passing the decimal integer 60 directly to a raw register writer, on the other hand, sends 0x3C. The low nibble C is not a decimal digit. A trace that says “write 60” is insufficient. Find out whether it reports an application value, a driver argument or the byte on the bus. A driver with a BCD helper should also have a clear conversion boundary so application and driver do not both encode the value.

Store the original seconds byte separately from the decoded candidate value. Use the former to compare with the logic-analyzer trace and the latter for timestamp processing. If the driver masks bits before decoding, retain the unmasked byte for diagnostics. It can help distinguish an unexpected register bit, a bad transaction and a decoder fault.

Verify the read before deciding whether to accept it

First establish which transaction produced the byte. Confirm the target actually is an RX8804CE, the register read was from 0x00, and the copy in memory came from that successful I²C transaction. Check that a failed access does not leave old contents behind. A cached 0x60 is not a current measurement even though this model supports that byte in a specific procedure.

Next look for the matching adjustment context. Only a controlled positive leap-second sequence that issued the write should change the decoder’s rules, and only for that operation. Link the register address, on-wire byte 0x60, successful write, operation identifier, monotonic host time and subsequent observations. An old test switch should not silently allow the value in future ordinary reads. Keep an unexplained 0x60 as a diagnostic observation rather than coercing it into either 59 or 00.

Finally check the next update. The manual describes a return to 00 at that update. It does not promise the first host read must still see 60 or that the interval can be measured from the instant the host issued the command. A first read that lands after an update cannot by itself prove the write did not take effect. Capture the actual bus traffic and collect deliberately timed readbacks to distinguish the device’s state transition from the instant the host sampled it.

Build a trace you can reproduce

Suppose an isolated recorder exposes a positive leap-second command only in test mode. The engineer samples SEC every 50 ms using a monotonic host timer that is not adjusted with the RTC. The 50 ms interval is an example setting, not a guaranteed RX8804CE update window. Suppose the reads at 950 and 1000 ms after the write see 0x60, then the reading at 1050 ms sees 0x00. The observations bracket the transition at roughly 1000 to 1050 ms after the write. If transaction duration is significant, refine the bracket with the bus trace rather than treating the scheduled polling time as the sampling instant.

That example shows an observed 60-to-00 transition in a specific run with a documented write. It does not show that the oscillator ran fast, or that 50 ms was the size of the adjustment. The span between reads measures observation resolution. A useful control run captures the ordinary 59-to-00 transition without writing 0x60. Keep the two traces separate. For absolute timekeeping performance, use a known reference over an appropriate observation interval rather than converting this single-register test into ppm.

CheckEvidence to retainWhat it does not establish
Normal rolloverSuccessful reads of 0x59 and the following 0x00Automatic leap-second insertion
Controlled writeConfirmed model, register 0x00 and on-wire byte 0x60Support for the same byte on other models
Next updateRaw readings, monotonic host times and transaction outcomesThe exact internal update instant
Unexpected readingRegister address, raw byte and status from the same transactionOscillator failure from a displayed 60 alone

At the end of the test, explicitly disable the special path, restore normal reference time, and check a minute rollover. If the device exports RTC values to a database, reporting tool or cloud service, mark the test record separately. A data type restricted to 00–59 may reject or normalize a leap-second value, so the output of that conversion should not masquerade as a normal production timestamp.

What should engineering and procurement do differently?

An engineering team can put BCD and reserved-bit validation in a decoder, then use an explicit adjustment state to classify a result as ordinary time, a confirmed special value or an anomaly. A legal seconds value does not establish that the entire timestamp is coherent. Continue to check date, weekday and consistency across the minute boundary. Which external time reference authorizes an adjustment, which representation the product uses, and whether logs can be joined across that event are design decisions, not decisions delegated to the crystal RTC.

If a field unit reports 60 in normal mode, find where that number was emitted. The value on the display may have come from a decoder, while the actual byte may never have been 0x60. Attach the identified part, register address, transaction result and raw minutes and seconds to the bug report. Swapping RTC modules without this evidence does not establish cause. If the issue appears only with one firmware build, compare buffer handling, retry behavior and BCD conversion before replacing hardware.

For a substitute or a new specification revision, make acceptance of 0x60, the next-update behavior and the upstream representation separate regression checks. The same 32.768 kHz oscillator frequency or a familiar I²C interface does not make the adjustment portable. Even if both devices read and write ordinary calendar data correctly, verify the behavior in each manufacturer’s documentation and on the actual board. Products that never implement positive leap-second handling can keep strict ordinary validation and retain unexpected bytes as diagnostic evidence.

Frequently asked questions

Can I add a second automatically whenever I see 0x60?

No. A controlled process may interpret 0x60 as a special seconds value when it can tie the observation to its own write. Do not let the presentation layer add another second independently. During ordinary reads, preserve the unexpected byte and read again through the normal anomaly path. Decide how to map verified special events into standard time separately.

Would writing 0x60 several times make the trace more reliable?

Avoid using repeated writes as a sampling method. The manual notes that writing SEC clears part of the subsecond count and that repeated writes may accumulate time delay. Improve the trace with transaction timestamps, more frequent read-only sampling or a logic analyzer. A return to 00 at the next update is not a long-term oscillator accuracy test, and writing SEC is not a periodic frequency trim.

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.