Functions | |
uint32_t | sd_mbr_command (sd_mbr_command_t *param) |
Issue Master Boot Record commands. More... | |
uint32_t sd_mbr_command | ( | sd_mbr_command_t * | param | ) |
Issue Master Boot Record commands.
Commands used when updating a SoftDevice and bootloader.
The SD_MBR_COMMAND_COPY_BL and SD_MBR_COMMAND_VECTOR_TABLE_BASE_SET requires parameters to be retained by the MBR when resetting the IC. This is done in a separate flash page provided by the application. The UICR register UICR.NRFFW[1] must be set to an address corresponding to a page in the application flash space. This page will be cleared by the MBR and used to store the command before reset. When the UICR.NRFFW[1] field is set the page it refers to must not be used by the application. If the UICR.NRFFW[1] is set to 0xFFFFFFFF (the default) MBR commands which use flash will be unavailable and return NRF_ERROR_NO_MEM.
[in] | param | Pointer to a struct describing the command. |
NRF_ERROR_NO_MEM | if UICR.NRFFW[1] is not set (i.e. is 0xFFFFFFFF). |
NRF_ERROR_INVALID_PARAM | if an invalid command is given. |