Hi Ashwin, > Actually I havn't replaced timer. Here is diff for working case. > > diff --git a/atomthreads/kernel/atomtimer.c b/atomthreads/kernel/atomtimer.c > index 3693295..91eb053 100755 > --- a/atomthreads/kernel/atomtimer.c > +++ b/atomthreads/kernel/atomtimer.c > @@ -68,7 +68,7 @@ > > > #include "atom.h" > > /* Data types */ > > @@ -299,7 +299,7 @@ void atomTimerTick (void) > { > /* Increment the system tick count */ > system_ticks++; > - > + atomSched(TRUE); > /* Check for any callbacks that are due */ > atomTimerCallbacks (); > }
The scheduler is already called in atomIntExit() after the timer ISR occurs, and it will not be safe to add the extra call there. If you would like to send me off-list your changes to the standard AVR port then I could review them for potential problems. Thanks, Kelvin.