1 /*
2 ** ###################################################################
3 **     Processor:           MIMX8QM6AVUFF
4 **     Compilers:           GNU C Compiler
5 **                          IAR ANSI C/C++ Compiler for ARM
6 **                          Keil ARM C/C++ Compiler
7 **
8 **     Reference manual:    IMX8QMRM, Rev. E, Jun. 2018
9 **     Version:             rev. 4.0, 2018-08-30
10 **     Build:               b230621
11 **
12 **     Abstract:
13 **         Provides a system configuration function and a global variable that
14 **         contains the system frequency. It configures the device and initializes
15 **         the oscillator (PLL) that is part of the microcontroller device.
16 **
17 **     Copyright 2016 Freescale Semiconductor, Inc.
18 **     Copyright 2016-2023 NXP
19 **     SPDX-License-Identifier: BSD-3-Clause
20 **
21 **     http:                 www.nxp.com
22 **     mail:                 support@nxp.com
23 **
24 **     Revisions:
25 **     - rev. 1.0 (2016-06-02)
26 **         Initial version.
27 **     - rev. 2.0 (2017-05-04)
28 **         RevA Header ER
29 **     - rev. 3.0 (2018-01-29)
30 **         RevB Header ER
31 **     - rev. 4.0 (2018-08-30)
32 **         RevC Header EAR
33 **
34 ** ###################################################################
35 */
36 
37 /*!
38  * @file MIMX8QM6_ca53
39  * @version 4.0
40  * @date 2018-08-30
41  * @brief Device specific configuration file for MIMX8QM6_ca53 (implementation
42  *        file)
43  *
44  * Provides a system configuration function and a global variable that contains
45  * the system frequency. It configures the device and initializes the oscillator
46  * (PLL) that is part of the microcontroller device.
47  */
48 
49 #include <stdint.h>
50 #include "fsl_device_registers.h"
51 
52 
53 
54 /* ----------------------------------------------------------------------------
55    -- Core clock
56    ---------------------------------------------------------------------------- */
57 
58 uint32_t SystemCoreClock = DEFAULT_SYSTEM_CLOCK;
59 
60 /* ----------------------------------------------------------------------------
61    -- SystemInit()
62    ---------------------------------------------------------------------------- */
63 
SystemInit(void)64 void SystemInit (void) {
65 #if ((__FPU_PRESENT == 1) && (__FPU_USED == 1))
66   SCB->CPACR |= ((3UL << 10*2) | (3UL << 11*2));    /* set CP10, CP11 Full Access */
67 #endif /* ((__FPU_PRESENT == 1) && (__FPU_USED == 1)) */
68 /* i.MX8QM systemInit */
69   SystemInitHook();
70 }
71 
72 /* ----------------------------------------------------------------------------
73    -- SystemCoreClockUpdate()
74    ---------------------------------------------------------------------------- */
75 
SystemCoreClockUpdate(void)76 void SystemCoreClockUpdate (void) {
77 /* i.MX8QM systemCoreClockUpdate */
78 }
79 
80 /* ----------------------------------------------------------------------------
81    -- SystemInitHook()
82    ---------------------------------------------------------------------------- */
83 
SystemInitHook(void)84 __attribute__ ((weak)) void SystemInitHook (void) {
85   /* Void implementation of the weak function. */
86 }
87