1 /* 2 ** ################################################################### 3 ** Processors: MKV11Z128VFM7 4 ** MKV11Z128VLC7 5 ** MKV11Z128VLF7 6 ** MKV11Z128VLH7 7 ** MKV11Z64VFM7 8 ** MKV11Z64VLC7 9 ** MKV11Z64VLF7 10 ** MKV11Z64VLH7 11 ** 12 ** Compilers: Freescale C/C++ for Embedded ARM 13 ** GNU C Compiler 14 ** IAR ANSI C/C++ Compiler for ARM 15 ** Keil ARM C/C++ Compiler 16 ** MCUXpresso Compiler 17 ** 18 ** Reference manual: KV11P64M75RM Rev.2, April 2015 19 ** Version: rev. 1.1, 2017-03-22 20 ** Build: b181105 21 ** 22 ** Abstract: 23 ** Provides a system configuration function and a global variable that 24 ** contains the system frequency. It configures the device and initializes 25 ** the oscillator (PLL) that is part of the microcontroller device. 26 ** 27 ** Copyright 2016 Freescale Semiconductor, Inc. 28 ** Copyright 2016-2018 NXP 29 ** All rights reserved. 30 ** 31 ** SPDX-License-Identifier: BSD-3-Clause 32 ** 33 ** http: www.nxp.com 34 ** mail: support@nxp.com 35 ** 36 ** Revisions: 37 ** - rev. 1.0 (2014-12-14) 38 ** Initial version. 39 ** - rev. 1.1 (2017-03-22) 40 ** Corrected missing CAN0Rx DMA request. 41 ** 42 ** ################################################################### 43 */ 44 45 /*! 46 * @file MKV11Z7 47 * @version 1.1 48 * @date 2017-03-22 49 * @brief Device specific configuration file for MKV11Z7 (header file) 50 * 51 * Provides a system configuration function and a global variable that contains 52 * the system frequency. It configures the device and initializes the oscillator 53 * (PLL) that is part of the microcontroller device. 54 */ 55 56 #ifndef _SYSTEM_MKV11Z7_H_ 57 #define _SYSTEM_MKV11Z7_H_ /**< Symbol preventing repeated inclusion */ 58 59 #ifdef __cplusplus 60 extern "C" { 61 #endif 62 63 #include <stdint.h> 64 65 66 #ifndef DISABLE_WDOG 67 #define DISABLE_WDOG 1 68 #endif 69 70 /* Define clock source values */ 71 72 #define CPU_XTAL_CLK_HZ 10000000u /* Value of the external crystal or oscillator clock frequency in Hz */ 73 #define CPU_INT_SLOW_CLK_HZ 32768u /* Value of the slow internal oscillator clock frequency in Hz */ 74 #define CPU_INT_FAST_CLK_HZ 4000000u /* Value of the fast internal oscillator clock frequency in Hz */ 75 76 /* Low power mode enable */ 77 78 /* SMC_PMPROT: ?=0,?=0,AVLP=1,?=0,?=0,?=0,AVLLS=1,?=0 */ 79 #define SYSTEM_SMC_PMPROT_VALUE (SMC_PMPROT_AVLP_MASK | SMC_PMPROT_AVLLS_MASK) /* Mask of allowed low power modes used to initialize power modes protection register */ 80 81 #define DEFAULT_SYSTEM_CLOCK 20971520UL /* Default System clock value */ 82 83 84 /** 85 * @brief System clock frequency (core clock) 86 * 87 * The system clock frequency supplied to the SysTick timer and the processor 88 * core clock. This variable can be used by the user application to setup the 89 * SysTick timer or configure other parameters. It may also be used by debugger to 90 * query the frequency of the debug timer or configure the trace clock speed 91 * SystemCoreClock is initialized with a correct predefined value. 92 */ 93 extern uint32_t SystemCoreClock; 94 95 /** 96 * @brief Setup the microcontroller system. 97 * 98 * Typically this function configures the oscillator (PLL) that is part of the 99 * microcontroller device. For systems with variable clock speed it also updates 100 * the variable SystemCoreClock. SystemInit is called from startup_device file. 101 */ 102 void SystemInit (void); 103 104 /** 105 * @brief Updates the SystemCoreClock variable. 106 * 107 * It must be called whenever the core clock is changed during program 108 * execution. SystemCoreClockUpdate() evaluates the clock register settings and calculates 109 * the current core clock. 110 */ 111 void SystemCoreClockUpdate (void); 112 113 /** 114 * @brief SystemInit function hook. 115 * 116 * This weak function allows to call specific initialization code during the 117 * SystemInit() execution.This can be used when an application specific code needs 118 * to be called as close to the reset entry as possible (for example the Multicore 119 * Manager MCMGR_EarlyInit() function call). 120 * NOTE: No global r/w variables can be used in this hook function because the 121 * initialization of these variables happens after this function. 122 */ 123 void SystemInitHook (void); 124 125 #ifdef __cplusplus 126 } 127 #endif 128 129 #endif /* _SYSTEM_MKV11Z7_H_ */ 130