[Tinyos-host-mote-wg] Re: [Tinyos-2.0wg] Power Management

Philip Levis pal at cs.stanford.edu
Sat Oct 1 14:11:55 PDT 2005


On Oct 1, 2005, at 1:46 PM, mturon at xbow.com wrote:

> Hi Phil,
>
> Yes, I meant the MCU will need to be in ACTIVE state for a UART  
> operation to
> be initiated.  Additionally, the CPU can not drop below IDLE while  
> the byte
> is being transferred (middle of split phase until done event  
> signaled).
>
> I agree with you that the actual management of external UART  
> devices most
> logically belongs in the specific device driver.  Such a driver would
> require IDLE as a minimum MCU sleep state using the tep112  
> mechanism during
> the entire split-phase interaction of each byte operation.
>
> How the UART RX case is handled requires more thought.  On the  
> ATmega128,
> you might be able to turn the UART into external interrupt pins,  
> and wake up
> the processor, but I doubt you could get the start of the message  
> correctly.
>
> The application components we talked about before that timeout and  
> "spin
> down" a device would solve these problems, but not at a very fine- 
> grain.
>
> So to summarize some of the issues:
>
> - UART TX case: not handled properly with tinyos-1.x power management.
>     We should define how we want this to work in tinyos-2.x.

This is pretty simple. If UCSRnB.TXENn is set, then you do not drop  
below IDLE.

The UART driver only sets UCSRnB.TXENn when it is sending data.


>
> - UART RX case: power management must be disabled currently.
>     Designing a way to make this possible generically would be nice.
>     We should define how the app writer does this in tinyos-2.x

This is also pretty simple. On current atm128 platforms, if  
UCSRnB.RXENn is set, then you do not drop below IDLE. Of course, this  
means that for very low-power operation, you need to call  
SerialC.StdControl.stop(), and we should make sure such mechanisms  
exist (I do not believe that the current serial stack supports this).  
When the UART subsystem is started, RXEN is set and the necessary  
pins are set. When it is stopped, RXEN is cleared, TXEN is cleared,  
pins are cleared, and subsequent requests to transmit return EOFF.

Phil



_______________________________________________
Tinyos-2.0wg mailing list
Tinyos-2.0wg at Mail.Millennium.Berkeley.EDU
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-2.0wg


More information about the Tinyos-host-mote-wg mailing list