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

App will not launch after updating Bootloader with BLE DFU

I am trying to update the bootloader using BLE DFU and it does not seem like the app is launching after the bootloader update. 

I currently have an app that works with the original bootloader built off one of the secure bootloader examples. (examples/dfu/secure_bootloader_ble_s140/pca10056_ble). But we have an app update that enables in-app DFU for remote updates. This all works but the problem is we require a bootloader update with some configuration changes. In particular Bootloader v2 enables NRF_BL_DFU_ALLOW_UPDATE_FROM_APP which is currently the only change, if that matters. Everything works great when I load the bootloader.hex alongside the application as an "Additional load file" with a settings page. The app runs, the BLE DFU works, and our in-app DFU works as long as bootloader V2 is loaded as an "additional load file".

The problem is that we have some devices that we would like to update without having to open them up and connect a programmer. I have generated a bootloader2 zip with "nrfutil pkg generate --bootloader secure_bootloader.hex --bootloader-version 2 --hw-version 52 --sd-req 0xB6 --sd-id 0xB6 --key-file private.pem BL2.zip" and using my phone to do the DFU the process appears to finish correctly. But then when the device reboots it does not load the app that was previously programmed. 

This is the log from the RTT viewer after the update, the example bootloader files haven't been modified except for "sdk_config.h" so all these log messages are default. 

00> <info> app: Inside main
00> <debug> app: In nrf_bootloader_init
00> <debug> nrf_dfu_settings: Calling nrf_dfu_settings_init()...
00> <debug> nrf_dfu_flash: Initializing nrf_fstorage_nvmc backend.
00> <debug> nrf_dfu_settings: Using settings page.
00> <debug> nrf_dfu_settings: Destination settings are identical to source, write not needed. Skipping.
00> <debug> app: Enter nrf_bootloader_fw_activate
00> <debug> app: Valid BL
00> <debug> app: Verifying BL: Addr: 0x000F1000, Src: 0x00059000, Len: 0x0000C598
00> <debug> app: No bootloader copy needed, bootloader update complete.
00> <warning> nrf_dfu_settings: Settings write aborted since it tries writing to forbidden settings.
00> Received a fault! id: 0x00004002, pc: 0x00000000, info: 0x2003ffa0

This message repeats constantly as I am assuming the device is restarting. 

Using SEGGER, SDK 15.3, and nrF Connect android app to do BLE transfers. Any help would be appreciated I will answer any questions if I have left anything out. I also have the ability to add additional log messages to the bootloader. 

Parents Reply Children
No Data
Related