1 /* 2 ** ################################################################### 3 ** Processors: MKE04Z128VLD4 4 ** MKE04Z128VLH4 5 ** MKE04Z128VLK4 6 ** MKE04Z128VQH4 7 ** MKE04Z64VLD4 8 ** MKE04Z64VLH4 9 ** MKE04Z64VLK4 10 ** MKE04Z64VQH4 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: MKE04P80M48SF0RM Rev 4 19 ** Version: rev. 1.0, 2017-05-19 20 ** Build: b201123 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-2020 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 (2017-05-19) 38 ** Initial version. 39 ** 40 ** ################################################################### 41 */ 42 43 /*! 44 * @file MKE04Z1284 45 * @version 1.0 46 * @date 2017-05-19 47 * @brief Device specific configuration file for MKE04Z1284 (header file) 48 * 49 * Provides a system configuration function and a global variable that contains 50 * the system frequency. It configures the device and initializes the oscillator 51 * (PLL) that is part of the microcontroller device. 52 */ 53 54 #ifndef _SYSTEM_MKE04Z1284_H_ 55 #define _SYSTEM_MKE04Z1284_H_ /**< Symbol preventing repeated inclusion */ 56 57 #ifdef __cplusplus 58 extern "C" { 59 #endif 60 61 #include <stdint.h> 62 63 64 #ifndef DISABLE_WDOG 65 #define DISABLE_WDOG 1 66 #endif 67 68 /* Define clock source values */ 69 70 #define CPU_XTAL_CLK_HZ 8000000UL /* Value of the external crystal or oscillator clock frequency in Hz */ 71 #define CPU_INT_IRC_CLK_HZ 37500UL /* Value of the 32k internal oscillator clock frequency in Hz */ 72 73 #define DEFAULT_SYSTEM_CLOCK 24000000UL /* Default System clock value */ 74 75 76 /** 77 * @brief System clock frequency (core clock) 78 * 79 * The system clock frequency supplied to the SysTick timer and the processor 80 * core clock. This variable can be used by the user application to setup the 81 * SysTick timer or configure other parameters. It may also be used by debugger to 82 * query the frequency of the debug timer or configure the trace clock speed 83 * SystemCoreClock is initialized with a correct predefined value. 84 */ 85 extern uint32_t SystemCoreClock; 86 87 /** 88 * @brief Setup the microcontroller system. 89 * 90 * Typically this function configures the oscillator (PLL) that is part of the 91 * microcontroller device. For systems with variable clock speed it also updates 92 * the variable SystemCoreClock. SystemInit is called from startup_device file. 93 */ 94 void SystemInit (void); 95 96 /** 97 * @brief Updates the SystemCoreClock variable. 98 * 99 * It must be called whenever the core clock is changed during program 100 * execution. SystemCoreClockUpdate() evaluates the clock register settings and calculates 101 * the current core clock. 102 */ 103 void SystemCoreClockUpdate (void); 104 105 /** 106 * @brief SystemInit function hook. 107 * 108 * This weak function allows to call specific initialization code during the 109 * SystemInit() execution.This can be used when an application specific code needs 110 * to be called as close to the reset entry as possible (for example the Multicore 111 * Manager MCMGR_EarlyInit() function call). 112 * NOTE: No global r/w variables can be used in this hook function because the 113 * initialization of these variables happens after this function. 114 */ 115 void SystemInitHook (void); 116 117 #ifdef __cplusplus 118 } 119 #endif 120 121 #endif /* _SYSTEM_MKE04Z1284_H_ */ 122