EVM6418 I2C EEPROM Module
This module reads and writes to the Catalyst CAT24WC256 EEPROM on the EVM. The I2C bus is used for communication with the EEPROM. Since the EEPROM is accessed through an independent serial interface, it is not mapped into the EMIF’s address space. Therefore, addresses are logical offsets from the beginning of the device.
| Name |
Typical Value |
Description |
| EVM6418_EEPROM_BASE |
0x000000 |
Address of start of EEPROM |
| EVM6418_EEPROM_SIZE |
0x8000 |
Total size of EEPROM |
EVM6418_EEPROM_read()
Description
Read data from a range in EEPROM
Required Headers
evm6418.h
evm6418_eeprom.h
Required Libraries
evm6418bsl.lib
Function Prototype
void EVM6418_EEPROM_read(Uint32 src, Uint32 dst, Uint32 length)
Parameters
src – Address in EEPROM to read from. Given as an integral number of 8-bit bytes.
dst – Address in memory to read to.
length – Length of transfer, in 8-bit bytes.
Return Value
None
Example
Uint8 buf[256];
/* Copy 256 8-bit bytes from the
* beginning of the EEPROM to buf */
EVM6418_EEPROM_read(0, (Uint32)buf, 256);
EVM6418_EEPROM_write()
Description
Write data to a data range in EEPROM
Required Headers
evm6418.h
evm6418_eeprom.h
Required Libraries
evm6418bsl.lib
Function Prototype
void EVM6418_EEPROM_write(Uint32 src, Uint32 dst, Uint32 length)
Parameters
src – Address of memory to read from.
dst – Address to EEPROM to write to.
length - Length of transfer in bytes, maximum 64 bytes
Return Value
None
Example
Uint8 buf[256];
/* Copy 256 8-bit bytes from
* buf to the beginning of EEPROM */
EVM6418_EEPROM_write((Uint32)buf, 0, 256);
|