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

Why can switching banks on an Epson RTC-7301SF round the time?

Legacy Epson RTC-7301SF modules share address F across banks. Its least significant bit reads as BUSY but writes as ADJ. Generic read-modify-write code that changes only the bank field can echo a busy read as a time-adjust command. When a unit unexpectedly jumps to a minute boundary, inspect the actual write to F before attributing it to oscillator accuracy.

A bit’s read value may not be safe to write back

Epson ETM15E-05 defines the four bits of F, from high to low, as Bank Sel 1, Bank Sel 0, STOP and BUSY/ADJ. The low bit reports busy when read. Writing one requests a 30-second adjustment rather than preserving busy state. For a bank switch without adjustment, explicitly write zero in that position and write the intended STOP state. A general-purpose read-modify-write routine is particularly likely to persist a bit whose read and write semantics differ.

The bank field is not a simple count. The table maps 00 to Bank 0, 01 to Bank 1, 10 to Bank 2 and 11 to Bank 1 again. Do not expect an independent Bank 3 or assume an erroneous selection will be rejected. Bank 0 covers calendar and clock, Bank 1 alarm and FOUT, and Bank 2 digital adjustment and timer. Equal external addresses do not establish equal meaning. Identify bank, address and access direction before decoding a value.

BUSY one can indicate normal counting or adjustment activity, not an immediate hardware failure. Calendar reads follow the manufacturer’s waiting and reading procedure. That differs from selecting a bank. Do not funnel both through code that echoes BUSY into ADJ. Give one defined driver operation ownership of selection, access and restoration.

Worked example: a write that appears to preserve state can do something extra

Suppose F reads 0x1: bank bits are 00, STOP is clear and BUSY is set. Firmware intends to change the upper bits to 10 for Bank 2. If it preserves both low bits and writes 0x9, the low bit is still one. Under the write semantics it issues a time adjustment. With continued counting and no requested adjustment, the constructed value in this example is 0x8. This compares four-bit codes; it is not advice to bypass the manual’s bus timing or make exploratory writes to production equipment.

Suppose an illustrative adjustment occurs when seconds read 42 and minutes read 34. The manual says that for seconds from 30 through 59, the operation clears seconds and advances minutes. It can therefore move 12:34:42 to 12:35:00. Ignoring normal progress, read races and processing time, that is an 18-second forward adjustment. It is not the result of every bank switch. For seconds from 00 to 29, the rule instead clears seconds without adding a minute. Compare the actual BUSY, write and clock state when troubleshooting.

If an attempted switch to Bank 0 instead leaves bank bits 11, address 0 reads the seconds units field in Bank 1 rather than the clock seconds units. Both can be valid digits, so a range check may not catch the mistake. The raw bank selection and address matter more than a decoded timestamp alone.

Preserve the actual four-bit writes in service and regression

Capture chip-select, bus controls, address and data, marking each read and write of F. Whether a low-bit busy read is followed by a low-bit write depends on the signals at the device. Host logs may only say “switch to timer,” omitting the complete code. If tasks, interrupt handlers or diagnostics can all change bank, record their actual ordering.

Treat a calendar read, alarm access and timer access as controlled operations with identifiable owners. Verify that ordinary bank switches neither change STOP nor issue ADJ. Verify that intentional adjustment still follows the manufacturer’s procedure. Cover restore after power-up, transfers around second rollover and interleaved application tasks in regression. Do not introduce unexplained writes into an operating production clock just to reproduce the problem.

Epson lists the SF model as discontinued. A good maintenance result does not restore long-term supply. If replacing the module, recheck address selection and mixed read/write semantics. A similar four-bit bus or a successful time read does not establish compatibility. Mark any suspect historical timestamp interval separately; a valid reading after repair cannot certify older records retroactively.

To verify the state around a failure, use an isolated service fixture or development board rather than rewriting a live product clock. Capture a baseline sequence that does not intend to adjust time. Identify each actual F write, the bank read next and whether the clock advances normally. When testing intentional adjustment on that fixture, use a recognizable test time and avoid another diagnostic tool writing the same register. A backward jump can also fit this mechanism when the original seconds value is below half a minute. Keep the intended system action and actual device commands side by side to diagnose them separately.

Production logs can distinguish an actual time-setting request, its authorized application path and time source from diagnostic bank operations. A function that should not adjust time should use an operation that cannot issue adjustment accidentally. Verify transmitted bits with fixed test inputs rather than checking only return values. If an operation is interrupted, confirm that later accesses reestablish their target bank instead of assuming the previous operation restored it before stopping. This preserves real driver dependencies for a future replacement.

Some service records include formatted dates, hours and minutes but omit seconds and event ordering. They cannot establish when rounding occurred. Distinguish cases with sufficient evidence from unresolved cases. Finding one reproducible bug does not explain every historical anomaly. Record driver revision, board ID and recovery power conditions when comparing versions.

Firmware and legacy-board checklist

CheckEvidence to retainCommon error
Address FActual written bits and STOP stateEchoing read BUSY into a write
Bank selectionBank selected for each actual transactionAssuming 11 means Bank 3
Time jumpAdjustment write, clock value and event timingAttributing it first to oscillator frequency
RegressionSeparate rollover, deliberate adjustment and bank-switch testsPassing on one legal digit

Frequently asked questions

If F reads zero in the low bit, does that prove no adjustment was triggered?

No. A current readback is not a history of actions. Check the sequence of writes and time events and distinguish them from normal rollover.

Can the existing generic read-modify-write routine remain in use?

Not as-is if it assumes every bit has interchangeable read and write semantics. Construct the write according to the manual with explicit bank, STOP and ADJ values, and verify it on the bus.

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.