This command writes data (from 1 to 59 bytes) to the requested SPI Flash address. Afterwards, it writes USB FX2 firmware, reads back data from Flash and returns it in a reply packet.

Byte

Value

Description

1

0xA6

FLASH_WRITE command ID

2

Sector

Flash sector to read (address [23:16])

3

AddrHigh

High part of address (address [15:8])

4

AddrLow

Low part of address (address [7:0])

5

size

Number of bytes to read (max 59)

From 6 to size+5

data

Data to write (size bytes)

From size+6 to 64

-

Not used

FLASH_WRITE Command Packet Layout.

Reply packet contains readback data.

Byte

Description

From 1 to size

Readback result

From size to 64

Not used

FLASH_WRITE Reply Packet Layout.


  • No labels