1 /*
2 ** ###################################################################
3 **     Processor:           LPC811M001JDH16
4 **     Compilers:           GNU C Compiler
5 **                          IAR ANSI C/C++ Compiler for ARM
6 **                          Keil ARM C/C++ Compiler
7 **                          MCUXpresso Compiler
8 **
9 **     Reference manual:    LPC81x User manual Rev.1.6  2 April 2014
10 **     Version:             rev. 1.2, 2017-06-08
11 **     Build:               b200513
12 **
13 **     Abstract:
14 **         Provides a system configuration function and a global variable that
15 **         contains the system frequency. It configures the device and initializes
16 **         the oscillator (PLL) that is part of the microcontroller device.
17 **
18 **     Copyright 2016 Freescale Semiconductor, Inc.
19 **     Copyright 2016-2020 NXP
20 **     All rights reserved.
21 **
22 **     SPDX-License-Identifier: BSD-3-Clause
23 **
24 **     http:                 www.nxp.com
25 **     mail:                 support@nxp.com
26 **
27 **     Revisions:
28 **     - rev. 1.0 (2016-08-12)
29 **         Initial version.
30 **     - rev. 1.1 (2016-11-25)
31 **         Update CANFD and Classic CAN register.
32 **         Add MAC TIMERSTAMP registers.
33 **     - rev. 1.2 (2017-06-08)
34 **         Remove RTC_CTRL_RTC_OSC_BYPASS.
35 **         SYSCON_ARMTRCLKDIV rename to SYSCON_ARMTRACECLKDIV.
36 **         Remove RESET and HALT from SYSCON_AHBCLKDIV.
37 **
38 ** ###################################################################
39 */
40 
41 /*!
42  * @file LPC811
43  * @version 1.2
44  * @date 2017-06-08
45  * @brief Device specific configuration file for LPC811 (header file)
46  *
47  * Provides a system configuration function and a global variable that contains
48  * the system frequency. It configures the device and initializes the oscillator
49  * (PLL) that is part of the microcontroller device.
50  */
51 
52 #ifndef _SYSTEM_LPC811_H_
53 #define _SYSTEM_LPC811_H_                        /**< Symbol preventing repeated inclusion */
54 
55 #ifdef __cplusplus
56 extern "C" {
57 #endif
58 
59 #include <stdint.h>
60 
61 #define DEFAULT_SYSTEM_CLOCK           12000000u           /* Default System clock value */
62 #define CLK_RTC_32K_CLK                   32768u           /* RTC oscillator 32 kHz output (32k_clk */
63 #define CLK_IRC_12MHZ                  12000000u           /* FRO 12 MHz (fro_12m) */
64 #define CLK_OSC_IN                     12000000u           /* Oscillator input */
65 #define EXT_CLK_IN                     0u                  /* ext clkin  */
66 
67 
68 /**
69  * @brief System clock frequency (core clock)
70  *
71  * The system clock frequency supplied to the SysTick timer and the processor
72  * core clock. This variable can be used by the user application to setup the
73  * SysTick timer or configure other parameters. It may also be used by debugger to
74  * query the frequency of the debug timer or configure the trace clock speed
75  * SystemCoreClock is initialized with a correct predefined value.
76  */
77 extern uint32_t SystemCoreClock;
78 
79 /**
80  * @brief Setup the microcontroller system.
81  *
82  * Typically this function configures the oscillator (PLL) that is part of the
83  * microcontroller device. For systems with variable clock speed it also updates
84  * the variable SystemCoreClock. SystemInit is called from startup_device file.
85  */
86 void SystemInit (void);
87 
88 /**
89  * @brief Updates the SystemCoreClock variable.
90  *
91  * It must be called whenever the core clock is changed during program
92  * execution. SystemCoreClockUpdate() evaluates the clock register settings and calculates
93  * the current core clock.
94  */
95 void SystemCoreClockUpdate (void);
96 
97 /**
98  * @brief SystemInit function hook.
99  *
100  * This weak function allows to call specific initialization code during the
101  * SystemInit() execution.This can be used when an application specific code needs
102  * to be called as close to the reset entry as possible (for example the Multicore
103  * Manager MCMGR_EarlyInit() function call).
104  * NOTE: No global r/w variables can be used in this hook function because the
105  * initialization of these variables happens after this function.
106  */
107 void SystemInitHook (void);
108 
109 #ifdef __cplusplus
110 }
111 #endif
112 
113 #endif  /* _SYSTEM_LPC811_H_ */
114