1 /* 2 ** ################################################################### 3 ** Processors: MKE15Z32VFP4 4 ** MKE15Z32VLD4 5 ** MKE15Z32VLF4 6 ** MKE15Z64VFP4 7 ** MKE15Z64VLD4 8 ** MKE15Z64VLF4 9 ** 10 ** Compilers: Freescale C/C++ for Embedded ARM 11 ** GNU C Compiler 12 ** IAR ANSI C/C++ Compiler for ARM 13 ** Keil ARM C/C++ Compiler 14 ** MCUXpresso Compiler 15 ** 16 ** Reference manual: KE1xZP48M48SF0RM, Rev. 1, Sep. 2018 17 ** Version: rev. 3.0, 2020-01-22 18 ** Build: b200122 19 ** 20 ** Abstract: 21 ** Provides a system configuration function and a global variable that 22 ** contains the system frequency. It configures the device and initializes 23 ** the oscillator (PLL) that is part of the microcontroller device. 24 ** 25 ** Copyright 2016 Freescale Semiconductor, Inc. 26 ** Copyright 2016-2020 NXP 27 ** All rights reserved. 28 ** 29 ** SPDX-License-Identifier: BSD-3-Clause 30 ** 31 ** http: www.nxp.com 32 ** mail: support@nxp.com 33 ** 34 ** Revisions: 35 ** - rev. 1.0 (2018-05-09) 36 ** Initial version. 37 ** - rev. 2.0 (2018-09-17) 38 ** Based on rev1 RM. 39 ** - rev. 3.0 (2020-01-22) 40 ** Add 40 pins part numbers. 41 ** 42 ** ################################################################### 43 */ 44 45 /*! 46 * @file MKE15Z4 47 * @version 3.0 48 * @date 2020-01-22 49 * @brief Device specific configuration file for MKE15Z4 (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_MKE15Z4_H_ 57 #define _SYSTEM_MKE15Z4_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 8000000u /* Value of the external crystal or oscillator clock frequency in Hz */ 73 #define CPU_INT_FAST_CLK_HZ 48000000u /* Value of the fast internal oscillator clock frequency in Hz */ 74 #define CPU_INT_IRC_CLK_HZ 48000000u /* Value of the 48M internal oscillator clock frequency in Hz */ 75 76 /* Low power mode enable */ 77 /* SMC_PMPROT: AVLP=1 */ 78 #define SYSTEM_SMC_PMPROT_VALUE 0x20u /* SMC_PMPROT */ 79 #define SYSTEM_SMC_PMCTRL_VALUE 0x0u /* SMC_PMCTRL */ 80 81 #define DEFAULT_SYSTEM_CLOCK 48000000u /* Default System clock value */ 82 #define CPU_INT_SLOW_CLK_HZ 8000000u /* Value of the slow internal oscillator clock frequency in Hz */ 83 84 85 /** 86 * @brief System clock frequency (core clock) 87 * 88 * The system clock frequency supplied to the SysTick timer and the processor 89 * core clock. This variable can be used by the user application to setup the 90 * SysTick timer or configure other parameters. It may also be used by debugger to 91 * query the frequency of the debug timer or configure the trace clock speed 92 * SystemCoreClock is initialized with a correct predefined value. 93 */ 94 extern uint32_t SystemCoreClock; 95 96 /** 97 * @brief Setup the microcontroller system. 98 * 99 * Typically this function configures the oscillator (PLL) that is part of the 100 * microcontroller device. For systems with variable clock speed it also updates 101 * the variable SystemCoreClock. SystemInit is called from startup_device file. 102 */ 103 void SystemInit (void); 104 105 /** 106 * @brief Updates the SystemCoreClock variable. 107 * 108 * It must be called whenever the core clock is changed during program 109 * execution. SystemCoreClockUpdate() evaluates the clock register settings and calculates 110 * the current core clock. 111 */ 112 void SystemCoreClockUpdate (void); 113 114 /** 115 * @brief SystemInit function hook. 116 * 117 * This weak function allows to call specific initialization code during the 118 * SystemInit() execution.This can be used when an application specific code needs 119 * to be called as close to the reset entry as possible (for example the Multicore 120 * Manager MCMGR_EarlyInit() function call). 121 * NOTE: No global r/w variables can be used in this hook function because the 122 * initialization of these variables happens after this function. 123 */ 124 void SystemInitHook (void); 125 126 #ifdef __cplusplus 127 } 128 #endif 129 130 #endif /* _SYSTEM_MKE15Z4_H_ */ 131