We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
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?
Through a diode arrangement, like a BAV70 www.nxp.com/.../BAV70_SER.pdf
Thanks, so you suggest that I connect back up battery to pin1 and main supply to pin2 and let pin 3 be connected to VDD of MCU.
The bad thing with processors that doesn't have a dedicated battery pin, is that they will draw all current from the backup battery when the main power goes offline. So the backup battery must support enough current. And the drain is rather high.
If you need backup power for the RTC, it is often better to either use an external RTC, or a processor that does have a dedicated battery pin. Then the loss of main power will kill the processor core, while the RTC will continue to function while drawing a tiny trickle of current from the backup battery.
So a processor with dedicated battery pin, or the use of an external RTC, can have a supercap run for days or weeks while a coin cell may keep the RTC ticking for years.
Thanks, yes using and external RTC seems the most simple way.
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.