This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

DFU Bootloader's settings can become corrupt after a power-cycle

Hello,

My team and I are experiencing a problem with our custom DFU Bootloader, which is based on the Experimental Bootloader Secure Serial example (SDK 13), running in a custom NRF52832 board. Our main app uses a single bank, and we're also using the S132 v4 SoftDevice, our custom Bootloader and Bootloader settings.

We have a custom main application that writes to our custom Bootloader's settings, triggering the enter_buttonless_dfu flag and resetting the system into update mode. When no update is due, upon power-on our Bootloader starts the main application by checking the result of nrf_dfu_app_is_valid().

However, on certain power-cycle conditions the Bootloader's settings become corrupt and the Bootloader can no longer start the main application as it looses the indication that a valid application is present. It appears to occur mostly if pressing our on-board reset button that temporarily disables our power-supplies (the switch is not debounced).

We are wondering if this is a known problem with SDK 13 and if there is a solution to the problem.

As a workaround, we're currently using a delay on our Bootloader code, that delays the loading of the Bootloader's settings ( nrf_dfu_settings_init() ) for 1000ms after power-on. This seems to help resolve the issue, although we believe the system is still vulnerable to this issue.

Thank you for your attention to this matter, please let me know if we are required to provide more details regarding this issue, TC

Parents
  • Hi Tiago,

    Could you try to modify the bootloader to print out some log to check what cause the bootloader not to enter application ? My suspicion is that the application is modified (because of some flash operation? ) and the CRC is mismatched. If you can reproduce the issue, you can also simply run the bootloader in debug mode and step into the code where it check for application valid.

Reply
  • Hi Tiago,

    Could you try to modify the bootloader to print out some log to check what cause the bootloader not to enter application ? My suspicion is that the application is modified (because of some flash operation? ) and the CRC is mismatched. If you can reproduce the issue, you can also simply run the bootloader in debug mode and step into the code where it check for application valid.

Children
No Data
Related