Specialist Supplier of Crystals & Frequency Control Componentssales@mecxtal.com.cn0755-26500570
MERLIN home / Rednote / Measurement and Acceptance

Why do MCP7940N power-failure times disappear after clearing status?

After a power interruption, a customer needs to distinguish an RTC that stopped from a brief loss of main power. Under valid backup power, the MCP7940N can retain power-failure and restoration timestamps. Clearing status at startup can erase them. The manufacturer defines the PWRFAIL flag and the conditions for retaining, clearing, and recording timestamps.

After supply recovery, read status first. If a failure is recorded, copy the raw failure and restoration timestamp bytes to a reliable log. Then clear PWRFAIL as described in the manual so the next event can be recorded. The fields and time resolution are limited. Avoid inferring seconds, years, or fractional seconds absent from the record. Interpret month or year boundary crossings with system logs and the current RTC time.

Enable backup power as recommended, set the calendar, and verify that the oscillator runs. Use independent equipment to record physical power loss and restoration. Arrange one outage that crosses a minute boundary and compare registers with that trace. A brief outage can produce two entries in the same minute. Test two successive events to verify when firmware clears the flag and whether it deletes the first record before saving it.

Retain raw timestamps, flags, and measured main and backup voltages for service. They help distinguish timekeeping continuity, a missed switching condition, and records cleared by firmware. If the customer needs exact outage duration, add independent higher-resolution logging. If several startup routines access the RTC, assign initial readout and flag clearing to one logging module to preserve the evidence.Microchip MCP7940N Power-Fail Time-Stamp section

Send us a part number or your requirements

Brand, frequency, quantity and delivery target — a useful place to start.

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.