1 /*
2 ** ###################################################################
3 **     Processor:           MIMXRT1173CVM8A_cm7
4 **     Compilers:           Freescale C/C++ for Embedded ARM
5 **                          GNU C Compiler
6 **                          IAR ANSI C/C++ Compiler for ARM
7 **                          Keil ARM C/C++ Compiler
8 **                          MCUXpresso Compiler
9 **
10 **     Reference manual:    IMXRT1170RM, Rev 1, 02/2021
11 **     Version:             rev. 1.0, 2020-12-29
12 **     Build:               b211125
13 **
14 **     Abstract:
15 **         Provides a system configuration function and a global variable that
16 **         contains the system frequency. It configures the device and initializes
17 **         the oscillator (PLL) that is part of the microcontroller device.
18 **
19 **     Copyright 2016 Freescale Semiconductor, Inc.
20 **     Copyright 2016-2021 NXP
21 **     All rights reserved.
22 **
23 **     SPDX-License-Identifier: BSD-3-Clause
24 **
25 **     http:                 www.nxp.com
26 **     mail:                 support@nxp.com
27 **
28 **     Revisions:
29 **     - rev. 0.1 (2018-03-05)
30 **         Initial version.
31 **     - rev. 1.0 (2020-12-29)
32 **         Update header files to align with IMXRT1170RM Rev.0.
33 **
34 ** ###################################################################
35 */
36 
37 /*!
38  * @file MIMXRT1173_cm7
39  * @version 1.0
40  * @date 2021-11-25
41  * @brief Device specific configuration file for MIMXRT1173_cm7 (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_MIMXRT1173_cm7_H_
49 #define _SYSTEM_MIMXRT1173_cm7_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 CPU_CLK1_HZ                    0UL                 /* Value of the CLK1 (select the CLK1_N/CLK1_P as source) frequency in Hz */
67                                                            /* If CLOCK1_P,CLOCK1_N is choose as the pll bypass clock source, please implement the CLKPN_FREQ define, otherwise 0 will be returned. */
68 
69 #define DEFAULT_SYSTEM_CLOCK           528000000UL         /* Default System clock value */
70 
71 
72 /**
73  * @brief System clock frequency (core clock)
74  *
75  * The system clock frequency supplied to the SysTick timer and the processor
76  * core clock. This variable can be used by the user application to setup the
77  * SysTick timer or configure other parameters. It may also be used by debugger to
78  * query the frequency of the debug timer or configure the trace clock speed
79  * SystemCoreClock is initialized with a correct predefined value.
80  */
81 extern uint32_t SystemCoreClock;
82 
83 /**
84  * @brief Setup the microcontroller system.
85  *
86  * Typically this function configures the oscillator (PLL) that is part of the
87  * microcontroller device. For systems with variable clock speed it also updates
88  * the variable SystemCoreClock. SystemInit is called from startup_device file.
89  */
90 void SystemInit (void);
91 
92 /**
93  * @brief Updates the SystemCoreClock variable.
94  *
95  * It must be called whenever the core clock is changed during program
96  * execution. SystemCoreClockUpdate() evaluates the clock register settings and calculates
97  * the current core clock.
98  */
99 void SystemCoreClockUpdate (void);
100 
101 /**
102  * @brief SystemInit function hook.
103  *
104  * This weak function allows to call specific initialization code during the
105  * SystemInit() execution.This can be used when an application specific code needs
106  * to be called as close to the reset entry as possible (for example the Multicore
107  * Manager MCMGR_EarlyInit() function call).
108  * NOTE: No global r/w variables can be used in this hook function because the
109  * initialization of these variables happens after this function.
110  */
111 void SystemInitHook (void);
112 
113 #ifdef __cplusplus
114 }
115 #endif
116 
117 #endif  /* _SYSTEM_MIMXRT1173_cm7_H_ */
118