|
From: Borms, J. <jb...@et...> - 2010-10-12 14:08:15
|
Hello Bruno,
Just to avoid ambiguity: there is a slight difference between "putting a node to sleep" and putting the MSP430 in LPM3. In general the first means that you put the radio off, stop all processing (and all sensing jobs that require processing) and put the CPU to sleep. Putting the MSP430 in LPM3 is just the last part of this series i.e. putting the CPU to sleep.
That said, you do not need to actively put the CPU to sleep. For the sky platform (TelosB, Tmote Sky, JCreate) the Contiki main method is written in such a way that whenever there is no processing to be done, the CPU is automatically put in LPM3.
If you look at platform/sky/contiki-sky-main.c the main method (schematically) looks a bit like this:
int
main(int argc, char **argv)
{
... lots and lots of initialization ...
while (1) {
... check if we need to run any processes ...
... put node in LPM3 and block here until woken up by interrupt (external or periodic) ...
}
}
Regards,
Joris
From: Bruno Filipe Marques [mailto:bm...@es...]
Sent: Tuesday, October 12, 2010 3:04 PM
To: Contiki developer mailing list
Subject: [Contiki-developers] How to put TelosB in LPM0/LPM1/LPM2/LPM3 modes ?
Hi list,
By reading TelosB and MSP430F1611 Datasheets I understood that TelosB could be put e 4 Low Power Modes (LPM0, LPM1, LPM2, and LPM3).
My issue is how to do I put a node in those modes. It should be trivial to some, but not for me.
So, can anyone of you help me, and tell me what code must I use in order to ?
Regards,
/bruno
------------------------------------------------------------
Bruno Filipe Marques,
MsC in Electrical and Computer Engineering
FCT PhD Schollarship (SFRH/BD/36221/2007)
PhD Student @ DEEC/FEUP
WiN, Wireless Networks
UTM, INESC Porto,
http://win.inescporto.pt/
Electrical Engineering Department
School of Technology and Management
Polytechnic Institute of Viseu,
Portugal
url: http://www.estv.ipv.pt/paginaspessoais/bmarq/
e-mail: bm...@es...
MSN: bm...@ip...
Skype: bmarq2k5
Facebook: http://www.facebook.com/bmarq
Twitter: http://twitter.com/bmarq2k9
|