Hi,

On Wed, Feb 18, 2009 at 1:39 PM, Para Lee <[email protected]> wrote:
> Thanks Miklos,
>
>     Now we've found that initRadio function run only once.
>
>     We've also done a simple experiment as follows.
>     We deleted the annotation "@exactlyonce()" before interface PlatformInit
> & SoftwareInit, in file /tos/chips/rf230/RF230LayerP, Line37&38. Then put
> the SoftwareInit.init() into a cycle, in file /tos/system/origin/RealMainP,
> Line75. We do this just want to see if we delete the keyword "exactlyonce",
> can the function initRadio() run many times. But the result seem didn't.

exactlyonce is just documentation and says that interface should be
connected to exactly one module.

>     So if we must restart RF230 in a application program, what should we do?

Why do you want to restart it? The RF230 is initialized once with the
radioInit. Do you disconnect the RF230 from power? You need to do your
stuff in the RadioState.turnOff or turnOn (that is what gets called by
the SplitControl). Bet there the SPI is not yetr acquired, so most
likely you need to do your extra stuff in the changeState function
which executes the turnOn/Off commands.

Miklos

>
> 2009/2/18 Miklos Maroti <[email protected]>
>>
>> Hi Para,
>>
>> initRadio is called only once at power up. SplitControl stop/start
>> puts the radio into sleep mode (lowest power) or active mode.
>>
>> Miklos
>>
>> 2009/2/18 Para Lee <[email protected]>:
>> > Hi all,
>> >
>> >
>> >
>> > We want to restart the RF230 when program is running, and we use a timer
>> > to
>> > control it. When the timer fired, we stop the RF230 by SplitControl
>> > interface and then restart it. To observe it easily, we also put some
>> > Leds
>> > in \tinyos-2.x\tos\chips\rf230\RF230LayerP, initRadio(). In my opinion,
>> > when
>> > the RF230 restart, it will run initRadio() and the Leds will toggle.
>> > Unfortunately, we didn't see any leds toggle.
>> >
>> > So is there anybody could tell me how to solve this problem?
>> >
>> > Many THX!
>> >
>> > _______________________________________________
>> > Tinyos-help mailing list
>> > [email protected]
>> > https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
>> >
>
>
_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to