.. _eeprom-65: EEPROM ======= The phyCORE-AM65x SOM has an on board 4kB EEPROM. The device is connected to the I2C0 interface at address 0x50. This guide provides instructions for how to interact with the EEPROM from Linux. Verify the EEPROM is detected ------------------------------- * Use the following command to print the name of the EEPROM. The expected result is 24c32 which corresponds to the device driver name in Linux. .. code-block:: none :caption: Target (Linux) cat /sys/class/i2c-dev/i2c-2/device/2-0050/name Write to the EEPROM --------------------- * Create data that you want to store on the EEPROM. In this example a hello.img file was created with the text "Hello World" .. code-block:: none :caption: Target (Linux) echo "Hello World" > hello.img * Write the file (hello.img) to the EEPROM .. code-block:: none :caption: Target (Linux) dd if=hello.img of=/sys/class/i2c-dev/i2c-2/device/2-0050/eeprom bs=1 count=4096 Read from the EEPROM ------------------------ * Dump the contents of the entire 4kB EEPROM .. code-block:: none :caption: Target (Linux) dd if=/sys/class/i2c-dev/i2c-2/device/2-0050/eeprom bs=1 count=4096 | hexdump -C * If hello.img was written to the EEPROM in the previous step you should see the following output: .. code-block:: none :caption: Expected Output 00000000 48 65 6c 6c 6f 20 57 6f 72 6c 64 0a 00 00 00 00 |Hello World.....| 00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| * 00001000 4096+0 records in 4096+0 records out Erase the EEPROM ----------------- * Write all zeros to the entire density of the EEPROM to erase the contents .. code-block:: none :caption: Target (Linux) dd if=/dev/zero of=/sys/bus/i2c/devices/2-0050/eeprom bs=4096 count=1