Just to confirm this.
From the TPS datasheet:
OFF In OFF mode the PMIC is completely shut down with the exception of a few circuits to monitor the AC, USB, and push-button input. All power rails are turned off and the registers are reset to their default values. The I2C communication interface is turned off. This is the lowest-power mode of operation. To exit OFF mode one of the following wake-up events has to occur: • The push button input is pulled low. • The USB supply is connected (positive edge). • The AC adapter is connected (positive edge). To enter OFF state, set the OFF bit in the STATUS register to ‘1’ and then pull the PWR_EN pin low. Please note that in normal operation OFF state can only be entered from ACTIVE state. Whenever a fault occurs during operation such as thermal shutdown, power-good fail, under voltage lockout, or PWR_EN pin timeout, all power rails are shut-down and the device goes to OFF state. The device will remain in OFF state until the fault has been removed and a new power-up event has occurred.
When the brownout occurs, the unit goes in the “off” state and happily stays there. Apperently, the voltages subject to brownout recovering does not define as a “positive edge”.
If anyone has a pretty solution for this, I’d be interested. Obviously, I can implement some kind of a watchdog that cuts the 5V altogether at some point but is there a SW or other ‘easy’ solution?
Unfortunately no, there is no software solution since the processor has no power. You have to use a power supply monitor/controller with a state machine to deal with this issue. This type of circuit is normally included a small energy reserve (battery or supercaps) so that the OS has time to close open files and prevent file system corruption during power fail issues. Normally, any power supply interruptions initiates an orderly shutdown of the OS. When the processor finally halts, power is removed from the PMIC. When power is available, power is applied to the PMIC and everything powers up normally. There are several corner cases that must be considered, such as power interruption during power up phase or power available during power down phase. A simple state machine takes care of these corner cases. Overall, the circuitry includes several voltage regulators (input buck convertor, output boost convertor), energy balance (supercaps), battery charger (battery), and a state machine (8 bit micro or my preference - GreenPAK).