diff options
author | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2010-12-05 11:47:18 +0000 |
---|---|---|
committer | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2010-12-05 11:47:18 +0000 |
commit | f650ce36c1566f76604a7483bce91ca0d508456f (patch) | |
tree | a78d718b6c23bb19ad4155441363d1b9b49bbf6d | |
parent | 56ce4d958caf7f5850a14f31a6a23f7676f3d4a3 (diff) | |
download | ChibiOS-f650ce36c1566f76604a7483bce91ca0d508456f.tar.gz ChibiOS-f650ce36c1566f76604a7483bce91ca0d508456f.tar.bz2 ChibiOS-f650ce36c1566f76604a7483bce91ca0d508456f.zip |
Better mcuconf.h file for LPC11xx.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@2459 35acf78f-673a-0410-8e92-d51de3d6d3f4
-rw-r--r-- | demos/ARMCM0-LPC1114-GCC/mcuconf.h | 17 | ||||
-rw-r--r-- | os/hal/platforms/LPC11xx/hal_lld.h | 10 |
2 files changed, 22 insertions, 5 deletions
diff --git a/demos/ARMCM0-LPC1114-GCC/mcuconf.h b/demos/ARMCM0-LPC1114-GCC/mcuconf.h index abab32579..aafb2901d 100644 --- a/demos/ARMCM0-LPC1114-GCC/mcuconf.h +++ b/demos/ARMCM0-LPC1114-GCC/mcuconf.h @@ -31,6 +31,11 @@ /*
* HAL driver system settings.
*/
+#define LPC11xx_PLLCLK_SOURCE SYSPLLCLKSEL_SYSOSC
+#define LPC11xx_SYSPLL_MUL 4
+#define LPC11xx_SYSPLL_DIV 4
+#define LPC11xx_MAINCLK_SOURCE SYSMAINCLKSEL_PLLOUT
+#define LPC11xx_SYSABHCLK_DIV 1
/*
* ADC driver system settings.
@@ -47,7 +52,19 @@ /*
* SERIAL driver system settings.
*/
+#define LPC11xx_SERIAL_USE_UART0 TRUE
+#define LPC11xx_SERIAL_FIFO_PRELOAD 16
+#define LPC11xx_SERIAL_UART0CLKDIV 1
+#define LPC11xx_SERIAL_UART0_IRQ_PRIORITY 3
/*
* SPI driver system settings.
*/
+#define LPC11xx_SPI_USE_SSP0 TRUE
+#define LPC11xx_SPI_USE_SSP1 FALSE
+#define LPC11xx_SPI_SSP0CLKDIV 1
+#define LPC11xx_SPI_SSP1CLKDIV 1
+#define LPC11xx_SPI_SSP0_IRQ_PRIORITY 1
+#define LPC11xx_SPI_SSP1_IRQ_PRIORITY 1
+#define LPC11xx_SPI_SSP_ERROR_HOOK(spip) chSysHalt()
+#define LPC11xx_SPI_SCK0_SELECTOR SCK0_IS_PIO2_11
diff --git a/os/hal/platforms/LPC11xx/hal_lld.h b/os/hal/platforms/LPC11xx/hal_lld.h index 718e9457a..1d9941ba3 100644 --- a/os/hal/platforms/LPC11xx/hal_lld.h +++ b/os/hal/platforms/LPC11xx/hal_lld.h @@ -61,7 +61,7 @@ * @brief System PLL clock source.
*/
#if !defined(LPC11xx_PLLCLK_SOURCE) || defined(__DOXYGEN__)
-#define LPC11xx_PLLCLK_SOURCE SYSPLLCLKSEL_SYSOSC
+#define LPC11xx_PLLCLK_SOURCE SYSPLLCLKSEL_SYSOSC
#endif
/**
@@ -70,7 +70,7 @@ * must not exceed the CCO ratings.
*/
#if !defined(LPC11xx_SYSPLL_MUL) || defined(__DOXYGEN__)
-#define LPC11xx_SYSPLL_MUL 4
+#define LPC11xx_SYSPLL_MUL 4
#endif
/**
@@ -78,14 +78,14 @@ * @note The value must be chosen between (2, 4, 8, 16).
*/
#if !defined(LPC11xx_SYSPLL_DIV) || defined(__DOXYGEN__)
-#define LPC11xx_SYSPLL_DIV 4
+#define LPC11xx_SYSPLL_DIV 4
#endif
/**
* @brief System main clock source.
*/
#if !defined(LPC11xx_MAINCLK_SOURCE) || defined(__DOXYGEN__)
-#define LPC11xx_MAINCLK_SOURCE SYSMAINCLKSEL_PLLOUT
+#define LPC11xx_MAINCLK_SOURCE SYSMAINCLKSEL_PLLOUT
#endif
/**
@@ -93,7 +93,7 @@ * @note The value must be chosen between (1...255).
*/
#if !defined(LPC11xx_SYSCLK_DIV) || defined(__DOXYGEN__)
-#define LPC11xx_SYSABHCLK_DIV 1
+#define LPC11xx_SYSABHCLK_DIV 1
#endif
/*===========================================================================*/
|