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

usb secure bootloader behaviour

To the kind attention of Nordic support team,

I have got in here two pictures of flash. The first one it is after installing bootloader and settings, softdevice and application.

The second one it is after having done a dfu update of softdevice and application. I saw that a copy of application has been created in flash.

I tried to delete first application block using nrfjprog -f nrf52 --erasepage 0x23000 - 0x61000 and left the second one. 

Then I tried to delete second application block, leaving the first one. 

First one is the one that is useful to run application. As I might expect, being the block that has been placed exactly where I linked it.

I was wandering if the application copy starting at 0x61000, and created after a usb dfu updating is a safety copy made by bootloader

to be able to recover in case of power failure. Also I wanted ask if, being thins like that, we always have to leave free space in flash whose dimension

is at least application size, in order to allow the copy process? What happens shouldn't be enough free space in flash memory? Does dfu fails?

Thank you for all your kind attention,

Best regards

  • Hi, 

    I was wandering if the application copy starting at 0x61000, and created after a usb dfu updating is a safety copy made by bootloader

    to be able to recover in case of power failure.

    Yes, it is. The bootloader will temporarily store the new application and copy it in place after it has successfully been received and validated (aka dual banking).

    Also I wanted ask if, being thins like that, we always have to leave free space in flash whose dimension

    is at least application size, in order to allow the copy process? What happens shouldn't be enough free space in flash memory? Does dfu fails?

    Dual banking of application updated is optional (but can be configured to be mandatory). So if there is no space for dual bank updates, the application would be deleted before starting the update process, so that no additional flash space is needed. This has the downside that a device will stay in DFU mode if an update is not completed, instead of going back to normal operation. This is not a big issue for most products though.

Related