Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

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

Scroll Title
titleEEPROM_WRITE Command Packet Layout.

Byte

Value

Description

1

0xA9

EEPROM_WRITE command ID

2

AddrHigh

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

3

AddrLow

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

4

size

Number of bytes to write (max 6032)

From 5 to size+4

data

Data to write (size bytes)

From size+5 to 64

-

Not used

Note
titleEEPROM Page Size = 64 => ((AddrHigh + AddrLow)%64) < size

"Page write operations are limited to writing bytes within a single physical page, regardless of the number of bytes actually being written. Physical page boundaries start at addresses

that are integer multiples of the page buffer size (or ‘page size’) and end at addresses that are integer multiples of [page size - 1]. If a Page Write command attempts to write across a

physical page boundary, the result is that the data wraps around to the beginning of the current page (over-writing data previously stored there), instead of being written to the next page,

as might be expected. It is, therefore, necessary for the application software to prevent page write operations that would attempt to cross a page boundary."

From EEPROM 24LC128 Microchip Manual.

This section imply that this condtion should be true for correct operation: ((AddrHigh + AddrLow)%64) < size.

The ((AddrHigh + AddrLow)%64) is the remainder of ((AddrHigh + AddrLow)/64) operation.

Reply packet contains readback data.

...