1 /* 2 ** ################################################################### 3 ** Processors: MKV10Z16VFM7 4 ** MKV10Z16VLC7 5 ** MKV10Z16VLF7 6 ** MKV10Z32VFM7 7 ** MKV10Z32VLC7 8 ** MKV10Z32VLF7 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: KV10P48M75RM Rev.6, June 2014 17 ** Version: rev. 1.2, 2014-08-28 18 ** Build: b181105 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-2018 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 (2013-05-09) 36 ** Initial version. 37 ** - rev. 1.1 (2014-02-20) 38 ** ADC module - removed PGA registers 39 ** UART0 module - removed CEA709.1 registers 40 ** - rev. 1.2 (2014-08-28) 41 ** Update of system files - default clock configuration changed. 42 ** Update of startup files - possibility to override DefaultISR added. 43 ** 44 ** ################################################################### 45 */ 46 47 /*! 48 * @file MKV10Z7 49 * @version 1.2 50 * @date 2014-08-28 51 * @brief Device specific configuration file for MKV10Z7 (header file) 52 * 53 * Provides a system configuration function and a global variable that contains 54 * the system frequency. It configures the device and initializes the oscillator 55 * (PLL) that is part of the microcontroller device. 56 */ 57 58 #ifndef _SYSTEM_MKV10Z7_H_ 59 #define _SYSTEM_MKV10Z7_H_ /**< Symbol preventing repeated inclusion */ 60 61 #ifdef __cplusplus 62 extern "C" { 63 #endif 64 65 #include <stdint.h> 66 67 68 #ifndef DISABLE_WDOG 69 #define DISABLE_WDOG 1 70 #endif 71 72 /* Define clock source values */ 73 74 #define CPU_XTAL_CLK_HZ 10000000u /* Value of the external crystal or oscillator clock frequency in Hz */ 75 #define CPU_INT_SLOW_CLK_HZ 32768u /* Value of the slow internal oscillator clock frequency in Hz */ 76 #define CPU_INT_FAST_CLK_HZ 4000000u /* Value of the fast internal oscillator clock frequency in Hz */ 77 #define CPU_INT_IRC_CLK_HZ 48000000u /* Value of the 48M internal oscillator clock frequency in Hz */ 78 79 /* Low power mode enable */ 80 81 /* SMC_PMPROT: ?=0,?=0,AVLP=1,?=0,?=0,?=0,AVLLS=1,?=0 */ 82 #define SYSTEM_SMC_PMPROT_VALUE (SMC_PMPROT_AVLP_MASK | SMC_PMPROT_AVLLS_MASK) /* Mask of allowed low power modes used to initialize power modes protection register */ 83 84 #define DEFAULT_SYSTEM_CLOCK 20971520UL /* Default System clock value */ 85 86 87 /** 88 * @brief System clock frequency (core clock) 89 * 90 * The system clock frequency supplied to the SysTick timer and the processor 91 * core clock. This variable can be used by the user application to setup the 92 * SysTick timer or configure other parameters. It may also be used by debugger to 93 * query the frequency of the debug timer or configure the trace clock speed 94 * SystemCoreClock is initialized with a correct predefined value. 95 */ 96 extern uint32_t SystemCoreClock; 97 98 /** 99 * @brief Setup the microcontroller system. 100 * 101 * Typically this function configures the oscillator (PLL) that is part of the 102 * microcontroller device. For systems with variable clock speed it also updates 103 * the variable SystemCoreClock. SystemInit is called from startup_device file. 104 */ 105 void SystemInit (void); 106 107 /** 108 * @brief Updates the SystemCoreClock variable. 109 * 110 * It must be called whenever the core clock is changed during program 111 * execution. SystemCoreClockUpdate() evaluates the clock register settings and calculates 112 * the current core clock. 113 */ 114 void SystemCoreClockUpdate (void); 115 116 /** 117 * @brief SystemInit function hook. 118 * 119 * This weak function allows to call specific initialization code during the 120 * SystemInit() execution.This can be used when an application specific code needs 121 * to be called as close to the reset entry as possible (for example the Multicore 122 * Manager MCMGR_EarlyInit() function call). 123 * NOTE: No global r/w variables can be used in this hook function because the 124 * initialization of these variables happens after this function. 125 */ 126 void SystemInitHook (void); 127 128 #ifdef __cplusplus 129 } 130 #endif 131 132 #endif /* _SYSTEM_MKV10Z7_H_ */ 133