1 /*
2 ** ###################################################################
3 **     Processors:          MIMXRT1011CAE4A
4 **                          MIMXRT1011DAE5A
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:    IMXRT1010RM Rev.0, 09/2019
13 **     Version:             rev. 1.1, 2019-08-06
14 **     Build:               b191119
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-2019 NXP
23 **     All rights reserved.
24 **
25 **     SPDX-License-Identifier: BSD-3-Clause
26 **
27 **     http:                 www.nxp.com
28 **     mail:                 support@nxp.com
29 **
30 **     Revisions:
31 **     - rev. 0.1 (2019-02-14)
32 **         Initial version.
33 **     - rev. 1.0 (2019-08-01)
34 **         Rev.0 Header GA
35 **     - rev. 1.1 (2019-08-06)
36 **         Update header files to align with IMXRT1010RM Rev.B.
37 **
38 ** ###################################################################
39 */
40 
41 /*!
42  * @file MIMXRT1011
43  * @version 1.1
44  * @date 2019-08-06
45  * @brief Device specific configuration file for MIMXRT1011 (header file)
46  *
47  * Provides a system configuration function and a global variable that contains
48  * the system frequency. It configures the device and initializes the oscillator
49  * (PLL) that is part of the microcontroller device.
50  */
51 
52 #ifndef _SYSTEM_MIMXRT1011_H_
53 #define _SYSTEM_MIMXRT1011_H_                    /**< Symbol preventing repeated inclusion */
54 
55 #ifdef __cplusplus
56 extern "C" {
57 #endif
58 
59 #include <stdint.h>
60 
61 
62 #ifndef DISABLE_WDOG
63   #define DISABLE_WDOG                 1
64 #endif
65 
66 /* Define clock source values */
67 
68 #define CPU_XTAL_CLK_HZ                24000000UL          /* Value of the external crystal or oscillator clock frequency in Hz */
69 
70 #define DEFAULT_SYSTEM_CLOCK           297000000UL         /* Default System clock value */
71 
72 
73 /**
74  * @brief System clock frequency (core clock)
75  *
76  * The system clock frequency supplied to the SysTick timer and the processor
77  * core clock. This variable can be used by the user application to setup the
78  * SysTick timer or configure other parameters. It may also be used by debugger to
79  * query the frequency of the debug timer or configure the trace clock speed
80  * SystemCoreClock is initialized with a correct predefined value.
81  */
82 extern uint32_t SystemCoreClock;
83 
84 /**
85  * @brief Setup the microcontroller system.
86  *
87  * Typically this function configures the oscillator (PLL) that is part of the
88  * microcontroller device. For systems with variable clock speed it also updates
89  * the variable SystemCoreClock. SystemInit is called from startup_device file.
90  */
91 void SystemInit (void);
92 
93 /**
94  * @brief Updates the SystemCoreClock variable.
95  *
96  * It must be called whenever the core clock is changed during program
97  * execution. SystemCoreClockUpdate() evaluates the clock register settings and calculates
98  * the current core clock.
99  */
100 void SystemCoreClockUpdate (void);
101 
102 /**
103  * @brief SystemInit function hook.
104  *
105  * This weak function allows to call specific initialization code during the
106  * SystemInit() execution.This can be used when an application specific code needs
107  * to be called as close to the reset entry as possible (for example the Multicore
108  * Manager MCMGR_EarlyInit() function call).
109  * NOTE: No global r/w variables can be used in this hook function because the
110  * initialization of these variables happens after this function.
111  */
112 void SystemInitHook (void);
113 
114 #ifdef __cplusplus
115 }
116 #endif
117 
118 #endif  /* _SYSTEM_MIMXRT1011_H_ */
119