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

Does an STM32L476 automatically switch its RTC to LSI if a KDS DST1610A stops?

Do not confuse LSE failure detection with automatic RTC clock switching. The KDS DST1610A is a passive 32.768 kHz crystal that can be evaluated for the external low-speed oscillator circuit. ST's STM32L476 reference manual says that after the LSE clock security system detects failure, LSE is no longer supplied to the RTC, but hardware does not automatically rewrite the selection registers. An already-ready internal LSI is not evidence that the RTC is using it. Firmware must decide how the product responds.

Why can the calendar still be read when it no longer advances?

Suppose a display stops at 14:20:00 even though the CPU runs and RTC registers can still be read. Readability does not establish a working RTC clock. Keep three pieces of evidence separate: the LSE failure flag, the selected RTC clock source and whether the seconds field advances across successive reads. Do not apply the behavior of a CPU main-clock failover to this low-speed RTC path.

If the application permits LSI fallback, preserve the fault state and the last trusted time. Follow the MCU's controlled clock-source and prescaler procedure. Use an independent reference to establish whether time was lost during the transfer; the existing calendar contents do not reconstruct a gap. Qualify the precision and backup-power behavior of the internal source separately, rather than inheriting the crystal-based timing claim.

Test the defined fault response

Inject the failure in an approved engineering setup instead of removing a part from working equipment. Log the failure indication, RTC source selection and application record. Check that the no-fallback case marks the time invalid and that an allowed fallback actually resumes the calendar with its quality identified. If the product cannot reconstruct time using the internal source, report the gap rather than treating a successful register read as restored accurate timekeeping.

Related selection guide: MERLIN Crystal Timing: Choosing a 32.768 kHz Crystal, Oscillator or RTC Module by Backup Current and Temperature Accuracy

Resource link: https://www.mecxtal.com.cn/en/guides/rtc-timekeeping.html

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.