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