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

Got Stuck in Booltloader mode SDK17.0.2, sd_power_gpregret_set(0, BOOTLOADER_DFU_START)

We are using nRF52 SDK 17.0.2 s132_nrf52_7.2.0_softdevice.hex in our application. When entering in DFU mode from application, we perform nrf_power_gpregret_set(BOOTLOADER_DFU_START) instruction and app_error_fault_handler exception generated with 0x1001 error code means Incorrect interrupt configuration (can be caused by using illegal priority levels, or having enabled SoftDevice interrupts). So now we have used sd_power_gpregret_set(0, BOOTLOADER_DFU_START) instruction to enter in DFU mode and it executed successfully but in bootloader mode if we kill DFU process in mobile app before completion, device get stuck in bootloader mode and never come out from it.

references:

Unable to call nrf_power_gpregret_set after nrf_sdh_enable_request - Nordic Q&A - Nordic DevZone - Nordic DevZone (nordicsemi.com)

Parents
  • Hi,

    The example bootloader in SDK 17.0.2 will clear the GPREGRET after entering DFU mode, so it will not be stuck in a loop there. You can see this by looking at the implementation of dfu_enter_flags_clear() in components\libraries\bootloader\nrf_bootloader.c. Also, the bootloader has a configurable timeout, so it will typically timeout after a few minutes of inactivity, and at that point the application will be started. The exception is if the application was allready deleted as part of the initiated DFU process. In that case, the only way to recover is to connect to the device again and complete the DFU.

Reply
  • Hi,

    The example bootloader in SDK 17.0.2 will clear the GPREGRET after entering DFU mode, so it will not be stuck in a loop there. You can see this by looking at the implementation of dfu_enter_flags_clear() in components\libraries\bootloader\nrf_bootloader.c. Also, the bootloader has a configurable timeout, so it will typically timeout after a few minutes of inactivity, and at that point the application will be started. The exception is if the application was allready deleted as part of the initiated DFU process. In that case, the only way to recover is to connect to the device again and complete the DFU.

Children
No Data
Related