Do not treat the power-on default as the normal operating configuration. The manufacturer lists TESTC, bit 3 of Control/status 1, as defaulting to 1, but directs normal-operation software to set it to 0 to disable the power-on reset override facility. Bit 7, TEST1, selects external-clock test mode instead. Keep test controls separate from timekeeping setup, and do not use blanket equality of an entire readback byte to decide whether one bit is properly configured.
The default and the operating target answer different questions
This real-time clock uses a 32.768 kHz crystal as its timebase and gives the host an I²C interface. In Control/status 1 at hexadecimal 00h, TEST1 at bit 7, STOP at bit 5 and TESTC at bit 3 are separate functions. TEST1 at 0 selects normal mode while 1 selects EXT_CLK test mode; STOP at 0 permits the RTC to run; TESTC at 0 disables the power-on reset override facility. Their documented power-on defaults are 0, 0 and 1. Bits marked with a dash are written as zero, but may read as zero or one. Do not assign undocumented meaning to an unused bit just because it reads back as nonzero.
The wording for TESTC at 1 matters: the manufacturer says override may be enabled. A read of 1 does not establish that the most recent reset was actually overridden. Nor does writing 1 provide a documented production reset procedure. That table does not describe the trigger, what an override preserves, or what external conditions are needed. Setting the bit to 0 selects the stated normal operating behavior; it does not recover lost time data.
| Item in 00h | Documented function | Normal timekeeping check |
|---|---|---|
| D7 TEST1 | External-clock test mode selection | 0: normal mode |
| D5 STOP | Time count control | 0: run |
| D3 TESTC | Power-on reset override facility | 0: disabled, although the default is 1 |
| D6/D4/D2–D0 | Unused bits | Write 0; do not fail on raw read value |
Copying the power-on byte can preserve the wrong setting
Suppose a test reads 08h on a new board and the developer copies that value into the production initialization table because it seems close to the untouched device state. Hexadecimal 08h sets only D3. For the three implemented controls, that agrees with the listed defaults, but it does not meet the normal-operation instruction to disable override. The value is illustrative; the entire byte need not read as exactly 08h because unused bits have no assured read value. Conversely, 10h after configuration differs from the written 00h, but the three functional bits are still zero. D4 should not be logged as an override fault.
For normal timekeeping without a requested pause, build the intended control byte explicitly. Do not read the whole byte, clear just D3, and blindly write back unknown values. Check the implemented bits with mask A8h; bits 7, 5 and 3 should yield zero. This is a test derived from the published bit positions, not an additional manufacturer command. If a project pauses counting during a separate calendar-write stage, document the intended D5 value for that stage and when normal operation must be restored.
Trace initialization in stages to find who changes the control
Do not assume a register observed a few milliseconds into boot still reflects untouched defaults. In an approved repair or validation window, record the first read, later host writes to 00h and their immediate readbacks. Separate the first intended configuration from any earlier bootloader, fixture or diagnostic script. A first observed TESTC value of zero establishes its state only at that moment; it does not prove that the published power-up default is wrong. Record warm and controlled cold starts separately if both occur in service. Restarting the host need not power-cycle the RTC.
There can also be a correct initialization followed seconds later by another module restoring an old template. Trace actual writers to 00h, not just calendar reads close to the symptom. If the problem appears when switching repair software, test firmware or factory fixtures, check whether a temporary test configuration leaked into a shared script. Identify the write with read-only observation before correcting the template in an approved stage. Make sure test tools return the device to normal settings. Do not repeatedly alter test controls or remove power on a unit that contains user records merely to see whether override can be forced.
Verify actual timekeeping separately
Correct TESTC and TEST1 states describe the control register, not whether the crystal has started, whether the square-wave signal is usable at its load, or whether the calendar is accurate. The manufacturer gives a separate oscillator-fail flag, OSF, in the seconds register; an asserted flag indicates that clock integrity is not assured. If an incoming repair requires traceability, capture the time, status and possible outages before reestablishing time from an approved reference. Do not assign every timing issue to test bits or assume a normal configuration restores the correct date.
A production or repair record can include the full part number, datasheet revision, warm or cold start, write to 00h, masked readback, independent integrity check and continuous timekeeping across the required interval. Record whether the fixture writes the device before production firmware starts. A reviewer can then distinguish three questions: whether the observed default matches the data, whether firmware establishes normal operation, and whether timekeeping actually works.
When replacing a whole-byte comparison, add a regression test for unused bits. Replay a response with correct functional bits but different unused bits and verify that the driver does not raise a false fault. Then replay a case with only D3 high and verify that it flags the real configuration problem. Do not set unused bits on a physical device to create a mismatch; the manufacturer directs writes of zero. Simulation or log replay checks the interpretation without mixing an intentionally changed register into timing data.
Distinguish the register address from the target's bus address. The register location and the intended data can both be 00h, but a log entry that says only “zero” loses that distinction. Preserve device selection, register and data independently. If a transaction fails, keep its original response before retrying through the approved procedure; a later read should not hide an earlier missed write. Retain both firmware and fixture-script revisions so that a later investigation can identify what allowed the power-up configuration to persist after production.
FAQ
Does TESTC reading 1 prove that a power-on reset was missed?
No. It is a control value that may enable override, not evidence that override occurred, when it occurred, or what changed. Clear it for normal operation. Investigate a specific restart with supply, reset and software-write evidence instead of reconstructing an event from this bit alone.
Should I write unused bits back with the values I just read?
No. The datasheet calls for zero writes and warns that they may read as zero or one. Separate the write rule from the acceptance mask. If a defined control bit then does not match the target, inspect the transaction and any subsequent writers.
