aboutsummaryrefslogtreecommitdiff
path: root/lib/chibios-contrib/ext/mcux-sdk/devices/MK02F12810/system_MK02F12810.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/chibios-contrib/ext/mcux-sdk/devices/MK02F12810/system_MK02F12810.h')
-rw-r--r--lib/chibios-contrib/ext/mcux-sdk/devices/MK02F12810/system_MK02F12810.h138
1 files changed, 138 insertions, 0 deletions
diff --git a/lib/chibios-contrib/ext/mcux-sdk/devices/MK02F12810/system_MK02F12810.h b/lib/chibios-contrib/ext/mcux-sdk/devices/MK02F12810/system_MK02F12810.h
new file mode 100644
index 000000000..4124c7cbf
--- /dev/null
+++ b/lib/chibios-contrib/ext/mcux-sdk/devices/MK02F12810/system_MK02F12810.h
@@ -0,0 +1,138 @@
1/*
2** ###################################################################
3** Processors: MK02FN128VFM10
4** MK02FN128VLF10
5** MK02FN128VLH10
6** MK02FN64VFM10
7** MK02FN64VLF10
8** MK02FN64VLH10
9**
10** Compilers: Freescale C/C++ for Embedded ARM
11** GNU C Compiler
12** IAR ANSI C/C++ Compiler for ARM
13** Keil ARM C/C++ Compiler
14** MCUXpresso Compiler
15**
16** Reference manual: K02P64M100SFARM, Rev. 0, February 14, 2014
17** Version: rev. 0.5, 2015-02-19
18** Build: b181105
19**
20** Abstract:
21** Provides a system configuration function and a global variable that
22** contains the system frequency. It configures the device and initializes
23** the oscillator (PLL) that is part of the microcontroller device.
24**
25** Copyright 2016 Freescale Semiconductor, Inc.
26** Copyright 2016-2018 NXP
27** All rights reserved.
28**
29** SPDX-License-Identifier: BSD-3-Clause
30**
31** http: www.nxp.com
32** mail: [email protected]
33**
34** Revisions:
35** - rev. 0.1 (2014-02-24)
36** Initial version
37** - rev. 0.2 (2014-07-15)
38** Module access macro module_BASES replaced by module_BASE_PTRS.
39** Update of system and startup files.
40** - rev. 0.3 (2014-08-28)
41** Update of system files - default clock configuration changed.
42** Update of startup files - possibility to override DefaultISR added.
43** - rev. 0.4 (2014-10-14)
44** Interrupt INT_LPTimer renamed to INT_LPTMR0, interrupt INT_Watchdog renamed to INT_WDOG_EWM.
45** - rev. 0.5 (2015-02-19)
46** Renamed interrupt vector LLW to LLWU.
47**
48** ###################################################################
49*/
50
51/*!
52 * @file MK02F12810
53 * @version 0.5
54 * @date 2015-02-19
55 * @brief Device specific configuration file for MK02F12810 (header file)
56 *
57 * Provides a system configuration function and a global variable that contains
58 * the system frequency. It configures the device and initializes the oscillator
59 * (PLL) that is part of the microcontroller device.
60 */
61
62#ifndef _SYSTEM_MK02F12810_H_
63#define _SYSTEM_MK02F12810_H_ /**< Symbol preventing repeated inclusion */
64
65#ifdef __cplusplus
66extern "C" {
67#endif
68
69#include <stdint.h>
70
71
72#ifndef DISABLE_WDOG
73 #define DISABLE_WDOG 1
74#endif
75
76/* Define clock source values */
77
78#define CPU_XTAL_CLK_HZ 8000000u /* Value of the external crystal or oscillator clock frequency in Hz */
79#define CPU_XTAL32k_CLK_HZ 0u /* No RTC clock available */
80#define CPU_INT_SLOW_CLK_HZ 32768u /* Value of the slow internal oscillator clock frequency in Hz */
81#define CPU_INT_FAST_CLK_HZ 4000000u /* Value of the fast internal oscillator clock frequency in Hz */
82#define CPU_INT_IRC_CLK_HZ 48000000u /* Value of the 48M internal oscillator clock frequency in Hz */
83
84/* RTC oscillator setting */
85
86/* Low power mode enable */
87/* SMC_PMPROT: AHSRUN=1,AVLP=1,ALLS=1,AVLLS=1 */
88#define SYSTEM_SMC_PMPROT_VALUE 0xAAU /* SMC_PMPROT */
89
90#define DEFAULT_SYSTEM_CLOCK 20971520u /* Default System clock value */
91
92
93/**
94 * @brief System clock frequency (core clock)
95 *
96 * The system clock frequency supplied to the SysTick timer and the processor
97 * core clock. This variable can be used by the user application to setup the
98 * SysTick timer or configure other parameters. It may also be used by debugger to
99 * query the frequency of the debug timer or configure the trace clock speed
100 * SystemCoreClock is initialized with a correct predefined value.
101 */
102extern uint32_t SystemCoreClock;
103
104/**
105 * @brief Setup the microcontroller system.
106 *
107 * Typically this function configures the oscillator (PLL) that is part of the
108 * microcontroller device. For systems with variable clock speed it also updates
109 * the variable SystemCoreClock. SystemInit is called from startup_device file.
110 */
111void SystemInit (void);
112
113/**
114 * @brief Updates the SystemCoreClock variable.
115 *
116 * It must be called whenever the core clock is changed during program
117 * execution. SystemCoreClockUpdate() evaluates the clock register settings and calculates
118 * the current core clock.
119 */
120void SystemCoreClockUpdate (void);
121
122/**
123 * @brief SystemInit function hook.
124 *
125 * This weak function allows to call specific initialization code during the
126 * SystemInit() execution.This can be used when an application specific code needs
127 * to be called as close to the reset entry as possible (for example the Multicore
128 * Manager MCMGR_EarlyInit() function call).
129 * NOTE: No global r/w variables can be used in this hook function because the
130 * initialization of these variables happens after this function.
131 */
132void SystemInitHook (void);
133
134#ifdef __cplusplus
135}
136#endif
137
138#endif /* _SYSTEM_MK02F12810_H_ */