From 9e03df6cb75365732315372571b80187d8302177 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Th=C3=A9baudeau?= Date: Thu, 11 Aug 2016 23:49:03 +0200 Subject: [PATCH] CC2538: Use the 32.768-kHz crystal if present MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Enable the 32.768-kHz crystal on all the CC2538 platforms where it is present in order to get a better time accuracy. Signed-off-by: Benoît Thébaudeau --- platform/cc2538dk/contiki-conf.h | 10 ++++++++++ platform/openmote-cc2538/contiki-conf.h | 11 ++++++++++- platform/zoul/contiki-conf.h | 11 ++++++++++- 3 files changed, 30 insertions(+), 2 deletions(-) diff --git a/platform/cc2538dk/contiki-conf.h b/platform/cc2538dk/contiki-conf.h index d1a10811f..64179b983 100644 --- a/platform/cc2538dk/contiki-conf.h +++ b/platform/cc2538dk/contiki-conf.h @@ -64,6 +64,16 @@ typedef uint32_t rtimer_clock_t; #endif /** @} */ /*---------------------------------------------------------------------------*/ +/** + * \name CC2538 System Control configuration + * + * @{ + */ +#ifndef SYS_CTRL_CONF_OSC32K_USE_XTAL +#define SYS_CTRL_CONF_OSC32K_USE_XTAL 1 /**< Use the on-board 32.768-kHz crystal */ +#endif +/** @} */ +/*---------------------------------------------------------------------------*/ /** * \name Watchdog Timer configuration * diff --git a/platform/openmote-cc2538/contiki-conf.h b/platform/openmote-cc2538/contiki-conf.h index 543d3a5e5..90cc6d648 100644 --- a/platform/openmote-cc2538/contiki-conf.h +++ b/platform/openmote-cc2538/contiki-conf.h @@ -102,7 +102,16 @@ typedef uint32_t rtimer_clock_t; #define FLASH_CCA_CONF_BOOTLDR_BACKDOOR_ACTIVE_HIGH 0 /**< A logic low level activates the boot loader */ #endif /** @} */ - +/*---------------------------------------------------------------------------*/ +/** + * \name CC2538 System Control configuration + * + * @{ + */ +#ifndef SYS_CTRL_CONF_OSC32K_USE_XTAL +#define SYS_CTRL_CONF_OSC32K_USE_XTAL 1 /**< Use the on-board 32.768-kHz crystal */ +#endif +/** @} */ /*---------------------------------------------------------------------------*/ /** * \name CFS configuration diff --git a/platform/zoul/contiki-conf.h b/platform/zoul/contiki-conf.h index 6bdae897a..bf9754730 100644 --- a/platform/zoul/contiki-conf.h +++ b/platform/zoul/contiki-conf.h @@ -100,7 +100,16 @@ typedef uint32_t rtimer_clock_t; #define FLASH_CCA_CONF_BOOTLDR_BACKDOOR_ACTIVE_HIGH 0 /**< A logic low level activates the boot loader */ #endif /** @} */ - +/*---------------------------------------------------------------------------*/ +/** + * \name CC2538 System Control configuration + * + * @{ + */ +#ifndef SYS_CTRL_CONF_OSC32K_USE_XTAL +#define SYS_CTRL_CONF_OSC32K_USE_XTAL 1 /**< Use the on-board 32.768-kHz crystal */ +#endif +/** @} */ /*---------------------------------------------------------------------------*/ /** * \name CFS configuration