[En-Nut-Discussion] TWI interrupts on AT91SAM7x256 and Ethernut 4.6.5/4.8.0

Ole Reinhardt ole.reinhardt at embedded-it.de
Tue Mar 31 23:34:12 CEST 2009


Hi Harald,

> So far I'd consider this code broken. A severe bug is in TwMasterTransact:
> 
>  NutEnterCritical();
> ...
>  if ((tw_mt_len == 0) && (tw_mr_siz == 0)) return -1;
> ...
>  NutExitCritical();
> 
> Interrupts should be enabled again before returning -1.
> 
> So far I spent some time on this and never saw any TWI interrupt
> occurring. For now I'll switch back to bit-banging.

Ok, I had it just running with a client, but the above bug is realy a
bug :)

I'll test it here any further if I get a I2C device connected to my
olimex board. Until then you might add a hint to the configurator option
not to use this code right now...

Bye,

Ole

-- 
 _____________________________________________________________
|                                                             |
| Embedded-IT          Hard- und Softwarelösungen             |
|                                                             |
| Ole Reinhardt        Tel. / Fax:        +49 (0)271  7420433 |
| Luisenstraße 29      Mobil:             +49 (0)177  7420433 |
| 57076 Siegen         eMail:    ole.reinhardt at embedded-it.de |
| Germany              Web:         http://www.embedded-it.de |
|                      UstID / VAT:       DE198944716         |
|_____________________________________________________________|




More information about the En-Nut-Discussion mailing list