diff --git a/cpu/msp430/rtimer-arch.c b/cpu/msp430/rtimer-arch.c index ff3a8742b..d56d128c0 100644 --- a/cpu/msp430/rtimer-arch.c +++ b/cpu/msp430/rtimer-arch.c @@ -28,7 +28,7 @@ * * This file is part of the Contiki operating system. * - * $Id: rtimer-arch.c,v 1.15 2010/09/13 20:51:09 nifi Exp $ + * $Id: rtimer-arch.c,v 1.16 2010/11/25 09:22:56 adamdunkels Exp $ */ /** @@ -57,11 +57,16 @@ interrupt(TIMERA0_VECTOR) timera0 (void) { ENERGEST_ON(ENERGEST_TYPE_IRQ); + watchdog_start(); + rtimer_run_next(); + if(process_nevents() > 0) { LPM4_EXIT; } + watchdog_stop(); + ENERGEST_OFF(ENERGEST_TYPE_IRQ); } /*---------------------------------------------------------------------------*/ @@ -93,8 +98,6 @@ rtimer_arch_schedule(rtimer_clock_t t) { PRINTF("rtimer_arch_schedule time %u\n", t); - TACTL &= ~MC1; TACCR0 = t; - TACTL |= MC1; } /*---------------------------------------------------------------------------*/