Electron not starting after power reconnect having been in sleep

I have a design based around an Electron that is powered externally (5V) in normal operation, but goes to sleep (SLEEP_MODE_DEEP with SLEEP_NETWORK_STANDBY) when instructed (and disconnects the 5V supply via an external FET based switch). Normally, when 5V is reapplied, the system wakes up (is this expected behavior?) - which is what I want - but sometimes the Electron does nothing and I need to disconnect power to the entire system and reconnect before it boots up. Anyone seen anything similar? Does anyone know how the Electron uses the “Power re-applied” event (I’m assuming the PMIC generates some sort of interrupt/wake up)? Thanks.

@rowsail, do you also have a battery connected to the Electron? Are you powering the Electron through Vin?

Yes, battery is connected as normal (and is fully charged) with main power provided through Vin. So battery is only used to supply additional power during cell transmissions and when Vin is lost in order to provide an orderly shutdown. Sleep mode is used simply to avoid discharging the battery completely (and unnecessarily).

Issue seems to be related to Vin being lost/returning while Electron is connecting/disconnecting to cell tower during power up/pre-entering sleep. I think this could be solved by understanding what happens firmware-wise when Vin is lost/re-introduced and the Electron is running on its battery in each operating state.