nRF5 SDK v13.0.0
Device Firmware Update process

Two devices are required to perform a Device Firmware Update: the DFU target and the DFU controller. The DFU target is the device that is updated with a new firmware image, which can contain a new application, SoftDevice, bootloader, or a combination of SoftDevice and bootloader. The DFU controller is the device that transfers the image. For example, the DFU controller can be a mobile phone running an app, or an nRF5 Development Kit in conjunction with nrfutil.

The DFU target is the device that runs the DFU bootloader. If the bootloader puts the device in DFU mode, the bootloader expects a Device Firmware Update. The DFU controller can then initiate the transfer of a firmware image, which is received and validated by the DFU bootloader. If the image is valid, the device resets and copies the image to replace the existing firmware. Depending on the type of image, it might replace the application, the SoftDevice, or even the current bootloader that is receiving the update. See Dual-bank and single-bank updates for detailed information about where the image is stored and how it is copied.

As DFU controller, use the nrfutil tool (version 2.2.0 or later) or Nordic's mobile apps. The bootloader modules can be used to implement the DFU target. The following flow chart shows the required steps for a firmware update, which must be implemented in the bootloader of the DFU target:

bootloader_process.svg
Process flow on the DFU target

The events and procedures for the firmware update process are agnostic of the transport protocol that is in use. Therefore, it is possible to perform a firmware update using any transport protocol (see DFU transport). The DFU controller can trigger the events by sending a corresponding message on the DFU transport.

Bootloader settings

The current state of the DFU process is stored in the bootloader settings page, which is located on the last page of the available flash storage (see Memory layout).

The information in the settings page is used to determine the correct action after a reset of the device:

The bootloader settings page can also be used to store information that should be maintained through the update process, for example, firmware version numbers.


Documentation feedback | Developer Zone | Subscribe | Updated