[U-Boot-Users] IXP and I2C - support

Martin Krause Martin.Krause at tqs.de
Fri Mar 2 08:53:41 CET 2007


Hi Teemu,

madcat at takaisin.fi wrote on Friday, March 02, 2007 8:05 AM: 
> Iprobe - gets the addresses pretty much what it supposed to be, but
> the 
> problem is the reading with imd -command. Some times the command seems
> to be working almost fine. Some times the results are difrerent every
> time I read the chip when it should be the same since I'm trying to
> read a chip that has constant data(for example eeprom). Most of the
> time 
> not all the data is read. Maybe first 3-4 bytes are ok and rest of the
> bytes are either 00 or ff.
> 
> Should I somehow reset the I2C-bus, am I doing something wrong or
> maybe 
> there is some configuration error or maybe even a bug in a code?!

Msybe you are using the wrong number of address bytes when accessing 
your I2C device. It depends on your device, how many address bytes are
needed (0, 1 or 2 bytes). The number of address bytes is specified
by a "." and the desired number directly after "address" in the imd
command:

# help imd
imd chip address[.0, .1, .2] [# of objects]
    - i2c memory display

Example (read 0x10 bytes from an EEPROM with the I2C address 0x54,
beginning at offset 0 and using one address byte):

# imd 54 0.1 10
0000: 51 2d 02 00 61 02 00 00 c9 b6 35 01 df 32 89 45    Q-..a.....5..2.E

Regards,
Martin




More information about the U-Boot mailing list