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

MCP7940N with a 32.768 kHz crystal responds on the bus but never counts seconds

Readable MCP7940N registers confirm a bus response, not a running oscillator. With a two-pin passive crystal, check ST in RTCSEC, read OSCRUN in RTCWKDAY, then compare the seconds count across more than a full second. With an external oscillator, check EXTOSC in CONTROL and verify that the signal actually reaches X1. Separate a request to start, hardware clock detection, and observed timekeeping. None of those observations alone proves the other two.

1. Identify how the board is actually populated

A passive crystal connects across X1 and X2 and is driven by the internal oscillator circuit. Determine its effective external load for the actual circuit. ST controls this path. If a board revision replaced the crystal with an external clock, drive X1, leave X2 floating, and enable EXTOSC. Both implementations are labeled 32.768 kHz, but they do not use the same startup settings or load parts. If bench firmware was built for an older board, it is often quicker to compare the schematic, assembly, and initialization writes before probing the crystal.

CheckWhat it establishes
Bus read succeedsThe device responded at that moment
ST or EXTOSCThe control for the passive or driven path, respectively
OSCRUNHardware oscillator-cycle detection status
Seconds continue to advanceThe calendar actually counted during the test

Application output may be cached. Save the real register reads rather than judging from whether a screen updates. If every refresh reruns the set-time operation, the seconds can keep returning to the same value. Start with one initialization and then read only status and time at two separate points.

2. OSCRUN does not change simply because a bit was written

The oscillator-failure section says that OSCRUN is set automatically after 32 oscillator cycles are detected. At an ideal 32.768 kHz, that is about 0.977 ms. This calculation describes the qualifying cycles, not a guaranteed interval from the ST write to stable oscillation. The passive circuit must start first. Supply, load, and board parasitics can change that time. A fixed rule that everything must work after one millisecond would misclassify slow-starting boards.

Setting and clearing the flag are not timed the same way

Setting the flag requires detected cycles. After loss of clock, the bit clears after no cycles are detected for longer than the specified TOSF. A high OSCRUN immediately after disconnecting an external clock does not mean valid pulses are still present. Save multiple reads after an event and record whether they occurred within or beyond the status-update interval. A snapshot can land during the transition.

If changing the time and date, the datasheet describes a sequence to avoid rollover during the writes. Disable ST or EXTOSC as appropriate, wait for OSCRUN to clear, load valid calendar values, and re-enable the appropriate path. This prevents older counter values from rolling over during writes; it does not accelerate oscillator shutdown. Do not stop a device that is already logging events merely to diagnose whether seconds are advancing. Read state and time without changing them first.

3. A same-frequency replacement can change the startup result

Epson shows FC-135R X1A0001410001 as a 32.768 kHz, 7 pF crystal in a reference evaluation for another controller. That is an example of a defined ordering specification, not a qualification for MCP7940N. Crystals in the same size can have different load capacitance or ESR, and one family can offer several load options. Compare full ordering codes and their tolerance, temperature, load, and drive conditions rather than ordering by what is printed on the case.

Do not copy the crystal's load number onto both capacitors

Suppose the two external capacitors are 10 pF each and total effective strays are estimated at 2 pF. Their series contribution is 5 pF, giving about 7 pF in this illustration. This is not a recommended capacitor pair for a specific product board. Input capacitance, traces, ground copper, assembly, and probes affect the result. If touching the circuit with a scope changes whether it runs, suspect measurement loading. Use a lower-capacitance observation method and record both OSCRUN and calendar counts.

Starting and keeping accurate time are distinct. An OSCRUN pass at room temperature does not establish cold startup, operation at a lower supply, or acceptable frequency error after loading. Use repeatable power-off intervals under the intended supply and temperature conditions and record how long each launch takes and whether counting persists. Repeated warm resets can mask an initial-start problem.

4. Start with observations before making hardware changes

Read control and status according to the actual chip revision, and verify that old firmware does not clear the controls. Read seconds twice and inspect increment and rollover, checking that the application decodes the value correctly. Treat ST and the time field in the seconds register separately. If status and time disagree, capture the bus to see whether the host repeatedly writes a value in the background. When the device is already responding reliably, changing the address is not the first response to an oscillator problem.

If OSCRUN never sets, verify passive versus external clock configuration, whether load components are fitted, and whether supply and source are available in the relevant state. An external source can be measured at X1, but do not apply external full-swing criteria to passive crystal nodes. Keep an untouched comparison board, hold supply, temperature, and firmware constant, and change one part at a time. Repeat cold starts after an intermittent pass rather than considering it resolved.

5. Save which layer passed

Record the full chip and crystal part numbers, passive or driven configuration, timing of the startup write, OSCRUN transitions, and both calendar reads. Document whether the test used main supply or backup conditions, and any probe loading. If testing backup timekeeping, compare actual elapsed time against the RTC after communication returns; bus access during backup is not a substitute for that check. Power-fail timestamp retention is a separate test.

On a production station, distinguish three errors: path not enabled, cycles not detected, and count not advancing. Preserve the failure step before re-running instead of resetting and replacing the evidence with one generic error code. This helps distinguish an initialization problem from slow starting on particular assemblies in the same lot. Record the application's waiting limit and the basis for it; a production throughput limit is not a datasheet characteristic.

Enable the correct clock path, allow hardware detection, and validate the actual count. Keeping those steps separate tells you whether to fix initialization, verify crystal matching, or inspect power and connections.

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.