It seems to be the only difference! I only have another task that call the UDP send (I removed all the others debugging).
I slightly modified IPDispatchP in order to provide the InfoLowLayer interface and signal the event. Only "task info()" and event "InfoLowLayer.infolowlayer" have access to "tmprssi" and "tmplqi". Removing "task info()" the active period is about 6msec again so I think that my modifications on IPDispatchP are not responsible for the problem. I made the event "InfoLowLayer.infolowlayer" synchronous and the application shows the same behavior. I'm wondering if I can have better chance reading "tmprssi" and "tmplqi" in the task that send UDP packet. As far as I know the radiochip cannot be in sending and receiving status at same time and the event "InfoLowLayer.infolowlayer" is signaled only when I received a packet. By the way, I have just realized that if I add the component "UDPShellC" to my application that works fine (6msec) the Active period became 100msec Any suggestion is more than welcome Davide On 17/set/10, at 22:37, Stephen Dawson-Haggerty wrote: > None of that looks like it should cause a problem. Do you have any > other long tasks running? The LPL layer is not robust to long-running > tasks since it uses tasks to put the radio to sleep, so I have had > problems in the past with background processing getting in the way. > However I would look closely at what could be delaying the radio task > -- is this really the only difference? > > On Fri, Sep 17, 2010 at 1:06 PM, TheMrOrange <[email protected]> > wrote: >> 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; >> } >> } >> > > > > -- > stephen dawson-haggerty > http://cs.berkeley.edu/~stevedh > uc berkeley wireless and embedded systems lab > berkeley, ca 94720 _______________________________________________ Tinyos-help mailing list [email protected] https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
