| nRF5 SDK v12.0.0 |

Choose documentation: | nRF5 SDK | S130 SoftDevice API | S132 SoftDevice API | S212 SoftDevice API | S332 SoftDevice API

All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages
Functions
MBR functions
DFU bootloader

## 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)
| 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_ptr1 | First pointer to data to compare.
  [in] | p_ptr2 | Second pointer to data to compare.
  [in] | len | Length of the data to compare in bytes.

Return values

  NRF_SUCCESS | If the content of both memory blocks is equal.
  NRF_ERROR_NULL | If 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_src | Source address of the bootloader data to copy.
  [in] | len | Length 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_dst | Target of the SoftDevice copy.
  [in] | p_src | Source address of the SoftDevice image to copy.
  [in] | len | Length of the data to copy in bytes.

Return values

  NRF_SUCCESS | indicates that the contents of the memory blocks where copied correctly.
  NRF_ERROR_INVALID_LENGTH | Invalid len
  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.
  NRF_ERROR_INTERNAL | indicates 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_SUCCESS | If 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 | ) |

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

Parameters

  [in] | address | Address of the new vector table.

Return values

  NRF_SUCCESS | If the address of the new vector table was set. Any other return value indicates that the address could not be set.