On 05/03/2008, jiwen zhang <[EMAIL PROTECTED]> wrote:

> Hello all:
>    In the sensor network,we have to make nodes go into sleep mode in order
> to save power. In tinyos2.x, i want to know whether it is done by
> operation system or not? can we make it go into sleep mode by hand and how?
>

The McuSleep.sleep() interface is called by the scheduler to calculate the
power level the microcontroller should go on if there is no task to run in
the runqueue.

This interface is provided by the microcontroller implementation (e.x.
tos/chips/atm128/* ) and the actual state to go on is determined by the
state of the mote (f.e. radio is on or not, a timer firing time is near,
etc). The code is quite self explanatory about that.

The actual powerstate to go to is calculated combining the value the MCU
calculates and the result of McuPowerOverride.lowerState() and taking the
best state which satisfies both the constraints. This interface is provided
to components so that they can "pass" some information to the MCU that it
might ignore and force it to take it in account.

Lastly, a components can call McuPower.update() to communicate to the MCU
that it wants power state recalculated.

You can find way more information inside TEP 112.




>   when a node has gone into sleep mode, is  the timer  working ? because i
> want the node wake up in a fixed time,so i use the timer to realize that.
>

Absolutely.
And actually (on the ATM128) depending on when the timer will fire the MCU
may choose a different power state (different powerstates have different
wake-up time)

Cheers

            -  Enrico




>   thank you very much!!
>
> _______________________________________________
> 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