1 /*
2 ** ###################################################################
3 **     Processors:          LPC54607J256BD208
4 **                          LPC54607J256ET180
5 **                          LPC54607J512ET180
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:    LPC546xx User manual Rev.1.9  5 June 2017
13 **     Version:             rev. 1.2, 2017-06-08
14 **     Build:               b200304
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:                 support@nxp.com
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 LPC54607
46  * @version 1.2
47  * @date 2017-06-08
48  * @brief Device specific configuration file for LPC54607 (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_LPC54607_H_
56 #define _SYSTEM_LPC54607_H_                      /**< Symbol preventing repeated inclusion */
57 
58 #ifdef __cplusplus
59 extern "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 /**
73  * @brief System clock frequency (core clock)
74  *
75  * The system clock frequency supplied to the SysTick timer and the processor
76  * core clock. This variable can be used by the user application to setup the
77  * SysTick timer or configure other parameters. It may also be used by debugger to
78  * query the frequency of the debug timer or configure the trace clock speed
79  * SystemCoreClock is initialized with a correct predefined value.
80  */
81 extern uint32_t SystemCoreClock;
82 
83 /**
84  * @brief Setup the microcontroller system.
85  *
86  * Typically this function configures the oscillator (PLL) that is part of the
87  * microcontroller device. For systems with variable clock speed it also updates
88  * the variable SystemCoreClock. SystemInit is called from startup_device file.
89  */
90 void SystemInit (void);
91 
92 /**
93  * @brief Updates the SystemCoreClock variable.
94  *
95  * It must be called whenever the core clock is changed during program
96  * execution. SystemCoreClockUpdate() evaluates the clock register settings and calculates
97  * the current core clock.
98  */
99 void SystemCoreClockUpdate (void);
100 
101 /**
102  * @brief SystemInit function hook.
103  *
104  * This weak function allows to call specific initialization code during the
105  * SystemInit() execution.This can be used when an application specific code needs
106  * to be called as close to the reset entry as possible (for example the Multicore
107  * Manager MCMGR_EarlyInit() function call).
108  * NOTE: No global r/w variables can be used in this hook function because the
109  * initialization of these variables happens after this function.
110  */
111 void SystemInitHook (void);
112 
113 #ifdef __cplusplus
114 }
115 #endif
116 
117 #endif  /* _SYSTEM_LPC54607_H_ */
118