nRF5 SDK v15.2.0
Macros
Device Firmware Upgrade configuration

Macros

#define NRF_DFU_TRANSPORT_BLE
 BLE transport settings. More...
 
#define NRF_DFU_BLE_ADV_NAME
 Default advertising name. More...
 
#define NRF_DFU_BLE_ADV_INTERVAL
 Advertising interval (in units of 0.625 ms) More...
 
#define NRF_DFU_BLE_REQUIRES_BONDS
 Require bond with peer. More...
 
#define NRF_DFU_BLE_MIN_CONN_INTERVAL
 Minimum connection interval (units). More...
 
#define NRF_DFU_BLE_MAX_CONN_INTERVAL
 Maximum connection interval (units). More...
 
#define NRF_DFU_BLE_CONN_SUP_TIMEOUT_MS
 Supervision timeout (ms). More...
 
#define NRF_DFU_BLE_BUFFERS_OVERRIDE
 Check this option to override the default number of buffers. More...
 
#define NRF_DFU_BLE_BUFFERS
 Number of buffers in the BLE transport. More...
 
#define NRF_DFU_PROTOCOL_FW_VERSION_MSG
 Firmware version message support. More...
 
#define NRF_DFU_PROTOCOL_VERSION_MSG
 Protocol version message support. More...
 
#define NRF_DFU_APP_DOWNGRADE_PREVENTION
 Check the firmware version and SoftDevice requirements of application (and SoftDevice) updates. More...
 
#define NRF_DFU_FORCE_DUAL_BANK_APP_UPDATES
 Accept only dual-bank application updates. More...
 
#define NRF_DFU_HW_VERSION
 Device hardware version. More...
 
#define NRF_DFU_REQUIRE_SIGNED_APP_UPDATE
 Require a valid signature to update the application or SoftDevice. More...
 
#define NRF_DFU_SINGLE_BANK_APP_UPDATES
 Place the application and the SoftDevice directly where they are supposed to be. More...
 
#define NRF_DFU_APP_DATA_AREA_SIZE
 The size (in bytes) of the flash area reserved for application data. More...
 
#define NRF_DFU_SAVE_PROGRESS_IN_FLASH
 Save DFU progress in flash. More...
 
#define NRF_DFU_SETTINGS_ALLOW_UPDATE_FROM_APP
 Whether to allow the app to receive firmware updates for the bootloader to activate. More...
 
#define NRF_DFU_SETTINGS_IN_APP
 Specifies that this code is in the app, not the bootloader, so some settings are off-limits. More...
 

Detailed Description

Macro Definition Documentation

#define NRF_DFU_APP_DATA_AREA_SIZE

The size (in bytes) of the flash area reserved for application data.

This area is found at the end of the application area, next to the start of the bootloader. This area will not be erased by the bootloader during a firmware upgrade. The size must be a multiple of the flash page size.

Note
This is an NRF_CONFIG macro.
#define NRF_DFU_APP_DOWNGRADE_PREVENTION

Check the firmware version and SoftDevice requirements of application (and SoftDevice) updates.

Whether to check the incoming version against the version of the existing app and/or the incoming SoftDevice requirements against the existing SoftDevice. This applies to application updates, and possibly to SoftDevice updates. Disabling this causes the checks to always ignore the incoming firmware version and to ignore the SoftDevice requirements if the first requirement is 0. This does not apply the bootloader updates. If the bootloader depends on the SoftDevice e.g. for BLE transport, this does not apply to SoftDevice updates. See Validation for more information. When signed updates are required, version checking should always be enabled.

Set to 1 to activate.

Note
This is an NRF_CONFIG macro.
#define NRF_DFU_BLE_ADV_INTERVAL

Advertising interval (in units of 0.625 ms)

Note
This is an NRF_CONFIG macro.
#define NRF_DFU_BLE_ADV_NAME

Default advertising name.

Note
This is an NRF_CONFIG macro.
#define NRF_DFU_BLE_BUFFERS

Number of buffers in the BLE transport.

Number of buffers to store incoming data while it is being written to flash. Reduce this value to save RAM. If this value is too low, the DFU process will fail.

