Just need a quick sanity check here.
My latest project design uses 2 LiPos, a TI TPS54231 switcher to provide 5V from the LiPos, and an ATmega (exact model not decided yet).
What I'm aiming is as complete power down as possible, when the Atmega is told to power off. My main reason is I want this to be a sealed unit without any manual switch, to avoid accidental power offs, and it's likely to lie unused for several months at a time, so I don't want the LiPos to drain if not kept charged.
The TPS54231 has an EN pin, that when pulled below 1.25V places it into shutdown, with power use in the uA range. So if I tie the EN pin to ground via a resistor it remains in shut down.
To power up, I have a push switch that connects LiPo power to the EN pin via a resistor (value selected to avoid the EN being pulled above the maximum allowed 5V), which pulls the EN pin above 1.25 and the TPS54231 wakes and puts out 5V.
This powers up the ATmega, which is then programmed to apply power to the EN pin.
At power off, the ATmega removes power from the EN pin, and the TPS54231 enters shutdown.
Even if the ATmega power down isn't clean, it should enter reset, which places it's pins in Hi-Z/Tri-state, so shouldn't power the TPS backup.
Now in my mind that all sounds like it will work, however have I missed anything?