Altera_Forum
Honored Contributor
11 years agoAccessing EEPROM on I2C Bus 0 - Altera Arrow SoC kit
Hi experts,
On detecting the I2C devices on I2C Bus 0 for Altera SoCkit by using i2cdetect command in linaro filesystem, $ i2cdetect -y 0 Error: Can't use SMBus Quick Write command on this bus But i was then able to detect EEPROM and LCD on I2C Bus 0 using the command as follows, $ i2cdetect -r 0 WARNING! This program can confuse your I2C bus, cause data loss and worse! I will probe file /dev/i2c-0 using read byte commands. I will probe address range 0x03-0x77. Continue? [Y/n] y 0 1 2 3 4 5 6 7 8 9 a b c d e f 00: -- -- -- -- -- -- -- -- -- -- -- -- -- 10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 20: -- -- -- -- -- -- -- -- UU -- -- -- -- -- -- -- 30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 50: -- UU -- -- -- -- -- -- -- -- -- -- -- -- -- -- 60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- But when i try to read/write to EEPROM on I2C0 using I2C SMBUS read in code / using i2cget, im getting error: read failed. So on trying to access using /sys/bus/i2c/devices/0-0051, i face a time out issue as follows, cat: /sys/bus/i2c/devices/0-0051/eeprom: Connection timed out And its I2C debug messages are, i2c i2c-0: master_xfer[0] W, addr=0x51, len=2 i2c i2c-0: master_xfer[1] R, addr=0x51, len=128 i2c_designware ffc04000.i2c: i2c_dw_xfer: msgs: 2 i2c_designware ffc04000.i2c: i2c_dw_isr: Synopsys DesignWare I2C adapter enabled= 0x1 stat=0x10 i2c_designware ffc04000.i2c: i2c_dw_isr: Synopsys DesignWare I2C adapter enabled= 0x1 stat=0x110 i2c_designware ffc04000.i2c: i2c_dw_isr: Synopsys DesignWare I2C adapter enabled= 0x1 stat=0x150 i2c_designware ffc04000.i2c: i2c_dw_handle_tx_abort: slave address not acknowledged (7bit mode) Any idea/help on accessing the EEPROM on I2C0 will be much more appreciated. Thanks, Dhiv