[En-Nut-Discussion] Proposal: Extending the USART(AVR) driver to support DMA-style read functionality

Matthias Ringwald mringwal at inf.ethz.ch
Tue Apr 13 10:44:05 CEST 2004


hi clemens

thanks for your comment.


On 13.04.2004, at 07:23, Clemens Kirchgatterer wrote:

>> for every received byte, the thread would wake up,
>> get its one byte, figure out that the packet is not finished
>> call read and be put to sleep again.
>>
>> it should be clear that this is not very efficient... :)
>
> you will only receive just one byte under low load and then it just 
> does
> not matter if there are some cycles wasted fo each iteration. this is
> the way it is under posix also. sounds like "premature optimization" to
> me. ;-)

ok, that one is correct.

what about my other case: the thread that processes the uart packets has
a high priority but there are other tasks, too?
then every byte will be received seperately leaving no time to lower 
priority
threads.

I do see, that the question would be if the uart thread should have the 
highest
priority..

matthias




More information about the En-Nut-Discussion mailing list