From 04cdae05c31e659ee779c745b822da7b883fd23c Mon Sep 17 00:00:00 2001 From: adamdunkels Date: Fri, 19 Mar 2010 13:25:52 +0000 Subject: [PATCH] Increased the rtimer granularity: needed to make contikimac work --- cpu/msp430/clock.c | 6 +++--- cpu/msp430/rtimer-arch.h | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/cpu/msp430/clock.c b/cpu/msp430/clock.c index 95740823c..30406187f 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.22 2010/02/23 18:41:20 adamdunkels Exp $ + * @(#)$Id: clock.c,v 1.23 2010/03/19 13:25:52 adamdunkels Exp $ */ @@ -140,8 +140,8 @@ clock_init(void) /* Select SMCLK (2.4576MHz), clear TAR */ /* TACTL = TASSEL1 | TACLR | ID_3; */ - /* Select ACLK 32768Hz clock, divide by 4 */ - TACTL = TASSEL0 | TACLR | ID_2; + /* Select ACLK 32768Hz clock, divide by 2 */ + TACTL = TASSEL0 | TACLR | ID_1; /* 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 ec51cc658..ac21cc414 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.6 2009/12/09 12:55:35 adamdunkels Exp $ + * $Id: rtimer-arch.h,v 1.7 2010/03/19 13:25:52 adamdunkels Exp $ */ /** @@ -44,7 +44,7 @@ #include #include "sys/rtimer.h" -#define RTIMER_ARCH_SECOND (4096U*2) +#define RTIMER_ARCH_SECOND (4096U*4) #define rtimer_arch_now() (TAR)