Using TE to implement a “pause” on the Treat “continue” and “start over” as separate product choices. A user cancellation should not reuse the old task after recovery. Leaving a display page may instead allow counting to continue while notifications are masked. Calling both actions pause makes it easy to select the wrong operation at entry or exit. State the intended product behavior in the handover, not just which register was changed.
For retest, use a known preset and expected event. Check the basic counter and then recovery. Normal counting does not establish correct reconstruction, and a plausible resume does not show that all interrupt modes report correctly. Keep these cases together in the test version so any later backup or low-power mode has explicit conditions to recheck rather than relying on a screenshot showing that something rang.
RTC-8564JE does not preserve a countdown. Epson’s ETM11E-05 manual says that changing TE from one to zero invalidates both the current counter and the preset. Write the preset again while TE is zero before restarting. If a product needs pause and resume, the host must save and reconstruct the remaining time. The enable bit does not implement that behavior.
Separate stopping, masking notification and clearing an event
TE controls counting. TIE controls whether the timer event is reported on /INT. TF records an event. A routine may update all three in sequence, but suspending notification and suspending the timer are not interchangeable.
| Action | Result in this module | What it does not establish |
|---|---|---|
| Change TE from 1 to 0 | Current count and preset become invalid | Setting TE again resumes the old count |
| Rewrite preset with TE at 0 | Supplies a new count before restart | Preserves the phase of the previous timer |
| Write TIE to 0 | Stops timer reporting on /INT | Stops the counter |
| Clear TF while TE remains 1 | Clears the recorded event; counting can continue | Cancels the timer task |
If the system only needs to suppress wakeups, stopping TE may not be necessary. Decide what TIE should do based on the product’s event policy. In level-interrupt mode, the manual also cautions that enabling TIE with an uncleared event can pull /INT low immediately. Masking notification does not erase event history or settle what should happen when notification is restored.
Keep the remaining count separate from the software goal
With a 1 Hz source and preset 10, suppose the system confirms a current count of 6 after four ticks and before the fifth. To save the remaining six count units, read them before stopping and account for a possible tick between reading and stopping. After TE clears, do not use the current register value as a valid remainder. Rewriting 10 starts another ten-count timer rather than resuming the interrupted one.
Why reloading 6 is not exactly a six-second delay
The manual states that the 1 Hz source is linked to the RTC’s internal second update. If the timer starts at phase 0.9 seconds within a second, its first tick may occur about 0.1 seconds later. Subsequent ticks use the normal interval. Restarting with six counts can therefore yield an idealized event about 5.1 seconds later, not six full seconds from the command. That example omits bus transfer and software timing, so it is not a fixed measured delay.
Decide whether the pause feature saves whole timer ticks or a real duration to a deadline. For whole ticks, allow for the boundary of the source-clock period as applicable. A tighter duration requirement needs a separate time reference and recovery design. A preset register is not a high-resolution stopwatch. If an absolute wakeup time is the actual requirement, preserve that target rather than losing it in a nominal resume operation.
Reading the remaining value does not freeze it
The counter can change during a read. The manual advises reading twice and comparing for an accurate observation rather than assuming serial access latches the count. Even equal reads do not remove the time between readback and stop. Record both values and when the stop occurred. “Read 6” is not evidence of exactly six seconds remaining after restart. If the gap is unacceptable, establish a verifiable application-level recovery rule.
Test the actual product behaviors separately
Test notification masking and restoration without stopping the timer. Separately clear TE, rewrite the preset and restart, confirming operation from the new value. Capture serial writes, /INT waveform and event flags on one timeline. A static pin reading cannot distinguish a timer that did not start, reporting disabled and an uncleared event.
At 64 Hz, one source cycle is 15.625 ms. At 4096 Hz, it is about 244.14 microseconds. Do not save the timing parameter in milliseconds and reinterpret it as seconds after wakeup. Verify interrupt mode and how the receiver detects it in addition to the count unit. A pulse width or a released line cannot recover an earlier count, and reading the count cannot replace observing the interrupt.
Test a host reset between masking notification, stopping the counter and writing the preset as applicable. The software must define how it handles a partial update; one successful run does not establish recovery from interruption. If the host maintains the configuration, it should recognize which parts of the sequence already ran, rather than reusing a previously saved count automatically.
Correct the control sequence before replacing a part
If the calendar advances but timer wakeup is wrong, check configuration and sequence first. A replacement with the same oscillation frequency cannot fix a mistaken interpretation of TE. On the repair record distinguish invalidation of the old count, rewriting of the preset and clearing the pending event, and record the selected source. For a different module, check its own manual instead of assuming the whole family behaves identically.
To restore basic wakeup, confirm a preset write with TE at zero, a new event from the selected source after restart and /INT reporting when required. If the product also promises user-visible pause and resume, verify whether paused time counts, how remaining time is rounded and which record is used after power returns. Keep these acceptance decisions separate.
What to hand over to firmware and test
RTC-8564JE does not preserve its current count and preset as resumable state after stopping. Rewrite the preset with TE at zero. To approximate the previous remaining duration, save and reconstruct it in software. Distinguish integer ticks, first-tick phase, event flags and external reporting so documented behavior is not mistaken for a failed device. Log the pre-stop state, the completed preset write and the actual notification time separately so counting and wakeup can be reviewed independently.
