Beaglebone black: I2C write and read issue for external EEPROM

Hi,

We want to test I2C in beaglebone black board using external EEPROM CAT24C128WI-G .
It is connected to I2C-2 and detecting the device address as 0x51 and we are trying to write to the EEPROM address and read it back using the following commands.
i2cset -y 2 0x51 0x0001 0x11 w
i2cget -y 2 0x51 0x0001 w
However it is always responding with 0xff
Please let us know the steps to solve this issue.

Thanks,
Devika R

How is the WP pin wired on the eeprom ? Could the write protect be enabled ?

Hi,

WP is left open, write protect is not enabled

Thanks,
Devika R

As you are not getting an error, I would guess you are talking with the eeprom.

As you are specifying a word write have to tried changing the 0x11 to 0x0011 ?
I wouldn’t expect it to mater, but it would depend on how i2cset parses the parameters.

You could also just try writing a byte rather than a word.

Hi,

We have tried by writing as a byte, but still it has same issue.
Also we have tried by changing 0x11 to 0x0011 , However it is still responding as 0xffff.

debian@beaglebone:~$ i2cdetect -y -r 2
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: – – – – – – – – – – – – –
10: – – – – – – – – – – – – – – – –
20: – – – – – – – – – – – – – – – –
30: – – – – – – – – – – – – – – – –
40: – – – – – – – – – – – – – – – –
50: – 51 – – UU UU UU UU – – – – – – – –
60: – – – – – – – – – – – – – – – –
70: – – – – – – – –
debian@beaglebone:~$ i2cset -y 2 0x51 0x0001 0x0011 w
debian@beaglebone:~$ i2cdetect -y -r 2
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: – – – – – – – – – – – – –
10: – – – – – – – – – – – – – – – –
20: – – – – – – – – – – – – – – – –
30: – – – – – – – – – – – – – – – –
40: – – – – – – – – – – – – – – – –
50: – 51 – – UU UU UU UU – – – – – – – –
60: – – – – – – – – – – – – – – – –
70: – – – – – – – –
debian@beaglebone:~$ i2cget -y 2 0x51 0x0001 w
0xffff
debian@beaglebone:~$

Thanks,
Devika R