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