From ac172a5575a1527d81e8602086d26dfac9671fbc Mon Sep 17 00:00:00 2001
From: adamdunkels <adamdunkels>
Date: Mon, 29 Mar 2010 21:53:32 +0000
Subject: [PATCH] Turn off LPM mode for clock interrupts to avoid rtimer
 wrapping during extended LPM

---
 cpu/msp430/clock.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/cpu/msp430/clock.c b/cpu/msp430/clock.c
index 30406187f..b1825808b 100644
--- a/cpu/msp430/clock.c
+++ b/cpu/msp430/clock.c
@@ -28,7 +28,7 @@
  *
  * This file is part of the Contiki operating system.
  *
- * @(#)$Id: clock.c,v 1.23 2010/03/19 13:25:52 adamdunkels Exp $
+ * @(#)$Id: clock.c,v 1.24 2010/03/29 21:53:32 adamdunkels Exp $
  */
 
 
@@ -53,6 +53,7 @@ static volatile clock_time_t count = 0;
 static unsigned short last_tar = 0;
 /*---------------------------------------------------------------------------*/
 interrupt(TIMERA1_VECTOR) timera1 (void) {
+  ENERGEST_OFF(ENERGEST_TYPE_LPM);
   ENERGEST_ON(ENERGEST_TYPE_IRQ);
 
   if(TAIV == 2) {
@@ -95,6 +96,7 @@ interrupt(TIMERA1_VECTOR) timera1 (void) {
     }*/
     
   ENERGEST_OFF(ENERGEST_TYPE_IRQ);
+  ENERGEST_ON(ENERGEST_TYPE_LPM);
 }
 /*---------------------------------------------------------------------------*/
 clock_time_t