![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
Color Oled(SSD1331) connect to STMicroelectronics Nucleo-F466
mbed-os/targets/TARGET_Freescale/TARGET_MCUXpresso_MCUS/TARGET_K82F/device/system_MK82F25615.h@3:f3764f852aa8, 2018-10-11 (annotated)
- Committer:
- kadonotakashi
- Date:
- Thu Oct 11 02:27:46 2018 +0000
- Revision:
- 3:f3764f852aa8
- Parent:
- 0:8fdf9a60065b
Nucreo 446 + SSD1331 test version;
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
kadonotakashi | 0:8fdf9a60065b | 1 | /* |
kadonotakashi | 0:8fdf9a60065b | 2 | ** ################################################################### |
kadonotakashi | 0:8fdf9a60065b | 3 | ** Processors: MK82FN256CAx15 |
kadonotakashi | 0:8fdf9a60065b | 4 | ** MK82FN256VDC15 |
kadonotakashi | 0:8fdf9a60065b | 5 | ** MK82FN256VLL15 |
kadonotakashi | 0:8fdf9a60065b | 6 | ** MK82FN256VLQ15 |
kadonotakashi | 0:8fdf9a60065b | 7 | ** |
kadonotakashi | 0:8fdf9a60065b | 8 | ** Compilers: Keil ARM C/C++ Compiler |
kadonotakashi | 0:8fdf9a60065b | 9 | ** Freescale C/C++ for Embedded ARM |
kadonotakashi | 0:8fdf9a60065b | 10 | ** GNU C Compiler |
kadonotakashi | 0:8fdf9a60065b | 11 | ** IAR ANSI C/C++ Compiler for ARM |
kadonotakashi | 0:8fdf9a60065b | 12 | ** |
kadonotakashi | 0:8fdf9a60065b | 13 | ** Reference manual: K82P121M150SF5RM, Rev. 0, May 2015 |
kadonotakashi | 0:8fdf9a60065b | 14 | ** Version: rev. 1.2, 2015-07-29 |
kadonotakashi | 0:8fdf9a60065b | 15 | ** Build: b151216 |
kadonotakashi | 0:8fdf9a60065b | 16 | ** |
kadonotakashi | 0:8fdf9a60065b | 17 | ** Abstract: |
kadonotakashi | 0:8fdf9a60065b | 18 | ** Provides a system configuration function and a global variable that |
kadonotakashi | 0:8fdf9a60065b | 19 | ** contains the system frequency. It configures the device and initializes |
kadonotakashi | 0:8fdf9a60065b | 20 | ** the oscillator (PLL) that is part of the microcontroller device. |
kadonotakashi | 0:8fdf9a60065b | 21 | ** |
kadonotakashi | 0:8fdf9a60065b | 22 | ** Copyright (c) 2015 Freescale Semiconductor, Inc. |
kadonotakashi | 0:8fdf9a60065b | 23 | ** All rights reserved. |
kadonotakashi | 0:8fdf9a60065b | 24 | ** |
kadonotakashi | 0:8fdf9a60065b | 25 | ** Redistribution and use in source and binary forms, with or without modification, |
kadonotakashi | 0:8fdf9a60065b | 26 | ** are permitted provided that the following conditions are met: |
kadonotakashi | 0:8fdf9a60065b | 27 | ** |
kadonotakashi | 0:8fdf9a60065b | 28 | ** o Redistributions of source code must retain the above copyright notice, this list |
kadonotakashi | 0:8fdf9a60065b | 29 | ** of conditions and the following disclaimer. |
kadonotakashi | 0:8fdf9a60065b | 30 | ** |
kadonotakashi | 0:8fdf9a60065b | 31 | ** o Redistributions in binary form must reproduce the above copyright notice, this |
kadonotakashi | 0:8fdf9a60065b | 32 | ** list of conditions and the following disclaimer in the documentation and/or |
kadonotakashi | 0:8fdf9a60065b | 33 | ** other materials provided with the distribution. |
kadonotakashi | 0:8fdf9a60065b | 34 | ** |
kadonotakashi | 0:8fdf9a60065b | 35 | ** o Neither the name of Freescale Semiconductor, Inc. nor the names of its |
kadonotakashi | 0:8fdf9a60065b | 36 | ** contributors may be used to endorse or promote products derived from this |
kadonotakashi | 0:8fdf9a60065b | 37 | ** software without specific prior written permission. |
kadonotakashi | 0:8fdf9a60065b | 38 | ** |
kadonotakashi | 0:8fdf9a60065b | 39 | ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND |
kadonotakashi | 0:8fdf9a60065b | 40 | ** ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED |
kadonotakashi | 0:8fdf9a60065b | 41 | ** WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
kadonotakashi | 0:8fdf9a60065b | 42 | ** DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR |
kadonotakashi | 0:8fdf9a60065b | 43 | ** ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES |
kadonotakashi | 0:8fdf9a60065b | 44 | ** (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; |
kadonotakashi | 0:8fdf9a60065b | 45 | ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON |
kadonotakashi | 0:8fdf9a60065b | 46 | ** ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
kadonotakashi | 0:8fdf9a60065b | 47 | ** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS |
kadonotakashi | 0:8fdf9a60065b | 48 | ** SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
kadonotakashi | 0:8fdf9a60065b | 49 | ** |
kadonotakashi | 0:8fdf9a60065b | 50 | ** http: www.freescale.com |
kadonotakashi | 0:8fdf9a60065b | 51 | ** mail: support@freescale.com |
kadonotakashi | 0:8fdf9a60065b | 52 | ** |
kadonotakashi | 0:8fdf9a60065b | 53 | ** Revisions: |
kadonotakashi | 0:8fdf9a60065b | 54 | ** - rev. 1.0 (2015-04-09) |
kadonotakashi | 0:8fdf9a60065b | 55 | ** Initial version |
kadonotakashi | 0:8fdf9a60065b | 56 | ** - rev. 1.1 (2015-05-28) |
kadonotakashi | 0:8fdf9a60065b | 57 | ** Update according to the reference manual Rev. 0. |
kadonotakashi | 0:8fdf9a60065b | 58 | ** - rev. 1.2 (2015-07-29) |
kadonotakashi | 0:8fdf9a60065b | 59 | ** Correction of backward compatibility. |
kadonotakashi | 0:8fdf9a60065b | 60 | ** |
kadonotakashi | 0:8fdf9a60065b | 61 | ** ################################################################### |
kadonotakashi | 0:8fdf9a60065b | 62 | */ |
kadonotakashi | 0:8fdf9a60065b | 63 | |
kadonotakashi | 0:8fdf9a60065b | 64 | /*! |
kadonotakashi | 0:8fdf9a60065b | 65 | * @file MK82F25615 |
kadonotakashi | 0:8fdf9a60065b | 66 | * @version 1.2 |
kadonotakashi | 0:8fdf9a60065b | 67 | * @date 2015-07-29 |
kadonotakashi | 0:8fdf9a60065b | 68 | * @brief Device specific configuration file for MK82F25615 (header file) |
kadonotakashi | 0:8fdf9a60065b | 69 | * |
kadonotakashi | 0:8fdf9a60065b | 70 | * Provides a system configuration function and a global variable that contains |
kadonotakashi | 0:8fdf9a60065b | 71 | * the system frequency. It configures the device and initializes the oscillator |
kadonotakashi | 0:8fdf9a60065b | 72 | * (PLL) that is part of the microcontroller device. |
kadonotakashi | 0:8fdf9a60065b | 73 | */ |
kadonotakashi | 0:8fdf9a60065b | 74 | |
kadonotakashi | 0:8fdf9a60065b | 75 | #ifndef _SYSTEM_MK82F25615_H_ |
kadonotakashi | 0:8fdf9a60065b | 76 | #define _SYSTEM_MK82F25615_H_ /**< Symbol preventing repeated inclusion */ |
kadonotakashi | 0:8fdf9a60065b | 77 | |
kadonotakashi | 0:8fdf9a60065b | 78 | #ifdef __cplusplus |
kadonotakashi | 0:8fdf9a60065b | 79 | extern "C" { |
kadonotakashi | 0:8fdf9a60065b | 80 | #endif |
kadonotakashi | 0:8fdf9a60065b | 81 | |
kadonotakashi | 0:8fdf9a60065b | 82 | #include <stdint.h> |
kadonotakashi | 0:8fdf9a60065b | 83 | |
kadonotakashi | 0:8fdf9a60065b | 84 | |
kadonotakashi | 0:8fdf9a60065b | 85 | #ifndef DISABLE_WDOG |
kadonotakashi | 0:8fdf9a60065b | 86 | #define DISABLE_WDOG 1 |
kadonotakashi | 0:8fdf9a60065b | 87 | #endif |
kadonotakashi | 0:8fdf9a60065b | 88 | |
kadonotakashi | 0:8fdf9a60065b | 89 | /* Define clock source values */ |
kadonotakashi | 0:8fdf9a60065b | 90 | |
kadonotakashi | 0:8fdf9a60065b | 91 | #define CPU_XTAL_CLK_HZ 12000000U /* Value of the external crystal or oscillator clock frequency of the system oscillator (OSC) in Hz */ |
kadonotakashi | 0:8fdf9a60065b | 92 | #define CPU_XTAL32k_CLK_HZ 32768U /* Value of the external 32k crystal or oscillator clock frequency of the RTC in Hz */ |
kadonotakashi | 0:8fdf9a60065b | 93 | #define CPU_INT_SLOW_CLK_HZ 32768U /* Value of the slow internal oscillator clock frequency in Hz */ |
kadonotakashi | 0:8fdf9a60065b | 94 | #define CPU_INT_FAST_CLK_HZ 4000000U /* Value of the fast internal oscillator clock frequency in Hz */ |
kadonotakashi | 0:8fdf9a60065b | 95 | #define CPU_INT_IRC_CLK_HZ 48000000U /* Value of the 48M internal oscillator clock frequency in Hz */ |
kadonotakashi | 0:8fdf9a60065b | 96 | |
kadonotakashi | 0:8fdf9a60065b | 97 | /* RTC oscillator setting */ |
kadonotakashi | 0:8fdf9a60065b | 98 | /* RTC_CR: SC2P=0,SC4P=0,SC8P=0,SC16P=0,CLKO=1,OSCE=1,WPS=0,UM=0,SUP=0,WPE=0,SWR=0 */ |
kadonotakashi | 0:8fdf9a60065b | 99 | #define SYSTEM_RTC_CR_VALUE 0x0300U /* RTC_CR */ |
kadonotakashi | 0:8fdf9a60065b | 100 | |
kadonotakashi | 0:8fdf9a60065b | 101 | /* Low power mode enable */ |
kadonotakashi | 0:8fdf9a60065b | 102 | /* SMC_PMPROT: AHSRUN=1,AVLP=1,ALLS=1,AVLLS=1 */ |
kadonotakashi | 0:8fdf9a60065b | 103 | #define SYSTEM_SMC_PMPROT_VALUE 0xAAU /* SMC_PMPROT */ |
kadonotakashi | 0:8fdf9a60065b | 104 | |
kadonotakashi | 0:8fdf9a60065b | 105 | #define DEFAULT_SYSTEM_CLOCK 20971520u |
kadonotakashi | 0:8fdf9a60065b | 106 | |
kadonotakashi | 0:8fdf9a60065b | 107 | |
kadonotakashi | 0:8fdf9a60065b | 108 | /** |
kadonotakashi | 0:8fdf9a60065b | 109 | * @brief System clock frequency (core clock) |
kadonotakashi | 0:8fdf9a60065b | 110 | * |
kadonotakashi | 0:8fdf9a60065b | 111 | * The system clock frequency supplied to the SysTick timer and the processor |
kadonotakashi | 0:8fdf9a60065b | 112 | * core clock. This variable can be used by the user application to setup the |
kadonotakashi | 0:8fdf9a60065b | 113 | * SysTick timer or configure other parameters. It may also be used by debugger to |
kadonotakashi | 0:8fdf9a60065b | 114 | * query the frequency of the debug timer or configure the trace clock speed |
kadonotakashi | 0:8fdf9a60065b | 115 | * SystemCoreClock is initialized with a correct predefined value. |
kadonotakashi | 0:8fdf9a60065b | 116 | */ |
kadonotakashi | 0:8fdf9a60065b | 117 | extern uint32_t SystemCoreClock; |
kadonotakashi | 0:8fdf9a60065b | 118 | |
kadonotakashi | 0:8fdf9a60065b | 119 | /** |
kadonotakashi | 0:8fdf9a60065b | 120 | * @brief Setup the microcontroller system. |
kadonotakashi | 0:8fdf9a60065b | 121 | * |
kadonotakashi | 0:8fdf9a60065b | 122 | * Typically this function configures the oscillator (PLL) that is part of the |
kadonotakashi | 0:8fdf9a60065b | 123 | * microcontroller device. For systems with variable clock speed it also updates |
kadonotakashi | 0:8fdf9a60065b | 124 | * the variable SystemCoreClock. SystemInit is called from startup_device file. |
kadonotakashi | 0:8fdf9a60065b | 125 | */ |
kadonotakashi | 0:8fdf9a60065b | 126 | void SystemInit (void); |
kadonotakashi | 0:8fdf9a60065b | 127 | |
kadonotakashi | 0:8fdf9a60065b | 128 | /** |
kadonotakashi | 0:8fdf9a60065b | 129 | * @brief Updates the SystemCoreClock variable. |
kadonotakashi | 0:8fdf9a60065b | 130 | * |
kadonotakashi | 0:8fdf9a60065b | 131 | * It must be called whenever the core clock is changed during program |
kadonotakashi | 0:8fdf9a60065b | 132 | * execution. SystemCoreClockUpdate() evaluates the clock register settings and calculates |
kadonotakashi | 0:8fdf9a60065b | 133 | * the current core clock. |
kadonotakashi | 0:8fdf9a60065b | 134 | */ |
kadonotakashi | 0:8fdf9a60065b | 135 | void SystemCoreClockUpdate (void); |
kadonotakashi | 0:8fdf9a60065b | 136 | |
kadonotakashi | 0:8fdf9a60065b | 137 | #ifdef __cplusplus |
kadonotakashi | 0:8fdf9a60065b | 138 | } |
kadonotakashi | 0:8fdf9a60065b | 139 | #endif |
kadonotakashi | 0:8fdf9a60065b | 140 | |
kadonotakashi | 0:8fdf9a60065b | 141 | #endif /* _SYSTEM_MK82F25615_H_ */ |