I'm using a lithium polymer battery with an LDO regulator. I want the regulator to shut down when the battery voltage gets too low. I'd prefer to monitor the battery voltage using a microcontroller that's already in my circuit rather than adding a separate voltage supervisor or comparator to control the regulator's Enable pin.
The problem is that the microcontroller is powered by the regulator's output VDD, so before the regulator is enabled, the microcontroller is off and its GPIO pin can't control the Enable pin. The battery's on/off switch is an SPDT switch and not momentary. Is there a solution to this that would "cost less" than adding a voltage supervisor/comparator to control the regulator's enable pin? And not adding a momentary switch? I know this won't work: