[En-Nut-Discussion] Nut/OS 5.0 AT91 TWI RTC

Harald Kipp harald.kipp at egnite.de
Thu Jun 7 12:23:41 CEST 2012

Hi Ole,

On 06.06.2012 18:29, Ole Reinhardt wrote: 
> Yes, I'm using the driver on our eNet-sam7X board without any problems.

May have worked by accident only. The problem is, that sending followed by receiving via NutTwiMasterTranceive() will not work. After sending the transmit data, no STOP/START conditions is set to continue with receiving. Note, that TWI_TXCOMP will be set _after_ all bytes had been _received_. So the calling thread is trapped in NutEventWait. Looks to me, that r2620 broke it.

Someone (you?) added the comment

// TODO: Mustn't this be NutEventWaitNext() ??

May be, somewhere here is the reason, that it may work when using NutEventWait() with an already signaled queue. The commentator may have recognized the same problem when changing this to NutEventWaitNext().

> I tried it at least with the 4.10 release.

Same problem with 4.10.



More information about the En-Nut-Discussion mailing list