1 /*
2 ** ###################################################################
3 ** Processors: MIMX8MN6CUCIZ
4 ** MIMX8MN6CVTIZ
5 ** MIMX8MN6DUCJZ
6 ** MIMX8MN6DVTJZ
7 **
8 ** Compilers: GNU C Compiler
9 ** IAR ANSI C/C++ Compiler for ARM
10 ** Keil ARM C/C++ Compiler
11 **
12 ** Reference manual: MX8MNRM, Rev.B, 07/2019
13 ** Version: rev. 2.0, 2019-09-23
14 ** Build: b211020
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-2021 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 (2019-04-22)
32 ** Initial version.
33 ** - rev. 2.0 (2019-09-23)
34 ** Rev.B Header RFP
35 **
36 ** ###################################################################
37 */
38
39 /*!
40 * @file MIMX8MN6_ca53
41 * @version 2.0
42 * @date 2019-09-23
43 * @brief Device specific configuration file for MIMX8MN6_ca53 (implementation
44 * file)
45 *
46 * Provides a system configuration function and a global variable that contains
47 * the system frequency. It configures the device and initializes the oscillator
48 * (PLL) that is part of the microcontroller device.
49 */
50
51 #include <stdint.h>
52 #include "fsl_device_registers.h"
53
54
55
56 /* ----------------------------------------------------------------------------
57 -- Core clock
58 ---------------------------------------------------------------------------- */
59
60 uint32_t SystemCoreClock = DEFAULT_SYSTEM_CLOCK;
61
62 /* ----------------------------------------------------------------------------
63 -- SystemInit()
64 ---------------------------------------------------------------------------- */
65
SystemInit(void)66 void SystemInit (void) {
67 #if ((__FPU_PRESENT == 1) && (__FPU_USED == 1))
68 __ASM volatile("mov x0, #(3 << 20) \n\t"
69 "msr cpacr_el1, x0");
70 #endif /* ((__FPU_PRESENT == 1) && (__FPU_USED == 1)) */
71 SystemInitHook();
72
73 ARM_TIMER_GetFreq(&SystemCoreClock);
74 }
75
76 /* ----------------------------------------------------------------------------
77 -- SystemCoreClockUpdate()
78 ---------------------------------------------------------------------------- */
79
SystemCoreClockUpdate(void)80 void SystemCoreClockUpdate (void) {
81 }
82
83 /* ----------------------------------------------------------------------------
84 -- SystemInitHook()
85 ---------------------------------------------------------------------------- */
86
SystemInitHook(void)87 __attribute__ ((weak)) void SystemInitHook (void) {
88 /* Void implementation of the weak function. */
89 }
90