mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
boards: add clock configuration for cc2538
This commit is contained in:
parent
8c35335668
commit
5d14104056
@ -30,7 +30,37 @@ extern "C" {
|
||||
* @name Clock system configuration
|
||||
* @{
|
||||
*/
|
||||
#define CLOCK_CORECLOCK (16000000U) /* desired core clock frequency, 16MHz */
|
||||
/*
|
||||
* 0: use internal 32KHz RCOSC
|
||||
* 1: use external 32KHz XOSC
|
||||
*/
|
||||
#ifndef SYS_CTRL_OSC32K_USE_XTAL
|
||||
#define SYS_CTRL_OSC32K_USE_XTAL (1)
|
||||
#endif
|
||||
/*
|
||||
* 0: use internal 16MHz RCOSC
|
||||
* 1: use external 32MHz XOSC, required for RF operation
|
||||
*/
|
||||
#ifndef SYS_CTRL_OSC_USE_XTAL
|
||||
#define SYS_CTRL_OSC_USE_XTAL (1)
|
||||
#endif
|
||||
|
||||
#if SYS_CTRL_OSC_USE_XTAL
|
||||
#define CLOCK_OSC (XOSC32M_FREQ)
|
||||
#else
|
||||
#define CLOCK_OSC (RCOSC16M_FREQ)
|
||||
#endif
|
||||
|
||||
#if SYS_CTRL_OSC32K_USE_XTAL
|
||||
#define CLOCK_OSC32K (XOSC32K_FREQ) /* XCOSC frequency */
|
||||
#else
|
||||
#define CLOCK_OSC32K (RCOSC32K_FREQ) /* XCOSC frequency */
|
||||
#endif
|
||||
|
||||
/* System clock frequency 32MHz */
|
||||
#define CLOCK_CORECLOCK (CLOCK_OSC)
|
||||
/* I/O clock rate setting 16MHz */
|
||||
#define CLOCK_IO (CLOCK_OSC / 2)
|
||||
/** @} */
|
||||
|
||||
/**
|
||||
|
@ -27,10 +27,40 @@ extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @name Clock system configuration
|
||||
* @name Clock system configuration
|
||||
* @{
|
||||
*/
|
||||
#define CLOCK_CORECLOCK (16000000U) /* 16MHz */
|
||||
/*
|
||||
* 0: use internal 32KHz RCOSC
|
||||
* 1: use external 32KHz XOSC
|
||||
*/
|
||||
#ifndef SYS_CTRL_OSC32K_USE_XTAL
|
||||
#define SYS_CTRL_OSC32K_USE_XTAL (1)
|
||||
#endif
|
||||
/*
|
||||
* 0: use internal 16MHz RCOSC
|
||||
* 1: use external 32MHz XOSC, required for RF operation
|
||||
*/
|
||||
#ifndef SYS_CTRL_OSC_USE_XTAL
|
||||
#define SYS_CTRL_OSC_USE_XTAL (1)
|
||||
#endif
|
||||
|
||||
#if SYS_CTRL_OSC_USE_XTAL
|
||||
#define CLOCK_OSC (XOSC32M_FREQ)
|
||||
#else
|
||||
#define CLOCK_OSC (RCOSC16M_FREQ)
|
||||
#endif
|
||||
|
||||
#if SYS_CTRL_OSC32K_USE_XTAL
|
||||
#define CLOCK_OSC32K (XOSC32K_FREQ) /* XCOSC frequency */
|
||||
#else
|
||||
#define CLOCK_OSC32K (RCOSC32K_FREQ) /* XCOSC frequency */
|
||||
#endif
|
||||
|
||||
/* System clock frequency 32MHz */
|
||||
#define CLOCK_CORECLOCK (CLOCK_OSC)
|
||||
/* I/O clock rate setting 16MHz */
|
||||
#define CLOCK_IO (CLOCK_OSC / 2)
|
||||
/** @} */
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
@ -33,7 +33,37 @@
|
||||
* @name Clock system configuration
|
||||
* @{
|
||||
*/
|
||||
#define CLOCK_CORECLOCK (16000000U) /* desired core clock frequency, 16MHz */
|
||||
/*
|
||||
* 0: use internal 32KHz RCOSC
|
||||
* 1: use external 32KHz XOSC
|
||||
*/
|
||||
#ifndef SYS_CTRL_OSC32K_USE_XTAL
|
||||
#define SYS_CTRL_OSC32K_USE_XTAL (1)
|
||||
#endif
|
||||
/*
|
||||
* 0: use internal 16MHz RCOSC
|
||||
* 1: use external 32MHz XOSC, required for RF operation
|
||||
*/
|
||||
#ifndef SYS_CTRL_OSC_USE_XTAL
|
||||
#define SYS_CTRL_OSC_USE_XTAL (1)
|
||||
#endif
|
||||
|
||||
#if SYS_CTRL_OSC_USE_XTAL
|
||||
#define CLOCK_OSC (XOSC32M_FREQ)
|
||||
#else
|
||||
#define CLOCK_OSC (RCOSC16M_FREQ)
|
||||
#endif
|
||||
|
||||
#if SYS_CTRL_OSC32K_USE_XTAL
|
||||
#define CLOCK_OSC32K (XOSC32K_FREQ) /* XCOSC frequency */
|
||||
#else
|
||||
#define CLOCK_OSC32K (RCOSC32K_FREQ) /* XCOSC frequency */
|
||||
#endif
|
||||
|
||||
/* System clock frequency 32MHz */
|
||||
#define CLOCK_CORECLOCK (CLOCK_OSC)
|
||||
/* I/O clock rate setting 16MHz */
|
||||
#define CLOCK_IO (CLOCK_OSC / 2)
|
||||
/** @} */
|
||||
|
||||
/**
|
||||
|
@ -31,9 +31,38 @@
|
||||
* @name Clock system configuration
|
||||
* @{
|
||||
*/
|
||||
#define CLOCK_CORECLOCK (16000000U) /* desired core clock frequency, 16MHz */
|
||||
/** @} */
|
||||
/*
|
||||
* 0: use internal 32KHz RCOSC
|
||||
* 1: use external 32KHz XOSC
|
||||
*/
|
||||
#ifndef SYS_CTRL_OSC32K_USE_XTAL
|
||||
#define SYS_CTRL_OSC32K_USE_XTAL (1)
|
||||
#endif
|
||||
/*
|
||||
* 0: use internal 16MHz RCOSC
|
||||
* 1: use external 32MHz XOSC, required for RF operation
|
||||
*/
|
||||
#ifndef SYS_CTRL_OSC_USE_XTAL
|
||||
#define SYS_CTRL_OSC_USE_XTAL (1)
|
||||
#endif
|
||||
|
||||
#if SYS_CTRL_OSC_USE_XTAL
|
||||
#define CLOCK_OSC (XOSC32M_FREQ)
|
||||
#else
|
||||
#define CLOCK_OSC (RCOSC16M_FREQ)
|
||||
#endif
|
||||
|
||||
#if SYS_CTRL_OSC32K_USE_XTAL
|
||||
#define CLOCK_OSC32K (XOSC32K_FREQ) /* XCOSC frequency */
|
||||
#else
|
||||
#define CLOCK_OSC32K (RCOSC32K_FREQ) /* XCOSC frequency */
|
||||
#endif
|
||||
|
||||
/* System clock frequency 32MHz */
|
||||
#define CLOCK_CORECLOCK (CLOCK_OSC)
|
||||
/* I/O clock rate setting 16MHz */
|
||||
#define CLOCK_IO (CLOCK_OSC / 2)
|
||||
/** @} */
|
||||
/**
|
||||
* @name Timer configuration
|
||||
*
|
||||
|
Loading…
Reference in New Issue
Block a user