1 /*
2 ** ###################################################################
3 **     Processors:          LPC865M201JBD64
4 **                          LPC865M201JHI33
5 **                          LPC865M201JHI48
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:               b230301
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 **     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. 0.0 (2021-07-15)
32 **         Initial version.
33 **     - rev. 1.0 (2022-03-15)
34 **         Revesion of Rev. 1.
35 **
36 ** ###################################################################
37 */
38 
39 /*!
40  * @file LPC865
41  * @version 1.0
42  * @date 2022-03-15
43  * @brief Device specific configuration file for LPC865 (implementation file)
44  *
45  * Provides a system configuration function and a global variable that contains
46  * the system frequency. It configures the device and initializes the oscillator
47  * (PLL) that is part of the microcontroller device.
48  */
49 
50 #include <stdint.h>
51 #include "fsl_device_registers.h"
52 
53 
54 
55 
56 
57 /* ----------------------------------------------------------------------------
58    -- Core clock
59    ---------------------------------------------------------------------------- */
60 
61 uint32_t SystemCoreClock = DEFAULT_SYSTEM_CLOCK;
62 
63 /* ----------------------------------------------------------------------------
64    -- SystemInit()
65    ---------------------------------------------------------------------------- */
66 
SystemInit(void)67 void SystemInit (void) {
68 
69 #if defined(__MCUXPRESSO)
70     extern void(*const g_pfnVectors[]) (void);
71     SCB->VTOR = (uint32_t) &g_pfnVectors;
72 #else
73     extern void *__Vectors;
74     SCB->VTOR = (uint32_t) &__Vectors;
75 #endif
76     SystemCoreClock = DEFAULT_SYSTEM_CLOCK;
77   SystemInitHook();
78 }
79 
80 /* ----------------------------------------------------------------------------
81    -- SystemCoreClockUpdate()
82    ---------------------------------------------------------------------------- */
83 
SystemCoreClockUpdate(void)84 void SystemCoreClockUpdate (void) {
85 
86 }
87 
88 /* ----------------------------------------------------------------------------
89    -- SystemInitHook()
90    ---------------------------------------------------------------------------- */
91 
SystemInitHook(void)92 __attribute__ ((weak)) void SystemInitHook (void) {
93   /* Void implementation of the weak function. */
94 }
95