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