Hi all,
I'm using the default Low Power Listening from the Blip stack
(tinyos-2.1.1) and I've measured the CC2420 active period while it
senses the channel and no signal is in the air.
According with my osciloscope, the cc2420 reads the CCA pin for
approximately 6 msec if there is no signal on the radio.
In my module I have recently added an async event called
"infolowlayer" that get data from the cc2420 (provided by IPDispatchP).
I have also added a task, called "info", which process data get by the
async event "infolowlayer". The task "info" is periodically posted by
a timer so event and task have access to the same variables.
I don't have errors and the application seems to work fine at the
beginning but using this event and the task CC2420 active period is
always about 100msec.
I tried to declare variables using "norace" and accessing to the
shared variables by atomic block but still I cannot understand what is
the problem.
Please, could you give me a suggestion?
follows the important part of the code
Many thanks
Davide
Research Engineer
NIMBUS - Networked Embedded Systems Research Centre
Cork Institute of Technology
Rossa Avenue, Bishopstown
Cork, Ireland
/ / - - -
norace uint_8 tmprssi;
norace uint_8 tmplqi;
task info()
{
atomic {
myrssi = tmprssi;
mylqi = tmplqi;
}
}
event void Timer.fired()
{
post info();
}
async event voild InfoLowLayer.infolowlayer (uint_8 rssi, uint_8 lqi)
{
atomic {
tmprssi = rssi;
tmplqi = lqi;
}
}
_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help