MW_DFU_FwImageRead
PIC32CX-BZ2
C
uint16_t MW_DFU_FwImageRead(uint32_t offset, uint16_t length, uint8_t *p_content);Description
Reads a fragment of the firmware image from flash memory.
Note
The first 16 bytes of the image fragment read from flash are invalid until the full firmware image is updated.
Parameters
| Parameter | Description |
|---|---|
| [in] offset | The offset in flash memory from where to start reading the image fragment. |
| [in] length | The length of the image fragment to read, in bytes. |
| [in] p_content | Pointer to the buffer where the image fragment will be stored. |
Return values
| Return value | Description |
|---|---|
| MBA_RES_SUCCESS | Fragment of firmware image read successfully. |
| MBA_RES_INVALID_PARA | Invalid parameters. The sum of offset and length exceeds the maximum firmware image size Maximum image size, or the length exceeds the maximum block length Maximum block length. |
PIC32CX-BZ3 and PIC32CX-BZ6
C
uint16_t MW_DFU_FwImageRead(uint32_t offset, uint16_t length, uint8_t *p_content);Description
Reads a fragment of the firmware image from flash memory.
Note
The first 16 bytes of the image fragment read from flash are invalid until the full firmware image is activated.
Parameters
| Parameter | Description |
|---|---|
| [in] offset | The offset in flash memory from where to start reading the image fragment. |
| [in] length | The length of the image fragment to read, in bytes. |
| [in] p_content | Pointer to the buffer where the image fragment will be stored. |
Return values
| Return value | Description |
|---|---|
| MBA_RES_SUCCESS | Fragment of firmware image read successfully. |
| MBA_RES_INVALID_PARA | Invalid parameters. The sum of offset and length exceeds the maximum firmware image size Maximum image size, or the length exceeds the maximum block length Maximum block length. |
| MBA_RES_FAIL | Flash access failed. |
