EEPROM
EEPROM stands for Electrically Erasable Programmable Read-Only Memory. It is a non-volatile memory that can be programmed and erased electrically. The nonvolatile memory available on the phyCORE-AM64x is a 32KB EEPROM with an I2C interface. It can be accessed through the I2C0 on the phyCORE-AM64x at address 0x50. EEPROM can be used to store configuration data or other general-purpose data. This guide will show you how to access the 2Kbit EEPROM featured on the phyCORE-AM64x development kit carrier board. To learn more information about the phyCORE-AM64x EEPROM system memory, please see section 6.1.2 in the Hardware Manual.
Note
The phyCORE-AM64x development kit provides access to two EEPROMs, one 32Kbit EEPROM on the SOM and a 2Kbit EEPROM on the carrier board.
Location |
Reference |
I2C Bus |
Address |
---|---|---|---|
SOM |
U7 |
i2c0 |
0x50 |
Carrier Board |
U61 |
i2c1 |
0x51 |
Verifying EEPROM Initialization
First ensure that the EEPROM is initialized correctly by checking the boot log.
Target (Linux)dmesg | grep -i "eeprom"
Expected Outputroot@phyboard-electra-am64xx-2:~# dmesg | grep -i "eeprom" [ 5.729717] at24 0-0050: 4096 byte 24c32 EEPROM, writable, 32 bytes/write [ 5.766493] at24 1-0051: 256 byte 24c02 EEPROM, writable, 16 bytes/write
Writing to the EEPROM
Clear out the entirety of the EEPROM by writing zeros to it.
Now generate a 2Kbit file with random data. This will serve as the test file:
Write the test file to the EEPROM
Reading from EEPROM
Read the contents of the EEPROM and store it to a file.
Make sure the output file was not corrupted during the transfer using md5sum. Both of the files should have matching MD5 hashes.
Reading/Writing to the SOM EEPROM
The SOM EEPROM is used for PHYTEC’s Hardware Introspection, which allows to automatically load the correct software for the underlying SOM configuration.
Do not modify the content. The BSP does not use the Hardware Introspection.