Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs
This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Preserving reset reason with NRF bootloader (SDK15.2)

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!

Parents Reply Children
No Data
Related