Hi,
STM32L series do not have a dedicated backup battery pin. I know these micros are designed to operate based on battery but In my project I want to guaranty clock never changes even with a main battery replace. Any idea to add RTC battery?
This specific part is designed to be battery powered, and doesn't have a VBAT pin, like other STM32 family parts.
Not sure adding an external RTC is "easier" than having a BAV70 or a single chip charger circuit/switch for the battery.
But if the processor is running at x MHz when the power is cut, it must very quickly freeze to conserve the power of a smaller super-cap to switch down from 200uA/MHz to 1uA or maybe even a couple of 100 nA of a dedicated RTC. And depending on the size of the supercap, and the voltage of the ordinary battery, you can get an issue with the charge voltage of the supercap and the voltage drop for supercap + diode.
Besides the danger of voltage drops, it also means that with a smaller supercap, the processor must also have an I/O pin generate a power-loss interrupt as soon as the main battery gets disconnected.
So even with very low-power processors, there are a number of things to consider.