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