The official Mbed 2 C/C++ SDK provides the software platform and libraries to build your applications.
Dependents: hello SerialTestv11 SerialTestv12 Sierpinski ... more
mbed 2
This is the mbed 2 library. If you'd like to learn about Mbed OS please see the mbed-os docs.
TARGET_LPC546XX/TOOLCHAIN_IAR/system_LPC54628.h@171:3a7713b1edbc, 2018-11-08 (annotated)
- Committer:
- AnnaBridge
- Date:
- Thu Nov 08 11:45:42 2018 +0000
- Revision:
- 171:3a7713b1edbc
- Parent:
- TARGET_LPC546XX/TARGET_NXP/TARGET_MCUXpresso_MCUS/TARGET_LPC546XX/device/system_LPC54628.h@163:e59c8e839560
mbed library. Release version 164
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
AnnaBridge | 163:e59c8e839560 | 1 | /* |
AnnaBridge | 163:e59c8e839560 | 2 | ** ################################################################### |
AnnaBridge | 163:e59c8e839560 | 3 | ** Processor: LPC54628J512ET180 |
AnnaBridge | 163:e59c8e839560 | 4 | ** Compilers: Keil ARM C/C++ Compiler |
AnnaBridge | 163:e59c8e839560 | 5 | ** GNU C Compiler |
AnnaBridge | 163:e59c8e839560 | 6 | ** IAR ANSI C/C++ Compiler for ARM |
AnnaBridge | 163:e59c8e839560 | 7 | ** MCUXpresso Compiler |
AnnaBridge | 163:e59c8e839560 | 8 | ** |
AnnaBridge | 163:e59c8e839560 | 9 | ** Reference manual: LPC546xx User manual Rev.1.9 5 June 2017 |
AnnaBridge | 163:e59c8e839560 | 10 | ** Version: rev. 1.2, 2017-06-08 |
AnnaBridge | 163:e59c8e839560 | 11 | ** Build: b170609 |
AnnaBridge | 163:e59c8e839560 | 12 | ** |
AnnaBridge | 163:e59c8e839560 | 13 | ** Abstract: |
AnnaBridge | 163:e59c8e839560 | 14 | ** Provides a system configuration function and a global variable that |
AnnaBridge | 163:e59c8e839560 | 15 | ** contains the system frequency. It configures the device and initializes |
AnnaBridge | 163:e59c8e839560 | 16 | ** the oscillator (PLL) that is part of the microcontroller device. |
AnnaBridge | 163:e59c8e839560 | 17 | ** |
AnnaBridge | 163:e59c8e839560 | 18 | ** Copyright 2016 Freescale Semiconductor, Inc. |
AnnaBridge | 163:e59c8e839560 | 19 | ** Copyright 2016-2017 NXP |
AnnaBridge | 163:e59c8e839560 | 20 | ** Redistribution and use in source and binary forms, with or without modification, |
AnnaBridge | 163:e59c8e839560 | 21 | ** are permitted provided that the following conditions are met: |
AnnaBridge | 163:e59c8e839560 | 22 | ** |
AnnaBridge | 163:e59c8e839560 | 23 | ** 1. Redistributions of source code must retain the above copyright notice, this list |
AnnaBridge | 163:e59c8e839560 | 24 | ** of conditions and the following disclaimer. |
AnnaBridge | 163:e59c8e839560 | 25 | ** |
AnnaBridge | 163:e59c8e839560 | 26 | ** 2. Redistributions in binary form must reproduce the above copyright notice, this |
AnnaBridge | 163:e59c8e839560 | 27 | ** list of conditions and the following disclaimer in the documentation and/or |
AnnaBridge | 163:e59c8e839560 | 28 | ** other materials provided with the distribution. |
AnnaBridge | 163:e59c8e839560 | 29 | ** |
AnnaBridge | 163:e59c8e839560 | 30 | ** 3. Neither the name of the copyright holder nor the names of its |
AnnaBridge | 163:e59c8e839560 | 31 | ** contributors may be used to endorse or promote products derived from this |
AnnaBridge | 163:e59c8e839560 | 32 | ** software without specific prior written permission. |
AnnaBridge | 163:e59c8e839560 | 33 | ** |
AnnaBridge | 163:e59c8e839560 | 34 | ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND |
AnnaBridge | 163:e59c8e839560 | 35 | ** ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED |
AnnaBridge | 163:e59c8e839560 | 36 | ** WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
AnnaBridge | 163:e59c8e839560 | 37 | ** DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR |
AnnaBridge | 163:e59c8e839560 | 38 | ** ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES |
AnnaBridge | 163:e59c8e839560 | 39 | ** (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; |
AnnaBridge | 163:e59c8e839560 | 40 | ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON |
AnnaBridge | 163:e59c8e839560 | 41 | ** ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
AnnaBridge | 163:e59c8e839560 | 42 | ** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS |
AnnaBridge | 163:e59c8e839560 | 43 | ** SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
AnnaBridge | 163:e59c8e839560 | 44 | ** |
AnnaBridge | 163:e59c8e839560 | 45 | ** http: www.nxp.com |
AnnaBridge | 163:e59c8e839560 | 46 | ** mail: support@nxp.com |
AnnaBridge | 163:e59c8e839560 | 47 | ** |
AnnaBridge | 163:e59c8e839560 | 48 | ** Revisions: |
AnnaBridge | 163:e59c8e839560 | 49 | ** - rev. 1.0 (2016-08-12) |
AnnaBridge | 163:e59c8e839560 | 50 | ** Initial version. |
AnnaBridge | 163:e59c8e839560 | 51 | ** - rev. 1.1 (2016-11-25) |
AnnaBridge | 163:e59c8e839560 | 52 | ** Update CANFD and Classic CAN register. |
AnnaBridge | 163:e59c8e839560 | 53 | ** Add MAC TIMERSTAMP registers. |
AnnaBridge | 163:e59c8e839560 | 54 | ** - rev. 1.2 (2017-06-08) |
AnnaBridge | 163:e59c8e839560 | 55 | ** Remove RTC_CTRL_RTC_OSC_BYPASS. |
AnnaBridge | 163:e59c8e839560 | 56 | ** SYSCON_ARMTRCLKDIV rename to SYSCON_ARMTRACECLKDIV. |
AnnaBridge | 163:e59c8e839560 | 57 | ** Remove RESET and HALT from SYSCON_AHBCLKDIV. |
AnnaBridge | 163:e59c8e839560 | 58 | ** |
AnnaBridge | 163:e59c8e839560 | 59 | ** ################################################################### |
AnnaBridge | 163:e59c8e839560 | 60 | */ |
AnnaBridge | 163:e59c8e839560 | 61 | |
AnnaBridge | 163:e59c8e839560 | 62 | /*! |
AnnaBridge | 163:e59c8e839560 | 63 | * @file LPC54628 |
AnnaBridge | 163:e59c8e839560 | 64 | * @version 1.2 |
AnnaBridge | 163:e59c8e839560 | 65 | * @date 2017-06-08 |
AnnaBridge | 163:e59c8e839560 | 66 | * @brief Device specific configuration file for LPC54628 (header file) |
AnnaBridge | 163:e59c8e839560 | 67 | * |
AnnaBridge | 163:e59c8e839560 | 68 | * Provides a system configuration function and a global variable that contains |
AnnaBridge | 163:e59c8e839560 | 69 | * the system frequency. It configures the device and initializes the oscillator |
AnnaBridge | 163:e59c8e839560 | 70 | * (PLL) that is part of the microcontroller device. |
AnnaBridge | 163:e59c8e839560 | 71 | */ |
AnnaBridge | 163:e59c8e839560 | 72 | |
AnnaBridge | 163:e59c8e839560 | 73 | #ifndef _SYSTEM_LPC54628_H_ |
AnnaBridge | 163:e59c8e839560 | 74 | #define _SYSTEM_LPC54628_H_ /**< Symbol preventing repeated inclusion */ |
AnnaBridge | 163:e59c8e839560 | 75 | |
AnnaBridge | 163:e59c8e839560 | 76 | #ifdef __cplusplus |
AnnaBridge | 163:e59c8e839560 | 77 | extern "C" { |
AnnaBridge | 163:e59c8e839560 | 78 | #endif |
AnnaBridge | 163:e59c8e839560 | 79 | |
AnnaBridge | 163:e59c8e839560 | 80 | #include <stdint.h> |
AnnaBridge | 163:e59c8e839560 | 81 | |
AnnaBridge | 163:e59c8e839560 | 82 | #define DEFAULT_SYSTEM_CLOCK 12000000u /* Default System clock value */ |
AnnaBridge | 163:e59c8e839560 | 83 | #define CLK_RTC_32K_CLK 32768u /* RTC oscillator 32 kHz output (32k_clk */ |
AnnaBridge | 163:e59c8e839560 | 84 | #define CLK_FRO_12MHZ 12000000u /* FRO 12 MHz (fro_12m) */ |
AnnaBridge | 163:e59c8e839560 | 85 | #define CLK_FRO_48MHZ 48000000u /* FRO 48 MHz (fro_48m) */ |
AnnaBridge | 163:e59c8e839560 | 86 | #define CLK_FRO_96MHZ 96000000u /* FRO 96 MHz (fro_96m) */ |
AnnaBridge | 163:e59c8e839560 | 87 | #define CLK_CLK_IN 0u /* Default CLK_IN pin clock */ |
AnnaBridge | 163:e59c8e839560 | 88 | |
AnnaBridge | 163:e59c8e839560 | 89 | |
AnnaBridge | 163:e59c8e839560 | 90 | /** |
AnnaBridge | 163:e59c8e839560 | 91 | * @brief System clock frequency (core clock) |
AnnaBridge | 163:e59c8e839560 | 92 | * |
AnnaBridge | 163:e59c8e839560 | 93 | * The system clock frequency supplied to the SysTick timer and the processor |
AnnaBridge | 163:e59c8e839560 | 94 | * core clock. This variable can be used by the user application to setup the |
AnnaBridge | 163:e59c8e839560 | 95 | * SysTick timer or configure other parameters. It may also be used by debugger to |
AnnaBridge | 163:e59c8e839560 | 96 | * query the frequency of the debug timer or configure the trace clock speed |
AnnaBridge | 163:e59c8e839560 | 97 | * SystemCoreClock is initialized with a correct predefined value. |
AnnaBridge | 163:e59c8e839560 | 98 | */ |
AnnaBridge | 163:e59c8e839560 | 99 | extern uint32_t SystemCoreClock; |
AnnaBridge | 163:e59c8e839560 | 100 | |
AnnaBridge | 163:e59c8e839560 | 101 | /** |
AnnaBridge | 163:e59c8e839560 | 102 | * @brief Setup the microcontroller system. |
AnnaBridge | 163:e59c8e839560 | 103 | * |
AnnaBridge | 163:e59c8e839560 | 104 | * Typically this function configures the oscillator (PLL) that is part of the |
AnnaBridge | 163:e59c8e839560 | 105 | * microcontroller device. For systems with variable clock speed it also updates |
AnnaBridge | 163:e59c8e839560 | 106 | * the variable SystemCoreClock. SystemInit is called from startup_device file. |
AnnaBridge | 163:e59c8e839560 | 107 | */ |
AnnaBridge | 163:e59c8e839560 | 108 | void SystemInit (void); |
AnnaBridge | 163:e59c8e839560 | 109 | |
AnnaBridge | 163:e59c8e839560 | 110 | /** |
AnnaBridge | 163:e59c8e839560 | 111 | * @brief Updates the SystemCoreClock variable. |
AnnaBridge | 163:e59c8e839560 | 112 | * |
AnnaBridge | 163:e59c8e839560 | 113 | * It must be called whenever the core clock is changed during program |
AnnaBridge | 163:e59c8e839560 | 114 | * execution. SystemCoreClockUpdate() evaluates the clock register settings and calculates |
AnnaBridge | 163:e59c8e839560 | 115 | * the current core clock. |
AnnaBridge | 163:e59c8e839560 | 116 | */ |
AnnaBridge | 163:e59c8e839560 | 117 | void SystemCoreClockUpdate (void); |
AnnaBridge | 163:e59c8e839560 | 118 | |
AnnaBridge | 163:e59c8e839560 | 119 | #ifdef __cplusplus |
AnnaBridge | 163:e59c8e839560 | 120 | } |
AnnaBridge | 163:e59c8e839560 | 121 | #endif |
AnnaBridge | 163:e59c8e839560 | 122 | |
AnnaBridge | 163:e59c8e839560 | 123 | #endif /* _SYSTEM_LPC54628_H_ */ |