[En-Nut-Discussion] Possible Bug in at91_twi handler

Ulrich Prinz uprinz2 at netscape.net
Wed Oct 14 15:30:13 CEST 2009


Hi!

Stumbled accross a possible bug in at91_twi.c:
While exessive usage of an EEPROM somtimes the interface locks up. It is 
_not_ the problem described in the AT91SAM notes as you can retry access 
with success.
The overrun flag in the twi status register is set, so the driver allows 
a new byte to be written into the twi transfer register while this 
register is not taken over to the shift register. A short hack querying 
the status register for txempty before sending the next byte on entry of 
twmastertransact did not solve the problem.

I wonder a bit, as I did massive transfer tests with highest speed 
possible in and out of an EEPROM with parallel access of an I2C port 
expander without any problems. But I cannot find any important 
differences to the older revision where we introduced the new twi driver.

I know, Harald and I rewrote the driver completely so take this as an 
information or if you find and change something, keep us informed.

Best regards,
Ulrich



More information about the En-Nut-Discussion mailing list