The Epson RX8901CE/RX4901CE wake timer gives two meanings to the same three registers. With TE clear, they read as the current preset. With TE set, they show the live counter. During operation a three-byte read can straddle a carry and produce a value that never existed. Record TE and the raw bytes, then reread as specified. Do not stop the timer to “freeze” the evidence and call the resulting preset the last count.
The same addresses mean different things when stopped and running
The manual assigns WTCNT_L, WTCNT_M and WTCNT_H to 0x0A, 0x0B and 0x0C. The low, middle and high bytes form a 24-bit value. With the wake timer disabled, they show the configuration preset. With the timer enabled, they report the current count. A jump on a plot that mixes these two kinds of samples may reflect a change in meaning, not a crystal frequency change.
Set the preset with TE clear. The supported period count is 1 to 16,777,215. If written with 0x000000, the device treats the preset as 0x000001 for counting, not as timer disable. When the counter exceeds the preset, it loads the initial count of 1. This differs from a common countdown-to-zero timer. A field labeled “remaining count” should distinguish the reported live count, the preset and any calculated remainder.
Epson also allows these addresses to act as general-purpose read/write registers when the wake timer is unused and both TE and TIE are clear. Identify this case when reviewing existing firmware. A plausible value does not prove the wake timer is using it. In a test tool, provide separate actions for reading the configuration and sampling the live count instead of hiding the mode behind one button.
A carry can occur between bytes
Suppose the count changes from 0x00FFFF to 0x010000 during a read of low, middle and high bytes in that order. If the first two bytes are old and the high byte is new, the assembled value is 0x01FFFF. The real values differ by one count, but the mixed value appears to jump much farther. This illustrates the risk; it does not predict exactly when mixed readings occur or require debugging the device at that point.
Epson calls for two or more readings while operating until two successive complete values match. Compare whole three-byte readings, not individual matching bytes collected at different times. If another task changes TE between the reads, the values no longer have the same meaning and should not be accepted just because the numbers match. Retain acquisition times and evidence of mode consistency.
A diagnostic view might show “preset 0x020000; live count 0x010000.” The preset comes from a verified stopped-state read or controlled configuration record; the live value comes from a valid reread. Clearing TE and then reading 0x020000 does not prove the timer jumped there before stopping. If no consistent live snapshot is available, report it as unavailable rather than filling it from a disabled-state or cached value.
Resolve the read first, then investigate timer accuracy
Define the applicable bus mode and speed, duration of a complete read and retry limit. With a faster source, successive reads can keep changing. That is not proof of crystal drift. Retry within the application’s permitted time and report a distinct result if there is no match. Do not wait indefinitely for a display update or accept two merely similar numbers as evidence of a coherent read.
Keep the physical wake edge separate from the counter snapshot. If the problem is late system wake, capture the actual output or interrupt, host sleep entry and recovery, and preserve the timer-source settings. A correct count does not establish that an interrupt reached the receiver or that the receiver detected it. A serial log may include software latency; distinguish that latency from timekeeping error.
Also review who controls the timer. If another task can stop it, restart it, change the preset or change the source, define write ownership and how mode changes are recorded. On engineering boards, test disabled reads, running rereads, carries and mode changes as separate conditions. Do not casually stop a production unit to inspect its running state; use the approved procedure for changes.
On a short-period configuration, matching values may come from different timer periods, especially when a logger samples slowly and the count happens to return to the same number. The reread rule qualifies a reading; it does not count successive wake events. Use external capture or a verified event log to count events and align them with acquisition time. Record the interval between reads against a separate measurement timebase. This distinguishes reads intended to produce a consistent value from observations meant to measure elapsed time. A lone hexadecimal column cannot do both jobs.
Four records prevent a configuration issue from becoming a crystal fault
| Check | Keep | Not a substitute for |
|---|---|---|
| TE and mode | Effective setting, changes and read interpretation | Using a stopped value as a live count |
| Counter reading | Complete successive reads, byte order and acquisition time | Treating a mixed carry value as a real jump |
| Preset | Exact model, applied configuration and zero handling | Using zero as a disable command |
| Wake verification | Physical output or interrupt, host recovery and selected source | Using a software log as the edge |
Use separate acceptance criteria for coherent reading and successful wake events. The first proves the software obtained a value with the intended meaning. The second proves the system used the event when due. For service replacements retain interface, firmware settings and board revision. Two modules with a 32.768 kHz crystal need not share a preset or observation method. If the customer only wants to know whether wake is on time, begin with a hardware trace and use register evidence to locate the discrepancy.
Use separate display units in diagnostics: preset in cycles, the current count as a raw value, and any calculated time remaining with its timebase and calculation time. That prevents a misplaced field after a firmware update from turning a raw register value into apparent seconds.
Frequently asked questions
Can I clear TE and read the last count?
No. The manual defines the read with TE clear as the configured preset. To sample the live counter, keep it enabled and use complete three-byte rereads.
Do two identical readings prove the timer stopped?
No. They may have fallen within one count interval. Check TE, the selected source and actual event records.
