1 /* 2 ** ################################################################### 3 ** Processors: MIMX8MN1CVPIZ 4 ** MIMX8MN1CVTIZ 5 ** MIMX8MN1DVPIZ 6 ** MIMX8MN1DVTJZ 7 ** 8 ** Compilers: GNU C Compiler 9 ** IAR ANSI C/C++ Compiler for ARM 10 ** Keil ARM C/C++ Compiler 11 ** 12 ** Reference manual: MX8MNRM, Rev.B, 07/2019 13 ** Version: rev. 2.0, 2019-09-23 14 ** Build: b211101 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-2021 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. 1.0 (2019-04-22) 32 ** Initial version. 33 ** - rev. 2.0 (2019-09-23) 34 ** Rev.B Header RFP 35 ** 36 ** ################################################################### 37 */ 38 39 /*! 40 * @file MIMX8MN1_cm7 41 * @version 1.0 42 * @date 011121 43 * @brief Device specific configuration file for MIMX8MN1_cm7 (header file) 44 * 45 * Provides a system configuration function and a global variable that contains 46 * the system frequency. It configures the device and initializes the oscillator 47 * (PLL) that is part of the microcontroller device. 48 */ 49 #ifndef _SYSTEM_MIMX8MN1_cm7_H_ 50 #define _SYSTEM_MIMX8MN1_cm7_H_ /**< Symbol preventing repeated inclusion */ 51 52 #ifdef __cplusplus 53 extern "C" { 54 #endif 55 56 #include <stdint.h> 57 58 /* i.MX8MN Definitions */ 59 #ifndef DISABLE_WDOG 60 #define DISABLE_WDOG 1 61 #endif 62 /* Define clock source values */ 63 #define CPU_XTAL_SOSC_CLK_24MHZ 24000000u /* Value of the external System Oscillator Clock(SOSC) frequency in Hz */ 64 #define CLK_PAD_CLK 0u /* The value could be changed according to the actual usage */ 65 #define DEFAULT_SYSTEM_CLOCK 600000000u /* Default System clock value */ 66 67 /** 68 * @brief System clock frequency (core clock) 69 * 70 * The system clock frequency supplied to the SysTick timer and the processor 71 * core clock. This variable can be used by the user application to setup the 72 * SysTick timer or configure other parameters. It may also be used by debugger to 73 * query the frequency of the debug timer or configure the trace clock speed 74 * SystemCoreClock is initialized with a correct predefined value. 75 */ 76 extern uint32_t SystemCoreClock; 77 78 /** 79 * @brief Setup the microcontroller system. 80 * 81 * Typically this function configures the oscillator (PLL) that is part of the 82 * microcontroller device. For systems with variable clock speed it also updates 83 * the variable SystemCoreClock. SystemInit is called from startup_device file. 84 */ 85 void SystemInit(void); 86 87 /** 88 * @brief Updates the SystemCoreClock variable. 89 * 90 * It must be called whenever the core clock is changed during program 91 * execution. SystemCoreClockUpdate() evaluates the clock register settings and calculates 92 * the current core clock. 93 */ 94 void SystemCoreClockUpdate(void); 95 96 /** 97 * @brief SystemInit function hook. 98 * 99 * This weak function allows to call specific initialization code during the 100 * SystemInit() execution.This can be used when an application specific code needs 101 * to be called as close to the reset entry as possible (for example the Multicore 102 * Manager MCMGR_EarlyInit() function call). 103 * NOTE: No global r/w variables can be used in this hook function because the 104 * initialization of these variables happens after this function. 105 */ 106 void SystemInitHook(void); 107 108 #ifdef __cplusplus 109 } 110 #endif 111 112 #endif /* _SYSTEM_MIMX8MN1_cm7_H_ */ 113