diff options
Diffstat (limited to 'lib/chibios-contrib/ext/mcux-sdk/devices/LPC54S016/system_LPC54S016.h')
-rw-r--r-- | lib/chibios-contrib/ext/mcux-sdk/devices/LPC54S016/system_LPC54S016.h | 109 |
1 files changed, 109 insertions, 0 deletions
diff --git a/lib/chibios-contrib/ext/mcux-sdk/devices/LPC54S016/system_LPC54S016.h b/lib/chibios-contrib/ext/mcux-sdk/devices/LPC54S016/system_LPC54S016.h new file mode 100644 index 000000000..6c0798640 --- /dev/null +++ b/lib/chibios-contrib/ext/mcux-sdk/devices/LPC54S016/system_LPC54S016.h | |||
@@ -0,0 +1,109 @@ | |||
1 | /* | ||
2 | ** ################################################################### | ||
3 | ** Processors: LPC54S016JBD100 | ||
4 | ** LPC54S016JBD208 | ||
5 | ** LPC54S016JET180 | ||
6 | ** | ||
7 | ** Compilers: GNU C Compiler | ||
8 | ** IAR ANSI C/C++ Compiler for ARM | ||
9 | ** Keil ARM C/C++ Compiler | ||
10 | ** MCUXpresso Compiler | ||
11 | ** | ||
12 | ** Reference manual: LPC540xx/LPC54S0xx User manual Rev.0.8 5 June 2018 | ||
13 | ** Version: rev. 1.0, 2018-04-20 | ||
14 | ** Build: b201015 | ||
15 | ** | ||
16 | ** Abstract: | ||
17 | ** Provides a system configuration function and a global variable that | ||
18 | ** contains the system frequency. It configures the device and initializes | ||
19 | ** the oscillator (PLL) that is part of the microcontroller device. | ||
20 | ** | ||
21 | ** Copyright 2016 Freescale Semiconductor, Inc. | ||
22 | ** Copyright 2016-2020 NXP | ||
23 | ** All rights reserved. | ||
24 | ** | ||
25 | ** SPDX-License-Identifier: BSD-3-Clause | ||
26 | ** | ||
27 | ** http: www.nxp.com | ||
28 | ** mail: [email protected] | ||
29 | ** | ||
30 | ** Revisions: | ||
31 | ** - rev. 1.0 (2018-04-20) | ||
32 | ** Initial version. | ||
33 | ** | ||
34 | ** ################################################################### | ||
35 | */ | ||
36 | |||
37 | /*! | ||
38 | * @file LPC54S016 | ||
39 | * @version 1.0 | ||
40 | * @date 2018-04-20 | ||
41 | * @brief Device specific configuration file for LPC54S016 (header file) | ||
42 | * | ||
43 | * Provides a system configuration function and a global variable that contains | ||
44 | * the system frequency. It configures the device and initializes the oscillator | ||
45 | * (PLL) that is part of the microcontroller device. | ||
46 | */ | ||
47 | |||
48 | #ifndef _SYSTEM_LPC54S016_H_ | ||
49 | #define _SYSTEM_LPC54S016_H_ /**< Symbol preventing repeated inclusion */ | ||
50 | |||
51 | #ifdef __cplusplus | ||
52 | extern "C" { | ||
53 | #endif | ||
54 | |||
55 | #include <stdint.h> | ||
56 | |||
57 | #define DEFAULT_SYSTEM_CLOCK 12000000u /* Default System clock value */ | ||
58 | #define CLK_RTC_32K_CLK 32768u /* RTC oscillator 32 kHz output (32k_clk */ | ||
59 | #define CLK_FRO_12MHZ 12000000u /* FRO 12 MHz (fro_12m) */ | ||
60 | #define CLK_FRO_48MHZ 48000000u /* FRO 48 MHz (fro_48m) */ | ||
61 | #define CLK_FRO_96MHZ 96000000u /* FRO 96 MHz (fro_96m) */ | ||
62 | #define CLK_CLK_IN 0u /* Default CLK_IN pin clock */ | ||
63 | |||
64 | /** | ||
65 | * @brief System clock frequency (core clock) | ||
66 | * | ||
67 | * The system clock frequency supplied to the SysTick timer and the processor | ||
68 | * core clock. This variable can be used by the user application to setup the | ||
69 | * SysTick timer or configure other parameters. It may also be used by debugger to | ||
70 | * query the frequency of the debug timer or configure the trace clock speed | ||
71 | * SystemCoreClock is initialized with a correct predefined value. | ||
72 | */ | ||
73 | extern uint32_t SystemCoreClock; | ||
74 | |||
75 | /** | ||
76 | * @brief Setup the microcontroller system. | ||
77 | * | ||
78 | * Typically this function configures the oscillator (PLL) that is part of the | ||
79 | * microcontroller device. For systems with variable clock speed it also updates | ||
80 | * the variable SystemCoreClock. SystemInit is called from startup_device file. | ||
81 | */ | ||
82 | void SystemInit(void); | ||
83 | |||
84 | /** | ||
85 | * @brief Updates the SystemCoreClock variable. | ||
86 | * | ||
87 | * It must be called whenever the core clock is changed during program | ||
88 | * execution. SystemCoreClockUpdate() evaluates the clock register settings and calculates | ||
89 | * the current core clock. | ||
90 | */ | ||
91 | void SystemCoreClockUpdate(void); | ||
92 | |||
93 | /** | ||
94 | * @brief SystemInit function hook. | ||
95 | * | ||
96 | * This weak function allows to call specific initialization code during the | ||
97 | * SystemInit() execution.This can be used when an application specific code needs | ||
98 | * to be called as close to the reset entry as possible (for example the Multicore | ||
99 | * Manager MCMGR_EarlyInit() function call). | ||
100 | * NOTE: No global r/w variables can be used in this hook function because the | ||
101 | * initialization of these variables happens after this function. | ||
102 | */ | ||
103 | void SystemInitHook(void); | ||
104 | |||
105 | #ifdef __cplusplus | ||
106 | } | ||
107 | #endif | ||
108 | |||
109 | #endif /* _SYSTEM_LPC54S016_H_ */ | ||