MW_DFU_FwImageUpdate
PIC32CX-BZ2
C
uint16_t MW_DFU_FwImageUpdate(uint16_t length, uint8_t *p_content);Description
Updates a fragment of the firmware image in flash memory.
Note
This API should be called multiple times to update all fragments of the firmware image.
Parameters
| Parameter | Description |
|---|---|
| [in] length | The length of the image fragment to update, in bytes. Must be aligned to 16 bytes. |
| [in] p_content | Pointer to the image fragment data. |
Return values
| Return value | Description |
|---|---|
| MBA_RES_SUCCESS | Fragment of firmware image updated successfully. |
| MBA_RES_INVALID_PARA | Invalid parameters. The length exceeds the image size, the maximum block length Maximum block length, or is not 16-byte aligned. |
| MBA_RES_BAD_STATE | The API cannot be executed in the current state of the DFU process. |
| MBA_RES_OOM | Out of memory error. |
| MBA_RES_FAIL | Failed to update the fragment to flash memory. |
PIC32CX-BZ3
C
uint16_t MW_DFU_FwImageUpdate(uint16_t length, uint8_t *p_content);Description
Updates a fragment of the firmware image in flash memory.
Note
This API should be called multiple times to update all fragments of the firmware image.
Parameters
| Parameter | Description |
|---|---|
| [in] length | The length of the image fragment to update, in bytes. Must be aligned to 16 bytes for internal flash. For external flash, it must be 256-byte aligned unless it is the last fragment. |
| [in] p_content | Pointer to the image fragment data. |
Return values
| Return value | Description |
|---|---|
| MBA_RES_SUCCESS | Fragment of firmware image updated successfully. |
| MBA_RES_INVALID_PARA | Invalid parameters. The length exceeds the image size, the maximum block length Maximum block length, or does not meet alignment requirements. |
| MBA_RES_BAD_STATE | The API cannot be executed in the current state of the DFU process. |
| MBA_RES_OOM | Out of memory error. |
| MBA_RES_FAIL | Failed to update the fragment to flash memory. |
PIC32CX-BZ6
C
uint16_t MW_DFU_FwImageUpdate(uint16_t length, uint8_t *p_content);Description
Updates a fragment of the firmware image in flash memory.
Note
This API should be called multiple times to update all fragments of the firmware image.
Parameters
| Parameter | Description |
|---|---|
| [in] length | The length of the image fragment to update, in bytes. Must be aligned to 16 bytes for internal flash. |
| [in] p_content | Pointer to the image fragment data. |
Return values
| Return value | Description |
|---|---|
| MBA_RES_SUCCESS | Fragment of firmware image updated successfully. |
| MBA_RES_INVALID_PARA | Invalid parameters. The length exceeds the image size, the maximum block length Maximum block length, or does not meet alignment requirements. |
| MBA_RES_BAD_STATE | The API cannot be executed in the current state of the DFU process. |
| MBA_RES_OOM | Out of memory error. |
| MBA_RES_FAIL | Failed to update the fragment to flash memory. |
