1 /*
2 ** ###################################################################
3 **     Processors:          LPC864M201JBD64
4 **                          LPC864M201JHI33
5 **                          LPC864M201JHI48
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:    LPC86x User manual Rev.1  March 2022
13 **     Version:             rev. 1.0, 2022-03-15
14 **     Build:               b230713
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-2023 NXP
23 **     SPDX-License-Identifier: BSD-3-Clause
24 **
25 **     http:                 www.nxp.com
26 **     mail:                 support@nxp.com
27 **
28 **     Revisions:
29 **     - rev. 0.0 (2021-07-15)
30 **         Initial version.
31 **     - rev. 1.0 (2022-03-15)
32 **         Revesion of Rev. 1.
33 **
34 ** ###################################################################
35 */
36 
37 /*!
38  * @file LPC864
39  * @version 1.0
40  * @date 2022-03-15
41  * @brief Device specific configuration file for LPC864 (implementation file)
42  *
43  * Provides a system configuration function and a global variable that contains
44  * the system frequency. It configures the device and initializes the oscillator
45  * (PLL) that is part of the microcontroller device.
46  */
47 
48 #include <stdint.h>
49 #include "fsl_device_registers.h"
50 
51 
52 
53 
54 
55 /* ----------------------------------------------------------------------------
56    -- Core clock
57    ---------------------------------------------------------------------------- */
58 
59 uint32_t SystemCoreClock = DEFAULT_SYSTEM_CLOCK;
60 
61 /* ----------------------------------------------------------------------------
62    -- SystemInit()
63    ---------------------------------------------------------------------------- */
64 
SystemInit(void)65 void SystemInit (void) {
66 
67 #if defined(__MCUXPRESSO)
68     extern void(*const g_pfnVectors[]) (void);
69     SCB->VTOR = (uint32_t) &g_pfnVectors;
70 #else
71     extern void *__Vectors;
72     SCB->VTOR = (uint32_t) &__Vectors;
73 #endif
74     SystemCoreClock = DEFAULT_SYSTEM_CLOCK;
75   SystemInitHook();
76 }
77 
78 /* ----------------------------------------------------------------------------
79    -- SystemCoreClockUpdate()
80    ---------------------------------------------------------------------------- */
81 
SystemCoreClockUpdate(void)82 void SystemCoreClockUpdate (void) {
83 
84 }
85 
86 /* ----------------------------------------------------------------------------
87    -- SystemInitHook()
88    ---------------------------------------------------------------------------- */
89 
SystemInitHook(void)90 __attribute__ ((weak)) void SystemInitHook (void) {
91   /* Void implementation of the weak function. */
92 }
93