If the host receives an RX-4035 periodic interrupt but reads the previous second, the crystal may not be running slow. The Epson RX-4035 SA/LC manual distinguishes pulse and level modes. In pulse mode, the interrupt can fall before the seconds counter updates, with about 46 µs between them. Diagnose an early read by plotting the hardware event, the effective read sample, and the time delivered to the application separately.
One interrupt line can have different timing in two modes
The periodic interrupt section describes pulse output at 1 Hz or 2 Hz and illustrates the seconds update occurring about 46 µs after the interrupt falling edge. The manual cautions that the time and date can still be old in this interval. This approximate delay is not a clock-accuracy limit or a worst-case interval across all supplies, temperatures, and units. If the design needs a defined wait, use controlled requirements and board validation rather than make 46 µs a product guarantee.
The same section describes the seconds increment as synchronized with the falling interrupt edge in level mode, illustrating an interrupt every second. Verify the actual period setting and interrupt source; not every falling edge can be treated as a seconds increment. If the system processes multiple events, separate their sources rather than substitute an alarm or unrelated pin transition for the periodic timing. Level mode also requires proper handling of flags and output state under the manual. Changing one mode setting does not prove the host interrupt logic migrated correctly.
A software interrupt-handler entry is not the hardware falling edge. A serial read request and its returned result may also be separated by queuing or buffering. A log showing only the final seconds field cannot tell whether the module was sampled before its update or whether the host reused cached data. Capture the interrupt, supply, bus commands, and decoded register results. Establish what happened in hardware before checking whether the application used this read or an earlier one.
Worked example: place read sampling and the update after the same edge
Suppose the falling edge of a 1 Hz pulse is time zero and use about 46 µs as an illustrative update point. If a valid read samples the needed time at 20 µs after the edge, it is 26 µs early in the simplified model, so the old second is unsurprising. If another read samples at 80 µs, it is 34 µs after the illustrative update and, absent other changes, should see the new second. The two sampling instants are hypothetical and do not establish how the device actually samples a transaction.
A further trap is that two requests may take different times, so delivery order does not locate the hardware samples. If the read completes in software at 80 µs but the effective sample was taken at the hypothetical 20 µs, the old second can be returned correctly. Use the interface procedure and decoded bus trace to locate the data capture. Do not collapse request submission, chip select, the last byte, and storing the result into one instant. When the effective latch point is not known, record it as unresolved rather than infer it from a software timestamp.
At midnight this can display an old date as well as an old second. That is a brief read before the update, not evidence that the calendar is chronically slow. If a later read using the required procedure moves forward correctly, investigate sampling relative to the update. If old readings persist, also check clock configuration, supply, status, and register access. The known microsecond-scale delay does not explain every stalled calendar.
Make it testable in firmware and first-article inspection
Confirm manual revision and installed model. Record interrupt output mode, period, read interface, and relevant flags. Test personnel must know whether a record used pulse or level mode; do not combine traces merely because the application calls both a seconds interrupt. First capture a stable baseline and observe how many events occur within the relevant interval. Use a known seconds-update event for the timing comparison. Test other event sources separately to avoid classifying legitimate extra interrupts as timekeeping faults.
Firmware can separate interrupt reception from publishing a timestamp. Where the application permits, confirm time with a later controlled read or tie the read to a verified hardware state. A fixed software delay is not the only approach. The timing budget also depends on scheduling latency, bus throughput, and timestamp requirements. If multiple actions take place within one second, define how to avoid duplicate registration and how to preserve the original event identity if reads fail or conflict. Do not run every event handler again merely because the seconds field changed.
Include steady operation, recovery after setting time, and a midnight transition in validation. The manual also says that a host write of a new seconds value can pull the interrupt output low. Log time-setting writes separately. One captured falling edge is not necessarily a natural increment or proof that the mode is wrong. Compare time-setting and normal periodic operation on a controlled baseline before trying the overlapping sequences seen in use.
If clock accuracy adjustment is enabled, the manufacturer notes that some intervals change with the adjustment. Hold that configuration constant while comparing interrupt and calendar timing. Do not switch modes, change the correction, and replace the oscillator in one experiment. Verify expected seconds, dates, and application behavior, then test periodic accuracy separately if required. One trace with correction disabled does not cover every configuration with it enabled.
Retain an original failing record and a matched comparison that passes. Align both traces to the same reference edge and label the effective sample time separately from read completion. For midnight tests, save raw registers alongside the application display. A reproducible early read need not be described as a frequency error. Write the decision method so that a later firmware or instrument change can be compared against the same evidence.
Compare captures with the host idle and under load. If the hardware edge and effective sample remain aligned the same way but the application display changes, investigate the software delivery path. If bus sampling also moves with scheduling, identify which interval the new firmware actually changed.
Seconds-update troubleshooting checklist
| Check | Evidence to retain | Decision boundary |
|---|---|---|
| Mode | Installed model, pulse or level mode, and actual period | Events on one pin are not all equivalent |
| Hardware timing | Falling edge, bus sample, and returned value | Read completion is not hardware sampling |
| Timekeeping | Original time, date, and midnight comparison | A brief old value is not long-term frequency error |
| Application | Publication, retries, and time-setting log | Check time-setting edges separately |
Frequently asked questions
Is waiting exactly 46 µs after the edge enough?
Do not use an approximate figure as a worst-case limit. Choose a method based on the effective sample point, timing budget, and publishing requirements, then validate it on the board under applicable conditions.
Should we retain the old traces if we switch to level mode?
Yes. They show how the original problem occurred and make a useful comparison. After switching modes, still verify the interrupt source, flag handling, and time and date readings.
