Hi Martin,

> Thanks for all the quick replies. Just compiling the base station with
> TASKLET_IS_TASK allows the application to run at least for over half an
> hour! (Although I will add it to the other applications if that is best.)
> Is there some sort of race condition? Could you explain what this
> flag exactly does?

I think you need this only for the base station. The RF230 stack can
be configured to run either in interrupt or task context with the
tasklet framework. If you define TASKLET_IS_TASK then every tasklet is
run as a task, otherwise tasklets are run just before returning
control from the radio/timer interrupts.

If the RF230 stack is run in interrupt context, then it can guarantee
acknowledgements in 250 microseconds (and it can stream full packets
between two nodes where each node sends 150 packets per second to the
other node and each packet is acknowledged). However this disables
other interrupts (UART) for some time, which is why the basestation
hangs. I am not sure where the problem is, in the UART or the PC side,
or in fact if the UART code can function if interrupts are disabled
for up to 300 microseconds.

When you run tasklets as tasks, then the radio stack does not disable
interrupts longer than 2-3 microseconds (practically nothing more than
a few instructions needs to be protected by atomic contexts).

Miklos
_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to