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

Why Are Two Fractional Timestamp Bits Missing on an Epson RX4111CE RTC?

Check the read path. Epson shows fractional seconds split across two direct timestamp addresses. The pointer-addressed record shows only the upper eight fractional bits, so the original two low bits cannot be reconstructed from that field alone.

Two read paths do not store identical fields

The Epson RX4111CE is an SPI RTC module with a 32.768 kHz quartz crystal. Figure 36 in ETM62E-04 splits fractional seconds across direct addresses. Bank 2 address 1h contains eight bits weighted from 1/2 through 1/256 second. Bits 1 and 0 of Bank 2 address 0h represent 1/512 and 1/1024 second. The figure's pointer-addressed field shows only weights from 1/2 to 1/256 second. This is a record-format difference, not missing characters in a decimal display.

Table 55 provides an address summary, but its fractional names and divider descriptions should not be used as per-bit weights. For example, the entry for 1h includes 1/128S in its summary name, while the last bit of that byte is labeled 1/256 second in the figure. Decode this field from Figure 36's bit boxes. For a different controlled manual revision, verify its mapping or get confirmation before mixing diagrams and tables from different versions.

Join binary weights rather than reading a decimal digit

If both bytes belong to the same direct event record, shift the byte from 1h left by two and combine the low two bits from 0h. The resulting count is 0 to 1023. Divide it by 1024 to express the fraction in seconds. For the pointer field with only eight bits, use a divisor of 256. It can also be shifted left twice to use a common denominator, but the two positions are unobserved rather than read as zero. Keep the acquisition path and represented precision distinct from any formatted millisecond result.

Take whole seconds from the same event record, not a subsequent read of the live seconds counter. Combining one event's fraction with another's whole seconds can create a jump at rollover. Follow the manual's record-read procedure for consistency rather than mixing selected Bank 2 and pointer data after moving between records. A software read time is not the event time. Even if host processing occurs later, identify which saved event the data came from.

FieldWeight in Figure 36Handling
Bank 2 1h1/2 to 1/256 secondUpper eight fractional bits
Bank 2 0h low bits1/512 and 1/1024 secondMask the unrelated upper positions
Pointer fractional field1/2 to 1/256 secondDo not restore missing bits
Seconds and statusSame timestamp recordDo not fill old events from live counters

Example: 0x80 and 0x03 versus 0x80 alone

Suppose the same direct event yields 0x80 at 1h and 0x03 at 0h. Multiply 128 by four and add three for a count of 515. The fraction is 515/1024 or 0.5029296875 second, about 502.93 ms. Equivalently, the top bit represents half a second and the last two positions add 1/512 and 1/1024 second. This is a synthetic test vector, not a measured capture.

Suppose the pointer record for that instant provides 0x80. It represents 128/256, or 0.500 second. In this constructed example the lower two direct bits account for about 2.93 ms. A software log showing the two results does not necessarily indicate a change in oscillator frequency. Direct resolution is about 0.97656 ms per count, and pointer resolution is about 3.90625 ms. Neither encoding step guarantees timestamp accuracy or limits interrupt, input, or host processing delay.

Two events may occupy the same upper eight-bit interval, so the fractional pointer field alone cannot establish their order. Retain record order and read path rather than inferring sequence from extra printed decimals. If the application needs to distinguish events closer together, verify the trigger path and saved record format against total system timing and an independent reference. The finest listed encoding is not sufficient evidence.

Make hardware and software tests describe the same capture

Start with synthetic byte pairs to test the top and bottom of the high byte, the low-bit mask, and a whole-second rollover. Then generate repeatable events on the board while recording the acquisition path, raw data, and a reference timestamp. Synthetic tests verify bit order, weighting, and units. Board tests characterize actual capture and retrieval. Three digits after a decimal point do not establish millisecond timing accuracy.

Flag a failed read as unknown or incomplete rather than silently supplying zero. If 1h was read but 0h did not return, a retained result can indicate eight available bits; it is not equivalent to a complete direct capture. Keep timestamp path, valid bytes, whole seconds, and decoded value with firmware test records. When two timestamps differ, service can then distinguish format, decoding, oscillator, and trigger causes.

If reporting in milliseconds, document rounding and retain raw fractional data if used for investigation. A UI may display integer milliseconds by design, but identical display values do not prove two events were simultaneous. Preserve original bytes and trigger records rather than relying only on rounded screenshots when diagnosing faults.

If records are exported to a database, document valid resolution as metadata rather than imposing the same decimal string in transport. Stored timestamps may later be sorted, deduplicated, or subtracted. Equal pointer values do not establish simultaneity within an interval where low bits are unobserved. Preserve device record order or a host sequence number where needed, and document format changes when upgrading firmware.

A repeatable boundary test uses an all-zero fixture value for zero fraction, then sets every available direct bit for 1023 counts, not one full second. Record that whole seconds are separate. This catches a denominator of 1023 or a rounding carry counted twice. Such vectors define arithmetic boundaries only; they do not guarantee particular capture codes on real external events. Evaluate the actual capture timing with the same configuration and an external reference.

Common questions

Is the lowest bit of 1h worth 1/128 second?

No. Figure 36 labels the lowest bit 1/256 second. Use the complete bit map, not the abbreviated name in the address summary.

Can I fill pointer records using two bits read later?

Do not assume those bits belong to the same event. Treat fields absent from the pointer record as unknown. Use the two direct low bits only when retrieving a complete direct record for that same event.

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.