[En-Nut-Discussion] Critical Sections in Nut/OS

Matthias Ringwald mringwal at inf.ethz.ch
Wed Jan 19 17:29:27 CET 2005


hi all

during some debugging, we took a closer look at the various critical 
sections in Nut/OS.
thanks also to a hint on this list, we found several very (unnecessary) 
long critical sections,
which can lead to such effects like loosing bytes on the uart.

the conversion from ms to ticks on systems with 32 khz clock in 
NutTimerStart alone takes
150 microseconds on our 7 Mhz Atmel and is inside a critical section.
Also other critical sections can be shortened.

We will fix this soon in the CVS. First tests show, that we're able to 
use Bluetooth
now with 115200 instead of 57600..

A bigger issue is the fact, that NutEventPostAsync can take quite a 
while (here ~ 40 uS)
and is called from within interrupt context. So a deferred handling of 
this call should yield quite some
improvements on interrupt times.

we'll keep you posted,

Philipp Blum & Matthias Ringwald




More information about the En-Nut-Discussion mailing list