GPIO levels behaving differently during reboot rather than sleep/wake on nRF9160

We've got a sensor board with an nrf9160 on it, that sleeps lots of the time and periodically wakes up to take sensor readings or send them up to the cloud.

Some of the time we need to keep another module on the board powered on when the nrf9160 is asleep, and power to it is controlled by one of the GPIO pins from the nrf.

When the nrf9160 goes to sleep (it's woken be a GPIO interrupt from an RTC) everything is okay - we set the GPIO low (it's configured as active low with a pulldown in the device tree) just before the device sleeps; and it stays low until the device wakes up.

However, sometimes we need to reboot rather than sleep and when that happens there's a brief blip in the GPIO level that's enough to interrupt power to the other module.

When that happens, the GPIO gets pulled high at the start of the reboot.  I've added some logging (well, toggling a GPIO and catching it on the 'scope Grin) in the bootloader and PRE_KERNEL_1 stage of startup, and am fairly sure it's happening before we get to that so it seems more in the shutdown part of the reboot rather than the startup.

Is there any detailed documentation for the difference between sleep and reboot?  And/or what code is runs when that happens?

We're running on nRF Connect SDK 2.7.0.

Related