mbed official / mbed

Dependents:   hello SerialTestv11 SerialTestv12 Sierpinski ... more

Committer:
Kojto
Date:
Tue May 10 12:23:43 2016 -0500
Revision:
120:7c328cabac7e
Parent:
90:cb3d968589d8
Release 120 of the mbed library

Changes:
- ST - STMF3XX/F4XX - directories removal
- STMF3 - pwm range fix
- STMF1 - Cube driver update
- Renesas - RZ_A1H - async i2c, serial and spi addition
- Freescale - KSDK2 update

Who changed what in which revision?

UserRevisionLine numberNew contents of line
bogdanm 82:6473597d706e 1 /*
bogdanm 82:6473597d706e 2 ** ###################################################################
Kojto 120:7c328cabac7e 3 ** Processors: MK64FN1M0VDC12
Kojto 120:7c328cabac7e 4 ** MK64FN1M0VLL12
Kojto 120:7c328cabac7e 5 ** MK64FN1M0VLQ12
Kojto 120:7c328cabac7e 6 ** MK64FN1M0VMD12
Kojto 120:7c328cabac7e 7 ** MK64FX512VDC12
Kojto 120:7c328cabac7e 8 ** MK64FX512VLL12
Kojto 120:7c328cabac7e 9 ** MK64FX512VLQ12
Kojto 120:7c328cabac7e 10 ** MK64FX512VMD12
Kojto 120:7c328cabac7e 11 **
Kojto 90:cb3d968589d8 12 ** Compilers: Keil ARM C/C++ Compiler
bogdanm 82:6473597d706e 13 ** Freescale C/C++ for Embedded ARM
bogdanm 82:6473597d706e 14 ** GNU C Compiler
bogdanm 82:6473597d706e 15 ** IAR ANSI C/C++ Compiler for ARM
bogdanm 82:6473597d706e 16 **
Kojto 90:cb3d968589d8 17 ** Reference manual: K64P144M120SF5RM, Rev.2, January 2014
Kojto 120:7c328cabac7e 18 ** Version: rev. 2.8, 2015-02-19
Kojto 120:7c328cabac7e 19 ** Build: b151216
bogdanm 82:6473597d706e 20 **
bogdanm 82:6473597d706e 21 ** Abstract:
bogdanm 82:6473597d706e 22 ** Provides a system configuration function and a global variable that
bogdanm 82:6473597d706e 23 ** contains the system frequency. It configures the device and initializes
bogdanm 82:6473597d706e 24 ** the oscillator (PLL) that is part of the microcontroller device.
bogdanm 82:6473597d706e 25 **
Kojto 120:7c328cabac7e 26 ** Copyright (c) 2015 Freescale Semiconductor, Inc.
Kojto 90:cb3d968589d8 27 ** All rights reserved.
Kojto 90:cb3d968589d8 28 **
Kojto 90:cb3d968589d8 29 ** Redistribution and use in source and binary forms, with or without modification,
Kojto 90:cb3d968589d8 30 ** are permitted provided that the following conditions are met:
Kojto 90:cb3d968589d8 31 **
Kojto 90:cb3d968589d8 32 ** o Redistributions of source code must retain the above copyright notice, this list
Kojto 90:cb3d968589d8 33 ** of conditions and the following disclaimer.
Kojto 90:cb3d968589d8 34 **
Kojto 90:cb3d968589d8 35 ** o Redistributions in binary form must reproduce the above copyright notice, this
Kojto 90:cb3d968589d8 36 ** list of conditions and the following disclaimer in the documentation and/or
Kojto 90:cb3d968589d8 37 ** other materials provided with the distribution.
Kojto 90:cb3d968589d8 38 **
Kojto 90:cb3d968589d8 39 ** o Neither the name of Freescale Semiconductor, Inc. nor the names of its
Kojto 90:cb3d968589d8 40 ** contributors may be used to endorse or promote products derived from this
Kojto 90:cb3d968589d8 41 ** software without specific prior written permission.
Kojto 90:cb3d968589d8 42 **
Kojto 90:cb3d968589d8 43 ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
Kojto 90:cb3d968589d8 44 ** ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
Kojto 90:cb3d968589d8 45 ** WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
Kojto 90:cb3d968589d8 46 ** DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
Kojto 90:cb3d968589d8 47 ** ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
Kojto 90:cb3d968589d8 48 ** (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
Kojto 90:cb3d968589d8 49 ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
Kojto 90:cb3d968589d8 50 ** ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
Kojto 90:cb3d968589d8 51 ** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
Kojto 90:cb3d968589d8 52 ** SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
bogdanm 82:6473597d706e 53 **
bogdanm 82:6473597d706e 54 ** http: www.freescale.com
bogdanm 82:6473597d706e 55 ** mail: support@freescale.com
bogdanm 82:6473597d706e 56 **
bogdanm 82:6473597d706e 57 ** Revisions:
bogdanm 82:6473597d706e 58 ** - rev. 1.0 (2013-08-12)
bogdanm 82:6473597d706e 59 ** Initial version.
bogdanm 82:6473597d706e 60 ** - rev. 2.0 (2013-10-29)
bogdanm 82:6473597d706e 61 ** Register accessor macros added to the memory map.
bogdanm 82:6473597d706e 62 ** Symbols for Processor Expert memory map compatibility added to the memory map.
bogdanm 82:6473597d706e 63 ** Startup file for gcc has been updated according to CMSIS 3.2.
bogdanm 82:6473597d706e 64 ** System initialization updated.
bogdanm 82:6473597d706e 65 ** MCG - registers updated.
bogdanm 82:6473597d706e 66 ** PORTA, PORTB, PORTC, PORTE - registers for digital filter removed.
Kojto 90:cb3d968589d8 67 ** - rev. 2.1 (2013-10-30)
bogdanm 82:6473597d706e 68 ** Definition of BITBAND macros updated to support peripherals with 32-bit acces disabled.
Kojto 90:cb3d968589d8 69 ** - rev. 2.2 (2013-12-09)
Kojto 90:cb3d968589d8 70 ** DMA - EARS register removed.
Kojto 90:cb3d968589d8 71 ** AIPS0, AIPS1 - MPRA register updated.
Kojto 90:cb3d968589d8 72 ** - rev. 2.3 (2014-01-24)
Kojto 90:cb3d968589d8 73 ** Update according to reference manual rev. 2
Kojto 90:cb3d968589d8 74 ** ENET, MCG, MCM, SIM, USB - registers updated
Kojto 90:cb3d968589d8 75 ** - rev. 2.4 (2014-02-10)
Kojto 90:cb3d968589d8 76 ** The declaration of clock configurations has been moved to separate header file system_MK64F12.h
Kojto 90:cb3d968589d8 77 ** Update of SystemInit() and SystemCoreClockUpdate() functions.
Kojto 90:cb3d968589d8 78 ** - rev. 2.5 (2014-02-10)
Kojto 90:cb3d968589d8 79 ** The declaration of clock configurations has been moved to separate header file system_MK64F12.h
Kojto 90:cb3d968589d8 80 ** Update of SystemInit() and SystemCoreClockUpdate() functions.
Kojto 90:cb3d968589d8 81 ** Module access macro module_BASES replaced by module_BASE_PTRS.
Kojto 120:7c328cabac7e 82 ** - rev. 2.6 (2014-08-28)
Kojto 120:7c328cabac7e 83 ** Update of system files - default clock configuration changed.
Kojto 120:7c328cabac7e 84 ** Update of startup files - possibility to override DefaultISR added.
Kojto 120:7c328cabac7e 85 ** - rev. 2.7 (2014-10-14)
Kojto 120:7c328cabac7e 86 ** Interrupt INT_LPTimer renamed to INT_LPTMR0, interrupt INT_Watchdog renamed to INT_WDOG_EWM.
Kojto 120:7c328cabac7e 87 ** - rev. 2.8 (2015-02-19)
Kojto 120:7c328cabac7e 88 ** Renamed interrupt vector LLW to LLWU.
bogdanm 82:6473597d706e 89 **
bogdanm 82:6473597d706e 90 ** ###################################################################
bogdanm 82:6473597d706e 91 */
bogdanm 82:6473597d706e 92
bogdanm 82:6473597d706e 93 /*!
bogdanm 82:6473597d706e 94 * @file MK64F12
Kojto 120:7c328cabac7e 95 * @version 2.8
Kojto 120:7c328cabac7e 96 * @date 2015-02-19
bogdanm 82:6473597d706e 97 * @brief Device specific configuration file for MK64F12 (header file)
bogdanm 82:6473597d706e 98 *
bogdanm 82:6473597d706e 99 * Provides a system configuration function and a global variable that contains
bogdanm 82:6473597d706e 100 * the system frequency. It configures the device and initializes the oscillator
bogdanm 82:6473597d706e 101 * (PLL) that is part of the microcontroller device.
bogdanm 82:6473597d706e 102 */
bogdanm 82:6473597d706e 103
Kojto 120:7c328cabac7e 104 #ifndef _SYSTEM_MK64F12_H_
Kojto 120:7c328cabac7e 105 #define _SYSTEM_MK64F12_H_ /**< Symbol preventing repeated inclusion */
bogdanm 82:6473597d706e 106
bogdanm 82:6473597d706e 107 #ifdef __cplusplus
bogdanm 82:6473597d706e 108 extern "C" {
bogdanm 82:6473597d706e 109 #endif
bogdanm 82:6473597d706e 110
bogdanm 82:6473597d706e 111 #include <stdint.h>
bogdanm 82:6473597d706e 112
Kojto 90:cb3d968589d8 113
Kojto 120:7c328cabac7e 114 #ifndef DISABLE_WDOG
Kojto 120:7c328cabac7e 115 #define DISABLE_WDOG 1
Kojto 90:cb3d968589d8 116 #endif
Kojto 90:cb3d968589d8 117
Kojto 90:cb3d968589d8 118 #define CPU_XTAL_CLK_HZ 50000000u /* Value of the external crystal or oscillator clock frequency in Hz */
Kojto 90:cb3d968589d8 119 #define CPU_XTAL32k_CLK_HZ 32768u /* Value of the external 32k crystal or oscillator clock frequency in Hz */
Kojto 90:cb3d968589d8 120 #define CPU_INT_SLOW_CLK_HZ 32768u /* Value of the slow internal oscillator clock frequency in Hz */
Kojto 90:cb3d968589d8 121 #define CPU_INT_FAST_CLK_HZ 4000000u /* Value of the fast internal oscillator clock frequency in Hz */
Kojto 90:cb3d968589d8 122 #define CPU_INT_IRC_CLK_HZ 48000000u /* Value of the 48M internal oscillator clock frequency in Hz */
Kojto 90:cb3d968589d8 123
Kojto 90:cb3d968589d8 124 /* RTC oscillator setting */
Kojto 90:cb3d968589d8 125 /* RTC_CR: SC2P=0,SC4P=0,SC8P=0,SC16P=0,CLKO=1,OSCE=1,WPS=0,UM=0,SUP=0,WPE=0,SWR=0 */
Kojto 90:cb3d968589d8 126 #define SYSTEM_RTC_CR_VALUE 0x0300U /* RTC_CR */
Kojto 90:cb3d968589d8 127
Kojto 90:cb3d968589d8 128 /* Low power mode enable */
Kojto 90:cb3d968589d8 129 /* SMC_PMPROT: AVLP=1,ALLS=1,AVLLS=1 */
Kojto 90:cb3d968589d8 130 #define SYSTEM_SMC_PMPROT_VALUE 0x2AU /* SMC_PMPROT */
Kojto 90:cb3d968589d8 131
Kojto 120:7c328cabac7e 132 #define DEFAULT_SYSTEM_CLOCK 20971520u /* Default System clock value */
Kojto 90:cb3d968589d8 133
Kojto 90:cb3d968589d8 134
bogdanm 82:6473597d706e 135 /**
bogdanm 82:6473597d706e 136 * @brief System clock frequency (core clock)
bogdanm 82:6473597d706e 137 *
bogdanm 82:6473597d706e 138 * The system clock frequency supplied to the SysTick timer and the processor
bogdanm 82:6473597d706e 139 * core clock. This variable can be used by the user application to setup the
bogdanm 82:6473597d706e 140 * SysTick timer or configure other parameters. It may also be used by debugger to
bogdanm 82:6473597d706e 141 * query the frequency of the debug timer or configure the trace clock speed
bogdanm 82:6473597d706e 142 * SystemCoreClock is initialized with a correct predefined value.
bogdanm 82:6473597d706e 143 */
bogdanm 82:6473597d706e 144 extern uint32_t SystemCoreClock;
bogdanm 82:6473597d706e 145
bogdanm 82:6473597d706e 146 /**
bogdanm 82:6473597d706e 147 * @brief Setup the microcontroller system.
bogdanm 82:6473597d706e 148 *
bogdanm 82:6473597d706e 149 * Typically this function configures the oscillator (PLL) that is part of the
bogdanm 82:6473597d706e 150 * microcontroller device. For systems with variable clock speed it also updates
bogdanm 82:6473597d706e 151 * the variable SystemCoreClock. SystemInit is called from startup_device file.
bogdanm 82:6473597d706e 152 */
bogdanm 82:6473597d706e 153 void SystemInit (void);
bogdanm 82:6473597d706e 154
bogdanm 82:6473597d706e 155 /**
bogdanm 82:6473597d706e 156 * @brief Updates the SystemCoreClock variable.
bogdanm 82:6473597d706e 157 *
bogdanm 82:6473597d706e 158 * It must be called whenever the core clock is changed during program
bogdanm 82:6473597d706e 159 * execution. SystemCoreClockUpdate() evaluates the clock register settings and calculates
bogdanm 82:6473597d706e 160 * the current core clock.
bogdanm 82:6473597d706e 161 */
bogdanm 82:6473597d706e 162 void SystemCoreClockUpdate (void);
bogdanm 82:6473597d706e 163
bogdanm 82:6473597d706e 164 #ifdef __cplusplus
bogdanm 82:6473597d706e 165 }
bogdanm 82:6473597d706e 166 #endif
bogdanm 82:6473597d706e 167
Kojto 120:7c328cabac7e 168 #endif /* _SYSTEM_MK64F12_H_ */