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

UART bootloader DFU update not working

Hi,

I am currently trying to run the secure_bootloader example given the in the sdk 15.2.0. I have successfully been able to update an application onto my NRF52840 DK and am now trying to update the bootloader via UART. However, the error seen in the picture keeps popping up. I think I am missing something when I am creating the zip file with the bootloader update, but I do not know what I am missing. The creation of the zip file can also be seen in the picture. My question is what am I missing that keeps causing this error to happen?

Any help is greatly appreciated!

  • Hi, 

    Since you are updating the bootloader without softdevice, you should use --sd-req 0x00 to generate the package as 

    nrfutil pkg generate --hw-version 52  --sd-req 0x00 --bootloader-version 1 --bootloader bootloader_secure_uart_debug_without_bonds_mbr.hex --key-file private.pem BL.zip

    Because the bootloader_secure_uart_debug_without_bonds_mbr.hex under the test_images folder requires the corresponding private key to update the image, I would suggest you replace it with your bootloader image.  

    -Amanda H. 

  • Hi, 

    I created a new zip file using the following code:

    nrfutil pkg generate --hw-version 52  --sd-req 0x00 --bootloader-version 3 --bootloader bootloader_secure_uart_debug_without_bonds_mbr.hex --key-file priv.pem BL.zip
    

    As seen in the picture, I get the same error and if I try to upload it again, it gives me the other error shown in the picture

  • Hi, 

    Are you using the secure_bootloader\pca10056_uart_debug example or the customer bootloader? 

    If you are using the pca10056_uart_debug example, are you able to try the following commands?

    nrfjprog --eraseall
    nrfjprog --program mbr_nrf52_2.3.0_mbr.hex --verify
    nrfjprog --program secure_bootloader_uart_mbr_pca10056_debug.hex --verify -r
    nrfutil pkg generate --hw-version 52 --sd-req 0x00 --bootloader-version 3 --bootloader bootloader_secure_uart_debug_without_bonds_mbr.hex --key-file private.pem BL.zip

    nrfutil dfu serial -pkg BL.zip -p COM19

    --

    Noted that mbr_nrf52_2.3.0_mbr.hex is under nRF5_SDK_15.2.0\components\softdevice\mbr\nrf52840\hex. secure_bootloader_uart_mbr_pca10056_debug.hex is under nRF5_SDK_15.2.0\examples\dfu\secure_bootloader\pca10056_uart_debug\ses\Output\Release\Exe if you rebuild the image with ses. Using ses to build and log, it will load mbr_nrf52_2.3.0_mbr.hex and secure_bootloader_uart_mbr_pca10056_debug.hex. You don't need to porgram them again. 

    Please let me know this can help or not. Thanks. 

    -Amanda H.

  • I am trying to see if I can update the bootloader over a serial dfu. I am currently running the secure_bootloader bootloader, but I wanted to update it to the pca10056_uart_debug example bootloader. I currently could run all of those commands you posted, and that bootloader works fine in doing application and softdevice updates, but I am getting the errors shown above when I am trying to update the bootloader alone. 

  • Hi, 

    amarin said:
    I am currently running the secure_bootloader bootloader, but I wanted to update it to the pca10056_uart_debug example bootloader.

    Which example or image are you running? Could you provide the path? Is it the example image or rebuild with your key? You should use the one rebuild with your own key. 

    Maybe you could try to use the pca10056_uart_debug example bootloader to update the pca10056_uart_debug example bootloader image again to see it can upload and reset or not. 

    -Amanda H 

Related