]> git.gir.st - tmk_keyboard.git/blob - tmk_core/tool/mbed/mbed-sdk/libraries/mbed/targets/cmsis/TARGET_NXP/TARGET_LPC43XX/system_LPC43xx.h
Merge commit '20b787fc1284176834cbe7ca2134e4b36bec5828'
[tmk_keyboard.git] / tmk_core / tool / mbed / mbed-sdk / libraries / mbed / targets / cmsis / TARGET_NXP / TARGET_LPC43XX / system_LPC43xx.h
1 /*
2 * @brief LPC43xx/LPC18xx mcu header
3 *
4 * Copyright(C) NXP Semiconductors, 2012
5 * All rights reserved.
6 *
7 * Software that is described herein is for illustrative purposes only
8 * which provides customers with programming information regarding the
9 * LPC products. This software is supplied "AS IS" without any warranties of
10 * any kind, and NXP Semiconductors and its licensor disclaim any and
11 * all warranties, express or implied, including all implied warranties of
12 * merchantability, fitness for a particular purpose and non-infringement of
13 * intellectual property rights. NXP Semiconductors assumes no responsibility
14 * or liability for the use of the software, conveys no license or rights under any
15 * patent, copyright, mask work right, or any other intellectual property rights in
16 * or to any products. NXP Semiconductors reserves the right to make changes
17 * in the software without notification. NXP Semiconductors also makes no
18 * representation or warranty that such application will be suitable for the
19 * specified use without further testing or modification.
20 *
21 * Permission to use, copy, modify, and distribute this software and its
22 * documentation is hereby granted, under NXP Semiconductors' and its
23 * licensor's relevant copyrights in the software, without fee, provided that it
24 * is used in conjunction with NXP Semiconductors microcontrollers. This
25 * copyright, permission, and disclaimer notice must appear in all copies of
26 * this code.
27 */
28
29 #ifndef __SYSTEM_LPC43XX_H
30 #define __SYSTEM_LPC43XX_H
31
32 #ifdef __cplusplus
33 extern "C" {
34 #endif
35
36 /* System initialization options */
37 #define PIN_SETUP 1 /* Configure pins during initialization */
38 #define CLOCK_SETUP 1 /* Configure clocks during initialization */
39 #define MEMORY_SETUP 0 /* Configure external memory during init */
40 #define SPIFI_INIT 1 /* Initialize SPIFI */
41
42 /* Crystal frequency into device */
43 #define CRYSTAL_MAIN_FREQ_IN 12000000
44
45 /* Crystal frequency into device for RTC/32K input */
46 #define CRYSTAL_32K_FREQ_IN 32768
47
48 /* Default CPU clock frequency */
49 #if defined(CHIP_LPC43XX)
50 #define MAX_CLOCK_FREQ (204000000)
51 #else
52 #define MAX_CLOCK_FREQ (180000000)
53 #endif
54
55 #if defined(__FPU_PRESENT) && __FPU_PRESENT == 1
56 /* FPU declarations */
57 #define LPC_CPACR 0xE000ED88
58
59 #define SCB_MVFR0 0xE000EF40
60 #define SCB_MVFR0_RESET 0x10110021
61
62 #define SCB_MVFR1 0xE000EF44
63 #define SCB_MVFR1_RESET 0x11000011
64
65 #if defined(__ARMCC_VERSION)
66 void fpuInit(void) __attribute__ ((section("BOOTSTRAP_CODE")));
67 #else
68 extern void fpuInit(void);
69 #endif
70 #endif
71
72 extern uint32_t SystemCoreClock; /*!< System Clock Frequency (Core Clock) */
73
74 /**
75 * Initialize the system
76 *
77 * @param none
78 * @return none
79 *
80 * @brief Setup the microcontroller system.
81 * Initialize the System and update the SystemCoreClock variable.
82 */
83 extern void SystemInit (void);
84 extern void SystemCoreClockUpdate(void);
85
86 #ifdef __cplusplus
87 }
88 #endif
89
90 #endif /* __SYSTEM_LPC43XX_H */
Imprint / Impressum