I'm looking to supply an MCU (3.3 V) from battery via voltage regulator: a pushbutton should enable the supply, the MCU then should keep the supply enabled until it wants to shut itself down. But the pushbutton should be dual-purpose, i.e. it should also work as a normal button readable by the MCU when it is powered.
I found STs STNS01 which integrates an LDO (3.1 V), a Lithium battery charger (4.2 V), and power path switches (supply or battery) and features a shutdown pin (active-high, but <4 V, with internal 500k pull-down) that disconnects the battery resulting in microamp quiescent current.
I don't get how the shutdown would be used without resorting to a voltage divider referenced to the battery voltage (~600 k pull-up on SD to 4.2 V should result in 1.6 V). For one, this would result in current (~ 4.3 uA), but also I can't think of a way to decouple the MCU/pushbutton from the battery voltage, i.e. when the regulator is shut down, the high-level on SD would cause currento to flow into the MCU supply via the protection diodes.
Using separate IO to control SD and read the pushbutton would be OK. Also, I'd think this could be done with a few transistors... but I don't see it :-/