Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
system_MK26F18.h
00001 /* 00002 ** ################################################################### 00003 ** Processors: MK26FN2M0CAC18 00004 ** MK26FN2M0VLQ18 00005 ** MK26FN2M0VMD18 00006 ** MK26FN2M0VMI18 00007 ** 00008 ** Compilers: Keil ARM C/C++ Compiler 00009 ** Freescale C/C++ for Embedded ARM 00010 ** GNU C Compiler 00011 ** IAR ANSI C/C++ Compiler for ARM 00012 ** MCUXpresso Compiler 00013 ** 00014 ** Reference manual: MK26P169M180SF5RM, Rev. 1, Mar 2015 00015 ** Version: rev. 2.0, 2015-03-25 00016 ** Build: b180801 00017 ** 00018 ** Abstract: 00019 ** Provides a system configuration function and a global variable that 00020 ** contains the system frequency. It configures the device and initializes 00021 ** the oscillator (PLL) that is part of the microcontroller device. 00022 ** 00023 ** Copyright 2016 Freescale Semiconductor, Inc. 00024 ** Copyright 2016-2018 NXP 00025 ** 00026 ** SPDX-License-Identifier: BSD-3-Clause 00027 ** 00028 ** http: www.nxp.com 00029 ** mail: support@nxp.com 00030 ** 00031 ** Revisions: 00032 ** - rev. 1.0 (2014-12-04) 00033 ** Initial version. 00034 ** - rev. 1.1 (2015-02-19) 00035 ** Renamed interrupt vector LLW to LLWU. 00036 ** - rev. 2.0 (2015-03-25) 00037 ** Registers updated according to the reference manual revision 1, March 2015 00038 ** 00039 ** ################################################################### 00040 */ 00041 00042 /*! 00043 * @file MK26F18 00044 * @version 2.0 00045 * @date 2015-03-25 00046 * @brief Device specific configuration file for MK26F18 (header file) 00047 * 00048 * Provides a system configuration function and a global variable that contains 00049 * the system frequency. It configures the device and initializes the oscillator 00050 * (PLL) that is part of the microcontroller device. 00051 */ 00052 00053 #ifndef _SYSTEM_MK26F18_H_ 00054 #define _SYSTEM_MK26F18_H_ /**< Symbol preventing repeated inclusion */ 00055 00056 #ifdef __cplusplus 00057 extern "C" { 00058 #endif 00059 00060 #include <stdint.h> 00061 00062 00063 #ifndef DISABLE_WDOG 00064 #define DISABLE_WDOG 1 00065 #endif 00066 00067 /* Define clock source values */ 00068 00069 #define CPU_XTAL_CLK_HZ 16000000U /* Value of the external crystal or oscillator clock frequency of the system oscillator (OSC) in Hz */ 00070 #define CPU_XTAL32k_CLK_HZ 32768U /* Value of the external 32k crystal or oscillator clock frequency of the RTC in Hz */ 00071 #define CPU_INT_SLOW_CLK_HZ 32768U /* Value of the slow internal oscillator clock frequency in Hz */ 00072 #define CPU_INT_FAST_CLK_HZ 4000000U /* Value of the fast internal oscillator clock frequency in Hz */ 00073 #define CPU_INT_IRC_CLK_HZ 48000000U /* Value of the 48M internal oscillator clock frequency in Hz */ 00074 00075 /* RTC oscillator setting */ 00076 /* RTC_CR: SC2P=0,SC4P=0,SC8P=0,SC16P=0,CLKO=1,OSCE=1,WPS=0,UM=0,SUP=0,WPE=0,SWR=0 */ 00077 #define SYSTEM_RTC_CR_VALUE 0x0300U /* RTC_CR */ 00078 00079 /* Low power mode enable */ 00080 /* SMC_PMPROT: AHSRUN=1,AVLP=1,ALLS=1,AVLLS=1 */ 00081 #define SYSTEM_SMC_PMPROT_VALUE 0xAAU /* SMC_PMPROT */ 00082 00083 #define DEFAULT_SYSTEM_CLOCK 20971520u 00084 00085 00086 /** 00087 * @brief System clock frequency (core clock) 00088 * 00089 * The system clock frequency supplied to the SysTick timer and the processor 00090 * core clock. This variable can be used by the user application to setup the 00091 * SysTick timer or configure other parameters. It may also be used by debugger to 00092 * query the frequency of the debug timer or configure the trace clock speed 00093 * SystemCoreClock is initialized with a correct predefined value. 00094 */ 00095 extern uint32_t SystemCoreClock; 00096 00097 /** 00098 * @brief Setup the microcontroller system. 00099 * 00100 * Typically this function configures the oscillator (PLL) that is part of the 00101 * microcontroller device. For systems with variable clock speed it also updates 00102 * the variable SystemCoreClock. SystemInit is called from startup_device file. 00103 */ 00104 void SystemInit (void); 00105 00106 /** 00107 * @brief Updates the SystemCoreClock variable. 00108 * 00109 * It must be called whenever the core clock is changed during program 00110 * execution. SystemCoreClockUpdate() evaluates the clock register settings and calculates 00111 * the current core clock. 00112 */ 00113 void SystemCoreClockUpdate (void); 00114 00115 /** 00116 * @brief SystemInit function hook. 00117 * 00118 * This weak function allows to call specific initialization code during the 00119 * SystemInit() execution.This can be used when an application specific code needs 00120 * to be called as close to the reset entry as possible (for example the Multicore 00121 * Manager MCMGR_EarlyInit() function call). 00122 * NOTE: No global r/w variables can be used in this hook function because the 00123 * initialization of these variables happens after this function. 00124 */ 00125 void SystemInitHook (void); 00126 00127 #ifdef __cplusplus 00128 } 00129 #endif 00130 00131 #endif /* _SYSTEM_MK26F18_H_ */
Generated on Tue Jul 12 2022 15:37:24 by
1.7.2