aboutsummaryrefslogtreecommitdiff
path: root/lib/chibios-contrib/ext/mcux-sdk/devices/K32L2A41A/system_K32L2A41A.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/chibios-contrib/ext/mcux-sdk/devices/K32L2A41A/system_K32L2A41A.h')
-rw-r--r--lib/chibios-contrib/ext/mcux-sdk/devices/K32L2A41A/system_K32L2A41A.h116
1 files changed, 116 insertions, 0 deletions
diff --git a/lib/chibios-contrib/ext/mcux-sdk/devices/K32L2A41A/system_K32L2A41A.h b/lib/chibios-contrib/ext/mcux-sdk/devices/K32L2A41A/system_K32L2A41A.h
new file mode 100644
index 000000000..c5e2ad11b
--- /dev/null
+++ b/lib/chibios-contrib/ext/mcux-sdk/devices/K32L2A41A/system_K32L2A41A.h
@@ -0,0 +1,116 @@
1/*
2** ###################################################################
3** Processors: K32L2A41VLH1A
4** K32L2A41VLL1A
5**
6** Compilers: Freescale C/C++ for Embedded ARM
7** GNU C Compiler
8** IAR ANSI C/C++ Compiler for ARM
9** Keil ARM C/C++ Compiler
10** MCUXpresso Compiler
11**
12** Reference manual: K32L2AxRM, Rev. 1, 12/2019
13** Version: rev. 1.0, 2019-10-30
14** Build: b201013
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 (2019-10-30)
32** Initial version.
33**
34** ###################################################################
35*/
36
37/*!
38 * @file K32L2A41A
39 * @version 1.0
40 * @date 2019-10-30
41 * @brief Device specific configuration file for K32L2A41A (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_K32L2A41A_H_
49#define _SYSTEM_K32L2A41A_H_ /**< Symbol preventing repeated inclusion */
50
51#ifdef __cplusplus
52extern "C" {
53#endif
54
55#include <stdint.h>
56
57#ifndef DISABLE_WDOG
58#define DISABLE_WDOG 1
59#endif
60
61/* Define clock source values */
62#define CPU_XTAL_CLK_HZ 8000000u
63
64/* Low power mode enable */
65/* SMC_PMPROT: AVLP=1,AVLLS=1 */
66#define SYSTEM_SMC_PMPROT_VALUE 0x2Au /* SMC_PMPROT */
67#define SYSTEM_SMC_PMCTRL_VALUE 0x0u /* SMC_PMCTRL */
68
69#define DEFAULT_SYSTEM_CLOCK 8000000u /* Default System clock value */
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 */
80extern 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 */
89void 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 */
98void 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 */
110void SystemInitHook(void);
111
112#ifdef __cplusplus
113}
114#endif
115
116#endif /* _SYSTEM_K32L2A41A_H_ */