sd_mbr_command_copy_bl_t

S332 SoftDevice v4.0.2 API

This command copies a new BootLoader. With this command, destination of BootLoader is always the address written in NRF_UICR->BOOTADDR. More...

#include <nrf_mbr.h>

Data Fields

uint32_t * bl_src
uint32_t bl_len

Detailed Description

This command copies a new BootLoader. With this command, destination of BootLoader is always the address written in NRF_UICR->BOOTADDR.

Destination is erased by this function. If (destination+bl_len) is in the middle of a flash page, that whole flash page will be erased.

This function will use PROTENSET to protect the flash that is not intended to be written.

On success, this function will not return. It will start the new BootLoader from reset-vector as normal.

Return values
NRF_ERROR_INTERNAL indicates an internal error that should not happen.
NRF_ERROR_FORBIDDEN if NRF_UICR->BOOTADDR is not set.
NRF_ERROR_INVALID_LENGTH if parameters attempts to read or write outside flash area.
NRF_ERROR_NO_MEM if no parameter page is provided (see SoftDevice Specification for more info)

Field Documentation

uint32_t sd_mbr_command_copy_bl_t::bl_len

Number of 32 bit words to copy for BootLoader.

uint32_t* sd_mbr_command_copy_bl_t::bl_src

Pointer to the source of the Bootloader to be be copied.