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