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

Is an Epson RTC-4701 Count Jumping? The fr Flag Alone Is Not Enough at 16 Hz

When the Epson RTC-4701 JE/NB additional counter is running from 16 Hz, the fr flag alone cannot validate a read across a count update. The manufacturer calls for two reads to check updates in this mode. Keep both readings, the control state, and the bus timing rather than equating a clear flag with a coherent count.

Identify the additional counter and the limits of the flag

The RTC-4701 has an internal 32.768 kHz crystal oscillator. Its additional counter is a presettable 12-bit up counter in Bank 1 at addresses B and C. B holds the lower eight bits and the low nibble of C holds the upper four. The rest of C contains control and status information. Extract each field as defined rather than concatenate all of C as an upper byte. This is neither the calendar seconds field nor the separate timer interrupt down counter.

The general rule is that fr set to 1 indicates an update during the read and calls for rereading. At 16 Hz while the additional counter is running, the manual says that fr cannot capture the relevant update timing and that two reads are required for the update check. The manual also says two reads are not required when the counter is stopped. Distinguish the actual selected source and running state. An intent in software to stop the counter is not confirmation that it stopped.

Two reads are also different from reading two consecutive bytes once. The former yields two sets of counter data to compare. The latter accesses two addresses in one read operation. Do not combine selected pieces from the two sets. Whatever policy accepts, retries, or reports a reading, keep the raw bytes, follow the specified access conditions, and record project-defined retry rules separately from the manufacturer’s requirement.

Worked example: a low-byte carry can produce a count that never occurred

Suppose a hypothetical reader captures the low byte 0xFF before a carry from 0x0FF to 0x100 and the high nibble 0x1 after it. Combining the two gives 0x1FF, or decimal 511. The new count in this example is only 256, for an error of 255 counts. The example deliberately uses fields from different times. It does not specify the device’s internal latch point or predict a mixed reading on every carry.

At 16 Hz the nominal interval between ticks is 62.5 ms. The example’s 255-count error corresponds to approximately 15.9375 s. The oscillator did not lose nearly 16 s; arithmetic applied to the wrong count produced that result. If the raw bytes have been discarded and the log says only that the system was off by several seconds, it becomes difficult to distinguish reading, count conversion, and application timing.

Recognize normal wraparound as well. The manual describes OVF being set when the additional counter goes from 0xFFF to 0x000. Two readings near those values do not prove the counter ran backward merely because the second decimal number is smaller. An application accumulating elapsed time across several cycles needs its own verified wrap handling and observation conditions. A low reading alone cannot establish how many times the counter wrapped. The example concerns reads; verify the interrupt separately against its configuration and state.

Build a first-article check that captures a real carry

Document the source, initial count, and enable method for each firmware revision. Keep the power-up configuration sequence so reads from the wrong bank or misinterpreted control bits can be identified. Begin with stable power and known state, then compare reads near a low-byte carry. If a monitoring script also writes registers, log those operations. A changed value could come from the debugger rather than a natural count update.

For 16 Hz running reads, retain both raw B and C pairs, their decoded values, and the actual interval. If the pairs differ, apply the validated project decision rule to distinguish a normal update, a possible mixed result, or a bus failure. A difference alone does not establish oscillator failure. If the reads are far apart, the count may legitimately advance, so exact equality is not a universal pass criterion. For bounded retries, define how to report uncertainty once those retries are exhausted instead of publishing a questionable count.

Keep a comparison with the counter stopped if practical to verify that field extraction is correct on the same interface. Do not stop a live production counter merely to make a diagnostic read look cleaner. After changing the read strategy, also verify elapsed-time use, interrupt handling, and recovery under the product’s requirements. A stopped-mode pass applies to the stopped mode and does not prove that a running read is dependable.

Provide the production team with a repeatable test scenario. Identify the first and comparison reads, whether a low-byte carry or full-range wrap was observed, and whether the result can be repeated. Separate the raw count and displayed seconds, including the rounding convention. When the only visible symptom is a jump in an application value, obtain the register and bus traces before deciding to replace the oscillator.

Repair staff should also check firmware revision. If the old driver checks only fr and the new one reads a second set, compare them with the same power, temperature, and source. Establishing that the read logic changed explains an improvement without attributing it to a frequency change during repair. If raw data agree but the converted values still differ, investigate the upper-layer calculations rather than increasing the number of rereads.

For diagnostics, preserve the information that matters: the selected bank, configuration summary, both raw values, and their sampling times, not just the final accepted count. Before repeating a case, make sure the program is not resetting the preset. Consecutive reads after a reset might agree simply because they no longer hit the original carry window. If the installed unit cannot be taken out of service, collect read-only logs and reproduce the conditions on a separate unit. Identify whether timing comes from the instrument or the host. Do not subtract timestamps from unsynchronized clocks to infer a microsecond interval between bus operations.

Also verify that the count was not served from an application cache.

16 Hz counter-read checklist

CheckEvidence to retainDecision boundary
Count sourceBank 1, source selection, and running stateThe additional counter is not calendar seconds
Raw bytesBoth B and C pairs and capture timesTwo reads are not one read of two bytes
Carry and wrapBefore and after counts and OVFA normal wrap is not backward counting
Application resultCount, time conversion, and bounded retry rulesWrong elapsed time does not establish oscillator error

Frequently asked questions

Does fr clear mean the count did not update at 16 Hz?

No. The manufacturer requires two reads for this running mode. Follow the applicable read procedure and retain both raw results.

Is any difference between the two reads a failure?

No. A valid update may occur between them. Check the measured interval, count range, raw data, and approved decision rule before attributing the difference to a faulty device.

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.