Micro without VBAT pin - detect 'Main' or 'Backup' power
I am starting a new project with the STM32L432. I need the RTC, but I don't understand how to manage the backup battery. This microcontroller doesn't have a dedicated VBAT pin. From what I understand, both the main power supply and the backup battery should be connected to the single power supply pin, and somehow the microcontroller should enter STANDBY mode when it detects that the main power supply is missing and is running on the backup battery to consume as little power as possible. Is that correct? But how does the microcontroller know which power source is supplying it, and how does it exit STANDBY mode when the main power supply returns? Is there a code and an example circuit diagram? Thank you
