2023-03-21 09:44 AM
My device has various connected sensors and peripherals. The device is intended to go to sleep for extended periods of time before waking up and taking measurements. Currently, the main VDD is a large external battery and VBAT is a coin cell used to maintain the clock if VDD is depleted/removed. I'm wondering if it is possible/advisable to have the MCU control a switch to turn off VDD and thereby greatly minimize standby currents of DC/DC converters, switches, etc. and only power the MCU with the coin cell using VBAT?
2023-03-21 12:06 PM
Welcome, @MVeen.1, to the community!
What's wrong with using the built-in stop function?
In this case, the STM32 goes to sleep or stop mode, is supplied via VBAT (backup domain and RTC) and wakes up again on an external event or via RTC wake-up. When the STM32 goes to sleep, the GPIOs are deactivated, which is why you can achieve the desired sleep state of the external circuit with suitable default connections (pull-ups or pull-downs), possibly also via external CMOS logic and suitable transistors, such as depletion MOSFETs.
VDD remains active, except that the STM32 draws considerably less current and also allows the peripherals to sleep via its GPIOs.
Does it answer your question?
Regards
/Peter
2023-03-22 10:45 AM
The "for extended periods of time" sounds like the Standby/Shutdown modes are the most appropriate.
On the hardware side one can get inspired by reading AN4718.