nRF5 SDK v11.0.0
Preserving application data
This information applies to the following SoftDevices: S130, S132, S332

By default, all application data (for example bonding information, system attributes, or data that the application wants to preserve between resets) will be erased during a Device Firmware Update. However, you can configure the DFU bootloader to retain existing application data if your application can work with this data. In this case, new application data will be appended to the existing data.

To preserve application data during a DFU, configure a value for DFU_APP_DATA_RESERVED in dfu_types.h. The default value is 0x0000:

#define DFU_APP_DATA_RESERVED 0x0000

The value must be a multiple of the flash page size, for example 0x0400, 0x0800, 0x0C00, and so on. The default value of 0x0000 means that no application data is preserved. If you set the value to 0x1000, for example, 4096 bytes (4 pages) of application data will be reserved.

Application data is stored in the memory area between the application and the bootloader, right before the beginning of the bootloader.

Documentation feedback | Developer Zone | Updated