I'm developing a project where the device wakes from system_off using a button. I've noticed that it takes about half a second from the time the bootloader starts until the application loads. I tested this by turning on an LED at the beginning of the bootloader's main(), turning it off just before the call to nrf_bootloader_app_start() in nrf_dfu.c, and then turning it back on once again at the beginning of the Application's main(). I also turn on a second LED at the beginning of the bootloader, and leave it on.
The bootloader takes about 250ms to get up to nrf_bootloader_app_start(). And then it takes another 300ms to get to the beginning of the Application main(). During the 300ms, the second LED (the one I leave on) turns off.
That leaves me with two questions:
1) What is happening during that 300ms that is taking so long?
2) Something is resetting the GPIO configuration when the bootloader starts the application. What is it, and can it be disabled?
For reference, I'm using SDK 13.0.0 on an nRF52832 with softdevice s132.