[i2c] I2C on AT91RM9200 receives extra byte

Andrew Victor andrew at sanpeople.com
Thu Sep 7 13:16:44 CEST 2006


hi Mark,

> * Mike Wolfram <wolfram at microdatec.de> [2006-09-06 09:35:01 +0200]:
> > I tried the patches for 2.6.18rc-4 and found out, that each I2C read receives 
> > an extra FF at the end. This byte will be the first byte of the next read 
> > message.
> > 
> > Comparing earlier versions with that one I saw that sending STOP is now done 
> > after reading the last byte from RHR. I changed it back to send STOP before 
> > reading RHR the last time and the FF is gone.
> > 
> > May I consider this to be the right way or is there something else wrong?
> 
> When I reviewed this driver back in July, I remember asking Andrew to check
> that the logic around the STOP condition matched the flowchart in the data-
> sheet.  AFAICT, it didn't; in his latest revision it did.  Looking again at
> the datasheet this morning, it actually says *nothing* about when to read
> RHR.
> 
> So Mike: it wouldn't surprise me if such a change were necessary.  But just
> to be sure... please point out which of Andrew's revisions you've started
> with (a link is fine) and also send a patch with your change.
> 
> Andrew: do you have an update for this driver?  Any other comments?

Since Mike mentions the 2.6.18-rc4 patches I guess he's referring to my
latest AT91 patch:
   http://maxim.org.za/AT91RM9200/2.6/

That includes the updated I2C driver that *should* match the flowcharts
in the datasheet.  Since I actually have a working I2C interface on my
board, the change hasn't actually been tested though.


Regards,
  Andrew Victor





More information about the i2c mailing list