Increased the clock speed to 32768/4 from 32768/8 to provide better accuracy for power profiling of radio CCA checks
This commit is contained in:
parent
eff2203310
commit
9ac4109bad
|
@ -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. */
|
||||
|
|
|
@ -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 <io.h>
|
||||
#include "sys/rtimer.h"
|
||||
|
||||
#define RTIMER_ARCH_SECOND 4096
|
||||
#define RTIMER_ARCH_SECOND (4096U*2)
|
||||
|
||||
#define rtimer_arch_now() (TAR)
|
||||
|
||||
|
|
Loading…
Reference in a new issue