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