dwm_fw_update_xfer
This call is available only on the ethernet gateway. It should be called repeatedly after dwm_fw_update_start to transfer firmware data chunks until all the firmware data chunks are transferred. Returns status “ok” followed by the data request frame until all the data needed for the firmware update is transferred, in which case status “ok” is returned with no data request following or until the update ends with an error. The error is indicated by status other than “ok”. The reasons for the failed firmware update are:
internal error
invalid parameter - e.g. data chunk with zero length
not permitted - not started yet, or the whole update process has failed
checksum error - received image is corrupted.
The size and the offset of the data that are already written to the flash memory by the firmware update procedure so far are returned as a response to each call to dwm_fw_update_xfer until the update is completed.
offset: 32-bit integer (* Offset of the total firmware data.*)
data: from 4 up to 32 bytes (Firmware data chunk.)
offset: 32-bit integer (Offset of data that need to be written next by leaps_fw_update_xfer)
size: 32-bit integer (Size of firmware data chunk that need to be written by leaps_fw_update_xfer)
SPI/UART example
TLV Request |
|||
---|---|---|---|
Type |
Length |
Value |
|
Offset |
Data Chunk |
||
0x3F |
0x24 |
0x00 0x00 0x00 0x00 |
0xA5 0xA5 0xA5 0xA5 0xA5 0xA5 0xA5 0xA5 …. 0xA5 0xA5 0xA5 0xA5 |
Type 0x3F (63 dec) means command dwm_fw_update_xfer
TLV Response |
|||||
---|---|---|---|---|---|
Type Length |
Value |
Type |
Length |
Value |
|
0x40 0x01 |
0x00 |
0x7E |
0x08 |
Offset |
Size |
0x00 0x00 0x00 0x00 |
0x00 0x10 0x00 0x00 |