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

DFU bootloader fails second update

I have a created a bootloader using the bootloader_secure example in SDK 12.1. Using my own public-private key pair I've created two zip files, signed with nrfutil, one with the application firmware and one with the bootloader itself (if I ever want to update the bootloader).

I can update the application using DFU without issues. Bootloader update works as well using DFU the first time. The weird thing is if I try to update the same bootloader a second time, it does not work anymore. Application firmware can still be updated with DFU after this however, only the bootloader fails after the bootloader update.

So to make it more clear:

Update 1: application firmware = success

Update 2: application firmware = success

Update 3: bootloader = success

Update 4: bootloader = failure

Update 5: application firmware = success

Update 6: bootloader = failure

Update 7: application firmware = success

I did this with nRF Toolbox (failure here is progress bar showing and after the text "Starting DFU" everything goes away again with no error) and nRF Connect (failure here is "operation failed").

What I don't understand is that application firmware updates keep on working while bootloader updates only work the first time. So I'm sure the bootloader I updated the first time is still functional. I have the feeling that something is missing during or after the first bootloader update blocking any future bootloader updates.

Anyone else encountered something similar or an idea what is happening here?

Using SDK 12.1 and softdevice s132 3.0.0 .

Bootloader and application update files created using

nrfutil.exe pkg generate --bootloader bl.hex --key-file c:\vault\priv.pem --bootloader-version 0xffff --hw-version 52 --sd-req 0x81,0x88,0x8C bl_update.zip

nrfutil.exe pkg generate --application fw.hex --key-file c:\vault\priv.pem --application-version 0xffff --hw-version 52 --sd-req 0x81,0x88,0x8C fw_update.zip

image description

Related