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

ParameterDescription
[in] lengthThe length of the image fragment to update, in bytes. Must be aligned to 16 bytes.
[in] p_contentPointer to the image fragment data.

Return values

Return valueDescription
MBA_RES_SUCCESSFragment of firmware image updated successfully.
MBA_RES_INVALID_PARAInvalid parameters. The length exceeds the image size, the maximum block length Maximum block length, or is not 16-byte aligned.
MBA_RES_BAD_STATEThe API cannot be executed in the current state of the DFU process.
MBA_RES_OOMOut of memory error.
MBA_RES_FAILFailed 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

ParameterDescription
[in] lengthThe 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_contentPointer to the image fragment data.

Return values

Return valueDescription
MBA_RES_SUCCESSFragment of firmware image updated successfully.
MBA_RES_INVALID_PARAInvalid parameters. The length exceeds the image size, the maximum block length Maximum block length, or does not meet alignment requirements.
MBA_RES_BAD_STATEThe API cannot be executed in the current state of the DFU process.
MBA_RES_OOMOut of memory error.
MBA_RES_FAILFailed 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

ParameterDescription
[in] lengthThe length of the image fragment to update, in bytes. Must be aligned to 16 bytes for internal flash.
[in] p_contentPointer to the image fragment data.

Return values

Return valueDescription
MBA_RES_SUCCESSFragment of firmware image updated successfully.
MBA_RES_INVALID_PARAInvalid parameters. The length exceeds the image size, the maximum block length Maximum block length, or does not meet alignment requirements.
MBA_RES_BAD_STATEThe API cannot be executed in the current state of the DFU process.
MBA_RES_OOMOut of memory error.
MBA_RES_FAILFailed to update the fragment to flash memory.