nRF5 SDK v13.0.0
Functions
MBR functions

Functions

uint32_t nrf_dfu_mbr_copy_bl (uint32_t *p_src, uint32_t len)
 Function for copying the bootloader using an MBR command. More...
 
uint32_t nrf_dfu_mbr_copy_sd (uint32_t *p_dst, uint32_t *p_src, uint32_t len)
 Function for copying the SoftDevice using an MBR command. More...
 
uint32_t nrf_dfu_mbr_init_sd (void)
 Function for initializing the SoftDevice using an MBR command. More...
 
uint32_t nrf_dfu_mbr_compare (uint32_t *p_ptr1, uint32_t *p_ptr2, uint32_t len)
 Function for comparing source and target using an MBR command. More...
 
uint32_t nrf_dfu_mbr_vector_table_set (uint32_t address, uint8_t is_temporary)
 Function for setting the address of the vector table using an MBR command. More...
 

Detailed Description

Function Documentation

uint32_t nrf_dfu_mbr_compare ( uint32_t *  p_ptr1,
uint32_t *  p_ptr2,
uint32_t  len 
)

Function for comparing source and target using an MBR command.

Parameters
[in]p_ptr1First pointer to data to compare.
[in]p_ptr2Second pointer to data to compare.
[in]lenLength of the data to compare in bytes.
Return values
NRF_SUCCESSIf the content of both memory blocks is equal.
NRF_ERROR_NULLIf the content of the memory blocks differs.
uint32_t nrf_dfu_mbr_copy_bl ( uint32_t *  p_src,
uint32_t  len 
)

Function for copying the bootloader using an MBR command.

Parameters
[in]p_srcSource address of the bootloader data to copy.
[in]lenLength of the data to copy in bytes.
Returns
This function will return only if the command request could not be run. See sd_mbr_command_copy_bl_t for possible return values.
uint32_t nrf_dfu_mbr_copy_sd ( uint32_t *  p_dst,
uint32_t *  p_src,
uint32_t  len 
)

Function for copying the SoftDevice using an MBR command.

Parameters
[in]p_dstTarget of the SoftDevice copy.
[in]p_srcSource address of the SoftDevice image to copy.
[in]lenLength of the data to copy in bytes.
Return values
NRF_SUCCESSindicates that the contents of the memory blocks where copied correctly.
NRF_ERROR_INVALID_LENGTHInvalid len
NRF_ERROR_NO_MEMif UICR.NRFFW[1] is not set (i.e. is 0xFFFFFFFF).
NRF_ERROR_INVALID_PARAMif an invalid command is given.
NRF_ERROR_INTERNALindicates that the contents of the memory blocks where not verified correctly after copying.
uint32_t nrf_dfu_mbr_init_sd ( void  )

Function for initializing the SoftDevice using an MBR command.

Return values
NRF_SUCCESSIf the SoftDevice was copied successfully. Any other return value indicates that the SoftDevice could not be copied.
uint32_t nrf_dfu_mbr_vector_table_set ( uint32_t  address,
uint8_t  is_temporary 
)

Function for setting the address of the vector table using an MBR command.

Parameters
[in]addressAddress of the new vector table.
[in]is_temporaryIf set to 1 the new forwarding address will not be stored in flash.
Return values
NRF_SUCCESSIf the address of the new vector table was set. Any other return value indicates that the address could not be set.

Documentation feedback | Developer Zone | Subscribe | Updated