BeagleBone Black I2C Problem

Adil,

I'm sure the responses from the fine developers on the list are likely
to be better than mine. If you copied the list on the first place, you
probably would have had your answer last week.

Dear Jason Krinder,

Hello,

First of all How are you?

Catch up with me at a trade show over a beer and I'll let you know. :slight_smile:

i am working on Beaglebone Black and design GUI software for my application,
The problem that i am facing is using I2C, i am trying to communicate with
atmel 24c32
I2C EEPROM which is at address 0x50 in i2c-1 bus of beaglebone black.

when i execute command i2cget 1 0x50 0x00, it shows correct data on 0x00 for
the first time,
on second time i2cget 1 0x50 0x00 shows the random value from any other
location, and other value for the third time.

It depends which kernel you are using which bus is actually
'/dev/i2c-1'. On the BeagleBoard.org Debian stable kernels
(3.8.13-bone6?), Bus '1' is I2C2, which is the cape expansion header
bus. I think that 0x50 is reserved for an EDID EEPROM on the HDMI.

Without a monitor connected for me, it simply fails:
root@beaglebone:~# i2cget -y 1 0x50 0x00
Error: Read failed

If you meant the on-board EEPROM that is on I2C0, then you have to
recognize that the kernel has already taken ownership of that I2C
device and it won't let you simply read it this way:
root@beaglebone:~# i2cget -y 0 0x50 0x00
Error: Could not set address to 0x50: Device or resource busy

You can still easily read the EEPROM using the I2C EEPROM driver,
rather than i2c-dev:
root@beaglebone:~# hexdump -C
/sys/class/i2c-dev/i2c-0/device/0-0050/eeprom | head -5
00000000 aa 55 33 ee 41 33 33 35 42 4e 4c 54 30 41 36 41 |.U3.A335BNLT0A6A|
00000010 30 34 31 34 42 42 42 4b 30 33 36 33 ff ff ff ff |0414BBBK0363....|
00000020 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|