[En-Nut-Discussion] Another Uart Driver observation

Mike Cornelius mikec at call-direct.com.au
Thu Dec 11 00:58:10 CET 2003


Since everyone is talking about the UART driver I thought I'lld throw an
observation into the mix (hopefully not too late).

I've noticed that with a 7.3728Mhz crystal the UART RX ISR and
RxComplete can take around 100us to complete if the buffer is empty
(NutEventPostAsync is called) whilst if the buffer is not empty it takes
about 22us.

When running at 115200 on a single UART (half duplex) we can expect an
interrupt every 86us and everything is more or less OK (although I think
the 100us is too long regardless).
When you add the second UART into the picture plus transmit interrupts
things start to look a little less comfortable time-wise.

A Little bit of further testing confirms that NutEventPostAsync takes
about 83us when it is called from either TX or RX ISR (and probably
anywhere else for that matter).

Of course this is only a problem if NutEventPostAsync is called in
response to 2 different events occuring at approximatly the same time
which doesn't happen often.

It seems to me that this could be improved, although I've not yet looked
into how to go about it.

Any Comments?

Mike Cornelius




More information about the En-Nut-Discussion mailing list