In tos2, the idle loop can put the uC to sleep, where no code is executed and 
power consumption is reduced.  After the boot procedure is complete,            
     RealMainP.nc's main() forever cycles through tasks by  calling 
SchedulerP.taskLoop(), which looks like this:

  command void Scheduler.taskLoop()
  {
    for (;;)
    {
      uint8_t nextTask;

      atomic
      {
        while ((nextTask = popTask()) == NO_TASK)
        {
          call McuSleep.sleep();
        }
      }
      signal TaskBasic.runTask[nextTask]();
    }
  }

For the msp430, atm128 and pxa27x architectures, McuSleep.sleep() can power 
down the uC to various levels supported by the uC and allowed by the current 
state of the various peripherals, etc.  This can result in a significant energy 
savings.  For example, the msp430f1611 consumes about 2.5mA at 4MHz and 2.2v, 
but can sleep in LPM3 at 1-2 *uA*.

This is documented in:
tasks/scheduler - http://www.tinyos.net/tinyos-2.x/doc/html/tep106.html
uC pwr mgmt - http://www.tinyos.net/tinyos-2.x/doc/html/tep112.html

Steve

On Wednesday 14 February 2007 00:35, Michael Schippling wrote:
> wellllllll.....not exactly......
>
> If you look at RealMain.nc you will find:
>
>   while(1) {
>         TOSH_run_task();
>      }
>
> which seems to boil down to while(TOSH_run_next_task()) in sched.c
> which loops on a task queue waiting for stuff to do...
>
> So not really nothing, and not really an idle() process,
> but good enough I guess.
>
> MS
>
> Tarun Bansal wrote:
> > Nothing gets executed...There is nothing like background idle process
> > running continuously. So the node wont do anything except listening at
> > the radio.
> >
> > Tarun
> > http://bansal.tarun.googlepages.com/
> >
> > On 2/14/07, Aditya Bhave <[EMAIL PROTECTED]> wrote:
> >> Hello,
> >>
> >> SO suppose both of my init's and start's do some variable setting and
> >> return
> >> SUCCESS.
> >> What code gets exceuted next?
> >>
> >> In my application, my mote does something only when it receives the
> >> first packet over the radio. SO my start and init just set some state
> >> variables and then I wait for ReceiveMsg.receive to be called.
> >>
> >> While my mote is waiting, what code gets exceuted on the processor. Is
> >> there
> >> some system idle process that gets executed and if so, where and what
> >> is the
> >> name of the corresponding component?
> >>
> >> Thanks for your help
> >>
> >> On 2/13/07, Philip Levis <[EMAIL PROTECTED]> wrote:
> >> > On Feb 13, 2007, at 1:01 PM, Ankur Kamthe wrote:
> >> > > Read this
> >>
> >> http://www.tinyos.net/tinyos-2.x/doc/html/tep107.html for
> >>
> >> > > more details
> >> > > But from what I gather, its initialization first then the start
> >> > > routines are called sequentially.
> >> > > So, its init, init, start, start
> >> >
> >> > TEP 107 is about TinyOS 2.x, not 1.x.
> >> >
> >> > But your conclusion is correct. A fan-out does not make calls in
> >> > parallel (it can't, given there is a single thread of execution); it
> >> > calls each one in an unspecified order.
> >> >
> >> > Phil
> >> > _______________________________________________
> >> > Tinyos-help mailing list
> >> > [email protected]
> >>
> >> https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-hel
> >>p
> >>
> >>
> >>
> >>
> >> --
> >> regards,
> >> Aditya Bhave
> >> _______________________________________________
> >> Tinyos-help mailing list
> >> [email protected]
> >> https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-hel
> >>p
> >
> > _______________________________________________
> > Tinyos-help mailing list
> > [email protected]
> > https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
>
> _______________________________________________
> Tinyos-help mailing list
> [email protected]
> https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
>
> !DSPAM:45d3173a282122362839998!
_______________________________________________
Tinyos-help mailing list
[email protected]
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to