Embassy
nrf-softdevice-s132

Crates

git

Versions

default

Flavors

pub unsafe fn sd_mbr_command(param: *mut sd_mbr_command_t) -> u32
Expand description

@brief Issue Master Boot Record commands

Commands used when updating a SoftDevice and bootloader.

The @ref SD_MBR_COMMAND_COPY_BL and @ref 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. The location of the flash page should be provided by the application in either @ref MBR_PARAM_PAGE_ADDR or @ref MBR_UICR_PARAM_PAGE_ADDR. If both addresses are set, the MBR will prioritize @ref MBR_PARAM_PAGE_ADDR. This page will be cleared by the MBR and is used to store the command before reset. When an address is specified, the page it refers to must not be used by the application. If no address is provided by the application, i.e. both @ref MBR_PARAM_PAGE_ADDR and @ref MBR_UICR_PARAM_PAGE_ADDR is 0xFFFFFFFF, MBR commands which use flash will be unavailable and return @ref NRF_ERROR_NO_MEM.

@param[in] param Pointer to a struct describing the command.

@note For a complete set of return values, see ::sd_mbr_command_copy_sd_t, ::sd_mbr_command_copy_bl_t, ::sd_mbr_command_compare_t, ::sd_mbr_command_vector_table_base_set_t, ::sd_mbr_command_irq_forward_address_set_t

@retval ::NRF_ERROR_NO_MEM No MBR parameter page provided @retval ::NRF_ERROR_INVALID_PARAM if an invalid command is given.