1 /*
2 ** ###################################################################
3 **     Processors:          MIMX9131CVVXJ
4 **                          MIMX9131DVVXJ
5 **
6 **     Compilers:           GNU C Compiler
7 **                          IAR ANSI C/C++ Compiler for ARM
8 **                          Keil ARM C/C++ Compiler
9 **
10 **     Reference manual:    IMX91RM Rev.1
11 **     Version:             rev. 1.0, 2024-11-15
12 **     Build:               b250112
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-2025 NXP
21 **     SPDX-License-Identifier: BSD-3-Clause
22 **
23 **     http:                 www.nxp.com
24 **     mail:                 support@nxp.com
25 **
26 **     Revisions:
27 **     - rev. 1.0 (2024-11-15)
28 **         Initial version.
29 **
30 ** ###################################################################
31 */
32 
33 /*!
34  * @file MIMX9131
35  * @version 1.0
36  * @date 2024-11-15
37  * @brief Device specific configuration file for MIMX9131 (implementation file)
38  *
39  * Provides a system configuration function and a global variable that contains
40  * the system frequency. It configures the device and initializes the oscillator
41  * (PLL) that is part of the microcontroller device.
42  */
43 
44 #include <stdint.h>
45 #include "fsl_device_registers.h"
46 
47 
48 
49 /* ----------------------------------------------------------------------------
50    -- Core clock
51    ---------------------------------------------------------------------------- */
52 
53 uint32_t SystemCoreClock = DEFAULT_SYSTEM_CLOCK;
54 
55 /* ----------------------------------------------------------------------------
56    -- SystemInit()
57    ---------------------------------------------------------------------------- */
58 
SystemInit(void)59 void SystemInit (void) {
60 #if ((__FPU_PRESENT == 1) && (__FPU_USED == 1))
61   __ASM volatile("mov x0, #(3 << 20) \n\t"
62                  "msr cpacr_el1, x0");
63 #endif /* ((__FPU_PRESENT == 1) && (__FPU_USED == 1)) */
64   SystemInitHook();
65 
66   ARM_TIMER_GetFreq(&SystemCoreClock);
67 }
68 
69 /* ----------------------------------------------------------------------------
70    -- SystemCoreClockUpdate()
71    ---------------------------------------------------------------------------- */
72 
SystemCoreClockUpdate(void)73 void SystemCoreClockUpdate (void) {
74 }
75 
76 /* ----------------------------------------------------------------------------
77    -- SystemInitHook()
78    ---------------------------------------------------------------------------- */
79 
SystemInitHook(void)80 __attribute__ ((weak)) void SystemInitHook (void) {
81   /* Void implementation of the weak function. */
82 }
83