diff --git a/cpu/msp430/clock.c b/cpu/msp430/clock.c index 9e2ec6881..23f60854f 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.18 2009/12/08 23:40:14 adamdunkels Exp $ + * @(#)$Id: clock.c,v 1.19 2009/12/09 12:55:35 adamdunkels Exp $ */ @@ -42,8 +42,6 @@ #include "sys/etimer.h" #include "rtimer-arch.h" -/* 38400 cycles @ 2.4576MHz with divisor 8 ==> 1/8 s */ -/* #define INTERVAL (307200ULL / CLOCK_SECOND) */ #define INTERVAL (RTIMER_ARCH_SECOND / CLOCK_SECOND) #define MAX_TICKS (~((clock_time_t)0) / 2) @@ -136,8 +134,8 @@ clock_init(void) /* Select SMCLK (2.4576MHz), clear TAR */ /* TACTL = TASSEL1 | TACLR | ID_3; */ - /* Select ACLK 32768Hz clock, divide by 8 */ - TACTL = TASSEL0 | TACLR | ID_3; + /* Select ACLK 32768Hz clock, divide by 4 */ + TACTL = TASSEL0 | TACLR | ID_2; /* Initialize ccr1 to create the X ms interval. */ /* CCR1 interrupt enabled, interrupt occurs when timer equals CCR1. */ diff --git a/cpu/msp430/rtimer-arch.h b/cpu/msp430/rtimer-arch.h index 8f8daf344..ec51cc658 100644 --- a/cpu/msp430/rtimer-arch.h +++ b/cpu/msp430/rtimer-arch.h @@ -28,7 +28,7 @@ * * This file is part of the Contiki operating system. * - * $Id: rtimer-arch.h,v 1.5 2008/12/02 12:44:48 joxe Exp $ + * $Id: rtimer-arch.h,v 1.6 2009/12/09 12:55:35 adamdunkels Exp $ */ /** @@ -44,7 +44,7 @@ #include #include "sys/rtimer.h" -#define RTIMER_ARCH_SECOND 4096 +#define RTIMER_ARCH_SECOND (4096U*2) #define rtimer_arch_now() (TAR)