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