1 /*
2 ** ###################################################################
3 **     Processors:          MIMX8MM6CVTKZ
4 **                          MIMX8MM6DVTLZ
5 **
6 **     Compilers:           GNU C Compiler
7 **                          IAR ANSI C/C++ Compiler for ARM
8 **                          Keil ARM C/C++ Compiler
9 **
10 **     Reference manual:    MX8MMRM, Rev.0, 02/2019
11 **     Version:             rev. 4.0, 2019-02-18
12 **     Build:               b211020
13 **
14 **     Abstract:
15 **         Provides a system configuration function and a global variable that
16 **         contains the system frequency. It configures the device and initializes
17 **         the oscillator (PLL) that is part of the microcontroller device.
18 **
19 **     Copyright 2016 Freescale Semiconductor, Inc.
20 **     Copyright 2016-2021 NXP
21 **     All rights reserved.
22 **
23 **     SPDX-License-Identifier: BSD-3-Clause
24 **
25 **     http:                 www.nxp.com
26 **     mail:                 support@nxp.com
27 **
28 **     Revisions:
29 **     - rev. 1.0 (2018-03-26)
30 **         Initial version.
31 **     - rev. 2.0 (2018-07-20)
32 **         Rev.A Header EAR
33 **     - rev. 3.0 (2018-10-24)
34 **         Rev.B Header PRC
35 **     - rev. 4.0 (2019-02-18)
36 **         Rev.0 Header RFP
37 **
38 ** ###################################################################
39 */
40 
41 /*!
42  * @file MIMX8MM6_ca53
43  * @version 4.0
44  * @date 2019-02-18
45  * @brief Device specific configuration file for MIMX8MM6_ca53 (implementation
46  *        file)
47  *
48  * Provides a system configuration function and a global variable that contains
49  * the system frequency. It configures the device and initializes the oscillator
50  * (PLL) that is part of the microcontroller device.
51  */
52 
53 #include <stdint.h>
54 #include "fsl_device_registers.h"
55 
56 
57 
58 /* ----------------------------------------------------------------------------
59    -- Core clock
60    ---------------------------------------------------------------------------- */
61 
62 uint32_t SystemCoreClock = DEFAULT_SYSTEM_CLOCK;
63 
64 /* ----------------------------------------------------------------------------
65    -- SystemInit()
66    ---------------------------------------------------------------------------- */
67 
SystemInit(void)68 void SystemInit (void) {
69 #if ((__FPU_PRESENT == 1) && (__FPU_USED == 1))
70   __ASM volatile("mov x0, #(3 << 20) \n\t"
71                  "msr cpacr_el1, x0");
72 #endif /* ((__FPU_PRESENT == 1) && (__FPU_USED == 1)) */
73   SystemInitHook();
74 
75   ARM_TIMER_GetFreq(&SystemCoreClock);
76 }
77 
78 /* ----------------------------------------------------------------------------
79    -- SystemCoreClockUpdate()
80    ---------------------------------------------------------------------------- */
81 
SystemCoreClockUpdate(void)82 void SystemCoreClockUpdate (void) {
83 }
84 
85 /* ----------------------------------------------------------------------------
86    -- SystemInitHook()
87    ---------------------------------------------------------------------------- */
88 
SystemInitHook(void)89 __attribute__ ((weak)) void SystemInitHook (void) {
90   /* Void implementation of the weak function. */
91 }
92