Note
This is an NRF_CONFIG macro.
#define NRF_DFU_BLE_BUFFERS_OVERRIDE

Check this option to override the default number of buffers.

Set to 1 to activate.

Note
This is an NRF_CONFIG macro.
#define NRF_DFU_BLE_CONN_SUP_TIMEOUT_MS

Supervision timeout (ms).

GAP connection supervision timeout, in milliseconds.

Note
This is an NRF_CONFIG macro.
#define NRF_DFU_BLE_MAX_CONN_INTERVAL

Maximum connection interval (units).

Maximum GAP connection interval, in 1.25 ms units.

Note
This is an NRF_CONFIG macro.
#define NRF_DFU_BLE_MIN_CONN_INTERVAL

Minimum connection interval (units).

Minimum GAP connection interval, in 1.25 ms units.

Note
This is an NRF_CONFIG macro.
#define NRF_DFU_BLE_REQUIRES_BONDS

Require bond with peer.

Set to 1 to activate.

Note
This is an NRF_CONFIG macro.
#define NRF_DFU_FORCE_DUAL_BANK_APP_UPDATES

Accept only dual-bank application updates.

If not enabled then if there is not enough space to perform dual-bank update application is deleted and single-bank update is performed. In case it is considered security concern user can prefer to discard update request rather than overwrite current application.

Set to 1 to activate.

Note
This is an NRF_CONFIG macro.
#define NRF_DFU_HW_VERSION

Device hardware version.

This is used to determine if given update is targeting the device. It is checked against the hw_version value in the init packet

Note
This is an NRF_CONFIG macro.
#define NRF_DFU_PROTOCOL_FW_VERSION_MSG

Firmware version message support.

Firmware version message support. If disabled, firmware version requests will return NRF_DFU_RES_CODE_OP_CODE_NOT_SUPPORTED.

Set to 1 to activate.

Note
This is an NRF_CONFIG macro.
#define NRF_DFU_PROTOCOL_VERSION_MSG

Protocol version message support.

Protocol version message support. If disabled, protocol version requests will return NRF_DFU_RES_CODE_OP_CODE_NOT_SUPPORTED.

Set to 1 to activate.

Note
This is an NRF_CONFIG macro.
#define NRF_DFU_REQUIRE_SIGNED_APP_UPDATE

Require a valid signature to update the application or SoftDevice.

Set to 1 to activate.

Note
This is an NRF_CONFIG macro.
#define NRF_DFU_SAVE_PROGRESS_IN_FLASH

Save DFU progress in flash.

Save DFU progress to flash so that it can be resumed if interrupted, instead of being restarted. Keep this setting disabled to maximize transfer speed and minimize flash wear. The init packet is always saved in flash, regardless of this setting.

Set to 1 to activate.

Note
This is an NRF_CONFIG macro.
#define NRF_DFU_SETTINGS_ALLOW_UPDATE_FROM_APP

Whether to allow the app to receive firmware updates for the bootloader to activate.

Enable this to allow the app to instruct the bootloader to activate firmware. The bootloader will perform only a cursory check on the firmware (CRC).

Set to 1 to activate.

Note
This is an NRF_CONFIG macro.
#define NRF_DFU_SETTINGS_IN_APP

Specifies that this code is in the app, not the bootloader, so some settings are off-limits.

Enable this to disable writing to areas of the settings that are protected by the bootlader. If this is not enabled in the app, certain settings write operations will cause HardFaults or will be ignored.

Set to 1 to activate.

Note
This is an NRF_CONFIG macro.
#define NRF_DFU_SINGLE_BANK_APP_UPDATES

Place the application and the SoftDevice directly where they are supposed to be.

Note that this creates security concerns when signing and version checks are enabled. An attacker will be able to delete (but not replace) the current app or SoftDevice without knowing the signature key.

Set to 1 to activate.

Note
This is an NRF_CONFIG macro.
#define NRF_DFU_TRANSPORT_BLE

BLE transport settings.

Set to 1 to activate.

Note
This is an NRF_CONFIG macro.

Documentation feedback | Developer Zone | Subscribe | Updated