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
  • Thanks for this post, it quickly help me locate the same issue.  Not sure if Nordic did some changes in the SDK (I'm using 15.3). That same line of code was on line 239 and was wrapped inside of an IF statement.  I was able to work around this issue without modifying the  SDK Files.  I just had to go into the sdk_config.h file and UNCHECK the "NRF_BL_APP_CRC_CHECK_SKIPPED_ON_SYSTEMOFF_RESET" option (located under nRF_Bootloader>>nrf_bootloader - Bootloader settings>>Application integrity checks.

Reply
  • Thanks for this post, it quickly help me locate the same issue.  Not sure if Nordic did some changes in the SDK (I'm using 15.3). That same line of code was on line 239 and was wrapped inside of an IF statement.  I was able to work around this issue without modifying the  SDK Files.  I just had to go into the sdk_config.h file and UNCHECK the "NRF_BL_APP_CRC_CHECK_SKIPPED_ON_SYSTEMOFF_RESET" option (located under nRF_Bootloader>>nrf_bootloader - Bootloader settings>>Application integrity checks.

Children
No Data
Related