mbed library sources

Fork of mbed-src by mbed official

Files at this revision

API Documentation at this revision

Comitter:
mbed_official
Date:
Mon Mar 24 10:45:07 2014 +0000
Parent:
131:5619d5c0521f
Child:
133:d4dda5c437f0
Commit message:
Synchronized with git revision e8dcecba1be9354a028e4f2e5432a551cd26dc71

Full URL: https://github.com/mbedmicro/mbed/commit/e8dcecba1be9354a028e4f2e5432a551cd26dc71/

Update system_LPC8xx.c

Changed in this revision

targets/cmsis/TARGET_NXP/TARGET_LPC81X/TARGET_LPC812/system_LPC8xx.c Show annotated file Show diff for this revision Revisions of this file
--- a/targets/cmsis/TARGET_NXP/TARGET_LPC81X/TARGET_LPC812/system_LPC8xx.c	Fri Mar 21 14:00:07 2014 +0000
+++ b/targets/cmsis/TARGET_NXP/TARGET_LPC81X/TARGET_LPC812/system_LPC8xx.c	Mon Mar 24 10:45:07 2014 +0000
@@ -100,13 +100,23 @@
 //   </h>
 // </e>
 */
-#define CLOCK_SETUP           1
-#define SYSOSCCTRL_Val        0x00000000              // Reset: 0x000
-#define WDTOSCCTRL_Val        0x00000000              // Reset: 0x000
-#define SYSPLLCTRL_Val        0x00000041              // Reset: 0x000
-#define SYSPLLCLKSEL_Val      0x00000000              // Reset: 0x000
-#define MAINCLKSEL_Val        0x00000000              // Reset: 0x000
-#define SYSAHBCLKDIV_Val      0x00000001              // Reset: 0x001
+#define CLOCK_SETUP     1	// 1 == IRC: 2 == System Oscillator 12Mhz Xtal:
+
+#if (CLOCK_SETUP == 1)
+	#define SYSOSCCTRL_Val        0x00000000              // Reset: 0x000
+	#define WDTOSCCTRL_Val        0x00000000              // Reset: 0x000
+	#define SYSPLLCTRL_Val        0x00000041              // Reset: 0x000
+	#define SYSPLLCLKSEL_Val      0x00000000              // Reset: 0x000
+	#define MAINCLKSEL_Val        0x00000000              // Reset: 0x000
+	#define SYSAHBCLKDIV_Val      0x00000001              // Reset: 0x001
+#elif (CLOCK_SETUP == 2)         
+	#define SYSOSCCTRL_Val        0x00000000              // Reset: 0x000
+	#define WDTOSCCTRL_Val        0x00000000              // Reset: 0x000
+	#define SYSPLLCTRL_Val        0x00000040              // Reset: 0x000
+	#define SYSPLLCLKSEL_Val      0x00000001              // Reset: 0x000
+	#define MAINCLKSEL_Val        0x00000003              // Reset: 0x000
+	#define SYSAHBCLKDIV_Val      0x00000001              // Reset: 0x001
+#endif
 
 /*
 //-------- <<< end of configuration section >>> ------------------------------