Hello,
My application, running on nRF52840 with SDK15.2, needs to detect the reset source from System OFF state. However, when using the BLE Secure DFU Bootloader, it always finds the RESETREAS register cleared to 0.
I tracked the problem to nrf_bootloader.c:231
nrf_power_resetreas_clear(NRF_POWER_RESETREAS_OFF_MASK);
Commenting out this line does fix my symptom, and my application is able to retrieve the reset reason once again with the bootloader present.
Since both the clear and the jump to the application happen in "nrf_bootloader_init()", I cannot simply save and restore the content of RESETREAS without modifying SDK files.
Is there a proper way to preserve the reset reason with the standard bootloader library?
Thanks in advance!