The same control bit answers different questions on writes and reads
Not on that evidence. Bit 7 of control register Fh on the Epson RX-4035SA is BANK on writes, selecting the ordinary clock/calendar or timestamp bank. On reads, the same position is TSFG, which reports timestamp validity. Writing one to select the timestamp bank does not require a subsequent read of one. A zero can mean a valid timestamp is not available without proving that the ordinary clock bank is selected.
A generic readback check that compares an entire control value to the written value can falsely report failure. Conversely, a read of one is not direct confirmation that the intended BANK command was received. Treat the write action and the read observation independently.
Identify the intended data before choosing a check
Writing BANK zero selects clock and calendar registers, while writing one selects the timestamp bank. Addresses 0h through 6h of that bank expose read-only captured fields from seconds to year and related information. To check the selected data in a lab, establish a distinguishable captured record and compare it with an ordinary calendar read. Keep the selection transaction with the evidence. Equal addresses are not equal functions across banks.
Use TSFG to check whether a timestamp is trustworthy. Epson's documentation ties it to oscillator-stop status XSTP and voltage-detection status VDET at the event. A successful bank switch and an invalid timestamp can coexist. Preserve status and the bytes rather than trying to write a value that makes a readback look as expected.
Selection is a bus operation, not just a software variable. A cached BANK setting describes software intent. The actual SPI trace establishes what was sent. If another task can access the same device, define ownership across selection and read, then verify that another task did not intervene between them.
Preserve four evidence types separately
| Item | Evidence to record | Does not establish |
|---|---|---|
| Write to Fh bit 7 | BANK request, transaction and related accesses | A read of the same bit returns bank |
| Read from Fh bit 7 | TSFG and applicable validity status | BANK value was echoed |
| Timestamp contents | Addresses 0h through 6h in the intended bank | Any readable bytes are trustworthy |
| Evidence and provenance | Device, direction, event and firmware | Identical behavior on other models |
For read-modify-write code, do not copy TSFG into the next BANK command. In a hypothetical case the host reads TSFG zero but intends to stay in the timestamp bank. Copying the read bit back into the write field requests BANK zero. Verify the write behavior of each other field separately; a generic register mask does not prove correct handling.
Rearming is another separate operation. Epson says clearing EDEN clears the captured timestamp. Do not clear it while the application still needs to read the existing record. Separate bank selection, validity check, data preservation and rearming. A later successful capture cannot reconstruct erased original bytes.
Distinguish bank selection and timestamp validity on the bench
On an approved board, record model, firmware, event stimulus and initial state. Start from a known calendar, capture a distinguishable timestamp, and compare ordinary and captured reads. Observe appropriate results before the event, afterward and before rearming. An acquisition should identify bus address, direction and data for each transfer, retaining the returned flag and BANK request separately rather than only an application error string.
Split the investigation into two questions. For bank selection, verify that the addressed fields match expectations and that no intervening selection occurred. For timestamp quality, preserve TSFG and associated status and apply Epson's validity rules. Use evidence from the same run. Filling gaps with another run's state makes a complete-looking report without identifying the actual cause.
Name the read and write meanings explicitly in the driver. Keep one good example and one test with no valid capture so a future revision cannot treat a different read bit as bank-switch failure again. An application can distinguish bank-access trouble, invalid timestamp and missing evidence rather than classifying every case as a broken clock.
To reproduce a read-modify-write problem, start in a documented empty-record condition and observe the bank request and then the source of the data. Create a second case with a known valid event and retain both results. Use the same software revision to exclude parser changes. If an attached debugger polls registers automatically, document what it reads and when rather than using a same-named watch field as evidence of a write.
Keep transaction completion, bank identity and timestamp validity as separate application results. Before releasing a software update, simulate a missing valid timestamp with successful access. Check that the application reports unavailable data instead of repeatedly rewriting the bank. If recovery previously cleared status, verify that it does not destroy evidence before reading it. A later correct screen is not a replacement for a missing trace.
For another model, read its own bit definitions. Another BANK field may actually read back or may only be meaningful on writes. A common driver can expose a shared interface, but retain device-specific semantics and tests instead of assuming this mapping applies to every RTC.
Frequently asked questions
Does a zero after writing one require retrying until it reads one?
No. The read bit is TSFG, not an echo of BANK. Check selection through the actual access and associated bus evidence.
Does TSFG equal to one identify which capture was read?
No. Validity does not identify the record. Confirm the bank, complete bytes and association with the event separately.
