Skip to content

CLK-16 RTC in use with VBAT floating, no backup source, or no 32 kHz crystal

Severity Status Implementation
warning planned mid, depends on NET-12, CFG-2

Looks at. Whether the RTC is used, VBAT and LSE pins.

What it catches. A design that uses the RTC (timestamps, wake-up, calendar) while VBAT is unconnected, tied to nothing that holds it across power loss, or the RTC has no 32.768 kHz crystal.

Why it matters. VBAT powers the RTC and backup registers when VDD is off; ST recommends tying VBAT to VDD when no battery is used (AN5096 §1.1.1), and a floating VBAT leaves the backup domain undefined. Without an LSE crystal the RTC runs from an internal RC oscillator that is off by percent: minutes to hours per day.

Example. A data logger that timestamps on an STM32 RTC with VBAT on a test point only: every power cycle resets the clock to 2000-01-01, and on the LSI the time drifts by minutes or more a day while powered.

How to check. VBAT pins unconnected or on a net with no source; RTC use from the project (CFG-2) without a crystal on the LSE pins (NET-12).

Fix. A coin cell, a supercap or VDD on VBAT, and a 32.768 kHz crystal (CLK-11).

References. AN5096 §1.1.1, §2.5; Wikipedia, Real-time clock.