When the RX8111CE records multiple timestamps, 40h through 7Fh is no longer ordinary application storage. Migrate old data first. Bus access does not mean software still owns those addresses.
A firmware upgrade can give the same addresses two owners without changing the board. Older code stores backup settings in RTC user RAM; newer code asks the RTC to record events there. Readback can look correct until a later event overwrites application data or an application write corrupts history. Check the mode bit and who writes each location before attributing the problem to the crystal.
What changes at 40h through 7Fh?
Epson's RX8111CE contains a 32.768 kHz crystal. In ETM612E-03, TSRAM at 34h selects the use of 40h through 7Fh. With TSRAM at 0, the range is ordinary read/write RAM. Events can still update the single-record timestamp registers, so this does not turn off every timestamp. With TSRAM at 1, the shared range stores multiple records. It remains accessible for reads and writes over the bus. Reading back a byte that software just wrote does not exclude a later hardware write.
The multi-record area also has a different format from the single-event registers. The manual says it omits the 1/1024-second and weekday fields. Confirm the record layout, index, and status rather than reusing the single-record parser. If a design needs subsecond precision to tell two events in the same second apart, enabling history alone does not provide that information. Preserve finer timing elsewhere or state the available resolution instead of filling absent fields with defaults.
Separate the two control operations. TSRAM changes address ownership. TSCLR initializes record status and the pointer, and the manual calls for ETS to be zero before clearing. Do not treat that action as restoring a valid 64-byte configuration or use cleared state as proof that every physical byte was erased. Check the dedicated empty state and pointer, then interpret data according to mode.
Worked example: A 48-byte legacy configuration leaves 16 bytes. Are they still shared?
The inclusive range 40h through 7Fh contains 0x7F−0x40+1 = 64 bytes. Suppose old firmware stores 48 bytes of configuration there, leaving 16 for expansion. An upgrade proposes to use only the unused 16 bytes for history. TSRAM does not define that partition. It changes the role of the entire range, regardless of how much the previous application used. The sizes are hypothetical, not Epson's allocation for application data.
Read the complete old configuration while the area is known to be ordinary RAM. Check its integrity, version, and fields, then copy it to appropriate persistent storage elsewhere. Enable multiple records only after validating the copy. If an old routine still writes to the range afterward, it can modify timestamp memory. An event can also overwrite the bytes the routine just wrote. A passing immediate readback does not establish ownership for either writer.
Suppose power fails during an update. If the system already marks the new feature enabled but has not committed the config copy, recovery may no longer find complete data under the planned procedure. Distinguish “not migrated,” “copy verified,” and “new mode active.” If the process is incomplete, use the project’s fallback and preserve diagnostics instead of inferring settings from remaining bytes. The device's mode bit does not commit a complete firmware migration.
How can a regression test expose conflicting writers?
List every code path that touches 40h through 7Fh: startup, factory tests, backup recovery, diagnostics, and error handling. Each needs to know the active mode. If a fixture writes a marker before application startup and there is no initialization agreement, the bytes may resemble a false event. If both modes are supported, separate the application interfaces for configuration writes and history access. Do not let a generic address routine bypass the check.
Test three paths. First retain ordinary RAM and verify the old configuration and any required single-event timestamp. Then enable history, inject controlled events, and check flags, format, and recorded resolution. Finally interrupt migration or roll it back and verify that old configuration is not interpreted as history at any interruption point. Record which events trigger the hardware. Reading the range with no events does not exercise the conflict.
Distinguish empty hardware history from uninitialized application storage. They are different states. An empty pointer can coexist with readable bytes; those bytes are not necessarily valid history. If the host has already exported some events, define where recovery resumes to avoid counting the same item again. Use record status to identify valid data before decoding. A fixed all-zero or all-one filling pattern is not sufficient.
Keep mode, event time, register status, and host log from the same session. On an otherwise working unit, test a mode change with recognizable data so an unintended legacy access can be detected. If field upgrades must be supported, run the actual released firmware through the upgrade rather than testing only a freshly programmed board.
If the product has external backups, verify which type of data each export preserves. An old application-only export is not an event archive. A new event-only export should not be used to rebuild power settings when rolling back. Version and identify both export formats. A maintenance tool should show the active mode when reading the range so an operator need not infer it from hexadecimal. If mode or data validation fails, pause writers and preserve the original readback before deciding whether to initialize the region again.
If configuration has been overwritten and cannot be recovered, do not overwrite the unit from an unidentified export. Verify backup format and available fields for the equipment revision first.
Engineering and procurement checklist
| Item | Retain | Review check |
|---|---|---|
| Device and document | Full RX8111CE code and manual revision | Do not copy the memory map of another RTC |
| Address ownership | TSRAM at 34h, writers to 40h–7Fh, and states | I²C access does not establish exclusive ownership |
| Migration | Old config, verified copy, interruption and rollback records | The whole range changes role together |
| History | Mode, state register, pointer, and valid fields | Single-record resolution does not apply to every history entry |
Two common questions
Does turning off multiple timestamps eliminate all snapshots?
No. TSRAM at 0 preserves ordinary RAM use, and the manual still describes the single-record path. Event generation depends on the relevant trigger and device settings.
Can a TSCLR operation turn readable bytes into an empty application configuration?
No. Its evidence concerns record state and pointer initialization, not application configuration. Use a separate format check, version, and recovery procedure.
