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
  • I suspect the bootloader has been reset when it's performing a bootloader setting update, meaning it's trying to erase the old bootloader setting and write a new one. Before the new bootloader setting can be written it got reset and the next boot up the bootloader setting appears corrupted.

    Do you have the issue if you simply reset the bootloader without doing any DFU update ? From my understanding, the bootloader setting only get updated if there is a DFU update.

    Avoiding a system reset when doing DFU is pretty important. That's why most vendors require battery >50% or power supply plugged before doing DFU update.

    If needed, we can implement a flag telling if the bootloader setting update is in progress and can continue/retry that on the next booting if there is a reset occurs.

Reply
  • I suspect the bootloader has been reset when it's performing a bootloader setting update, meaning it's trying to erase the old bootloader setting and write a new one. Before the new bootloader setting can be written it got reset and the next boot up the bootloader setting appears corrupted.

    Do you have the issue if you simply reset the bootloader without doing any DFU update ? From my understanding, the bootloader setting only get updated if there is a DFU update.

    Avoiding a system reset when doing DFU is pretty important. That's why most vendors require battery >50% or power supply plugged before doing DFU update.

    If needed, we can implement a flag telling if the bootloader setting update is in progress and can continue/retry that on the next booting if there is a reset occurs.

Children
No Data
Related