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