nRF51 SDK - S110 SoftDevice
 All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages
Memory layout

When implementing a mechanism to perform a Device Firmware Update, you must be aware of where in the device memory the different firmware components are located.

The following figure displays the default memory layout of a 256 kB nRF51 device:

ble_app_dfu_memory.svg
Memory layout (256 kB)

SoftDevices have different sizes. For example, the S110 SoftDevice v8.0.0 ends at 0x00018000. The following table shows the memory layout on a 256 kB nRF51 device with the S110 SoftDevice v8.0.0:

Memory range Usage
0x0003C000 - 0x00040000 DFU Bootloader and data
0x00018000 - 0x0003C000 Application code, free/swap, and application data
0x00001000 - 0x00018000 SoftDevice
0x00000000 - 0x00001000 Master Boot Record (MBR)

During system start-up, the Master Boot Record will determine the start address of the bootloader by checking the address that is defined at UICR.BOOTLOADERADDR. See Relocating the bootloader for information on how to change the start address of the bootloader.

The MBR will then initiate the bootloader. During initialization, the bootloader will either enter DFU mode to perform a firmware update or request the SoftDevice to start the application. The application is located right after the SoftDevice, so the SoftDevice is aware of its start address.

Firmware updates can be performed as dual-bank or single-bank updates. See Dual-bank and single-bank updates for more information and a detailed description of the update process.

Application data can be preserved during an update. See Preserving application data for instructions.