1 /* 2 ** ################################################################### 3 ** Processors: MIMXRT1166CVM5A_cm7 4 ** MIMXRT1166DVM6A_cm7 5 ** MIMXRT1166XVM5A_cm7 6 ** 7 ** Compilers: Freescale C/C++ for Embedded ARM 8 ** GNU C Compiler 9 ** IAR ANSI C/C++ Compiler for ARM 10 ** Keil ARM C/C++ Compiler 11 ** MCUXpresso Compiler 12 ** 13 ** Reference manual: IMXRT1160RM, Rev 0, 03/2021 14 ** Version: rev. 0.1, 2020-12-29 15 ** Build: b210615 16 ** 17 ** Abstract: 18 ** Provides a system configuration function and a global variable that 19 ** contains the system frequency. It configures the device and initializes 20 ** the oscillator (PLL) that is part of the microcontroller device. 21 ** 22 ** Copyright 2016 Freescale Semiconductor, Inc. 23 ** Copyright 2016-2021 NXP 24 ** All rights reserved. 25 ** 26 ** SPDX-License-Identifier: BSD-3-Clause 27 ** 28 ** http: www.nxp.com 29 ** mail: support@nxp.com 30 ** 31 ** Revisions: 32 ** - rev. 0.1 (2020-12-29) 33 ** Initial version. 34 ** 35 ** ################################################################### 36 */ 37 38 /*! 39 * @file MIMXRT1166_cm7 40 * @version 1.0 41 * @date 2021-06-15 42 * @brief Device specific configuration file for MIMXRT1166_cm7 (header file) 43 * 44 * Provides a system configuration function and a global variable that contains 45 * the system frequency. It configures the device and initializes the oscillator 46 * (PLL) that is part of the microcontroller device. 47 */ 48 49 #ifndef _SYSTEM_MIMXRT1166_cm7_H_ 50 #define _SYSTEM_MIMXRT1166_cm7_H_ /**< Symbol preventing repeated inclusion */ 51 52 #ifdef __cplusplus 53 extern "C" { 54 #endif 55 56 #include <stdint.h> 57 58 59 #ifndef DISABLE_WDOG 60 #define DISABLE_WDOG 1 61 #endif 62 63 /* Define clock source values */ 64 65 #define CPU_XTAL_CLK_HZ 24000000UL /* Value of the external crystal or oscillator clock frequency in Hz */ 66 67 #define CPU_CLK1_HZ 0UL /* Value of the CLK1 (select the CLK1_N/CLK1_P as source) frequency in Hz */ 68 /* If CLOCK1_P,CLOCK1_N is choose as the pll bypass clock source, please implement the CLKPN_FREQ define, otherwise 0 will be returned. */ 69 70 #define DEFAULT_SYSTEM_CLOCK 528000000UL /* 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_MIMXRT1166_cm7_H_ */ 119