I'm trying to read from eeprom by using i2cgert (or i2ctransfer) but i can't reset the internal address counter of the eeprom. Hence, I each time read different values for the same offset.
For example:
$ i2ctransfer -y 0 w1@0x52 0x00 r20@0x52
0x00 0x00 0x00 0x40 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x01 0x20 0x00 0x00 0x00
$ i2ctransfer -y 0 w1@0x52 0x00 r20@0x52
0x05 0x00 0x00 0x20 0x00 0x00 0x00 0x30 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
can you please help me with how i can read with i2ctransfer or i2cget and to make sure that i starting to read from the beginning of the eeprom?
I dont know the internals of
i2ctransferalthough I used it for reading SFP 512 Byte EEPROM and it worked.Your syntax looks legit, although you dont need chip address specify again:
this is from DS, how to set the random address first:
Did you try 2 separate transfers? First write dummy byte (set address counter to 0) and then sequential read of 20 bytes.