Modifying Bootloader Settings Page from Main App

Hello,

SDK:17.10

MCU:nRF52833

Hello,

I want to receive new firmware via BLE at the application layer(not the bootloader ) and store it in bank1.

I have already done the validation and just want the bootloader to activate the FW by moving the image from Bank 1 to Bank 0.

I process DFU as per below:

1. Convert application HEX to BIN.

2. Send whole firmware image over BLE and store in flash (Bank1) in application code.

3. Update bootloader setting and reset the device and let bootloader to control the image update process.

According to the app_activate(void) function, I only need to modify the following parameters in the setting structure to complete the upgrade:

s_dfu_settings.bank_1.bank_code = NRF_DFU_BANK_VALID_APP;
s_dfu_settings.bank_0.bank_code = NRF_DFU_BANK_INVALID;

s_dfu_settings.bank_1.image_size = fwSize;

s_dfu_settings.progress.update_start_address = startAddress;

But modify these parameters and rewrite the setting page, reset, the firmware has not completed the upgrade and has been stuck in the bootloader.

What should I do to make the bootlaoder copy the firmware of bank1 to bank0 and skip the verification(becasue I have already done the validation and just want the bootloader to activate the FW by moving the image from Bank 1 to Bank 0. )

best gards

Related