1 /*
2 ** ###################################################################
3 **     Processors:          MIMX8US3CVP08_cm33
4 **                          MIMX8US3DVK08_cm33
5 **                          MIMX8US3DVP08_cm33
6 **
7 **     Compilers:           GNU C Compiler
8 **                          IAR ANSI C/C++ Compiler for ARM
9 **                          Keil ARM C/C++ Compiler
10 **
11 **     Reference manual:    IMX8ULPRM, Rev. D, December. 2022
12 **     Version:             rev. 5.0, 2023-04-27
13 **     Build:               b230927
14 **
15 **     Abstract:
16 **         Provides a system configuration function and a global variable that
17 **         contains the system frequency. It configures the device and initializes
18 **         the oscillator (PLL) that is part of the microcontroller device.
19 **
20 **     Copyright 2016 Freescale Semiconductor, Inc.
21 **     Copyright 2016-2023 NXP
22 **     SPDX-License-Identifier: BSD-3-Clause
23 **
24 **     http:                 www.nxp.com
25 **     mail:                 support@nxp.com
26 **
27 **     Revisions:
28 **     - rev. 1.0 (2020-05-25)
29 **         Initial version.
30 **     - rev. 2.0 (2020-09-18)
31 **         Base on rev A RM
32 **     - rev. 3.0 (2021-01-20)
33 **         Base on rev A.1 RM
34 **     - rev. 4.0 (2021-07-05)
35 **         Base on rev B RM
36 **     - rev. 5.0 (2023-04-27)
37 **         Base on rev D RM
38 **
39 ** ###################################################################
40 */
41 
42 /*!
43  * @file MIMX8US3_cm33
44  * @version 1.0
45  * @date 270923
46  * @brief Device specific configuration file for MIMX8US3_cm33 (header 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 #ifndef _SYSTEM_MIMX8US3_cm33_H_
53 #define _SYSTEM_MIMX8US3_cm33_H_                    /**< Symbol preventing repeated inclusion */
54 
55 #ifdef __cplusplus
56 extern "C" {
57 #endif
58 
59 #include <stdint.h>
60 
61 #define DEFAULT_SYSTEM_CLOCK 192000000U /* Default System clock value */
62 #ifndef CLK_XTAL_OSC_CLK
63 #define CLK_XTAL_OSC_CLK 24000000U /* Default XTAL OSC clock */
64 #endif
65 #define CLK_RTC_32K_CLK 32768U     /* RTC oscillator 32 kHz (32k_clk) */
66 #define CLK_FRO_192MHZ  192000000U /* FRO 192 MHz (fro_192m) */
67 #define CLK_LPOSC_1MHZ  1000000U   /* LPOSC 1 MHz */
68 #ifndef CLK_LVDS_CLK
69 #define CLK_LVDS_CLK 0U /* Default LVDS clock */
70 #endif
71 
72 /**
73  * @brief System clock frequency (core clock)
74  *
75  * The system clock frequency supplied to the SysTick timer and the processor
76  * core clock. This variable can be used by the user application to setup the
77  * SysTick timer or configure other parameters. It may also be used by debugger to
78  * query the frequency of the debug timer or configure the trace clock speed
79  * SystemCoreClock is initialized with a correct predefined value.
80  */
81 extern uint32_t SystemCoreClock;
82 
83 /**
84  * @brief Setup the microcontroller system.
85  *
86  * Typically this function configures the oscillator (PLL) that is part of the
87  * microcontroller device. For systems with variable clock speed it also updates
88  * the variable SystemCoreClock. SystemInit is called from startup_device file.
89  */
90 void SystemInit(void);
91 
92 /**
93  * @brief Updates the SystemCoreClock variable.
94  *
95  * It must be called whenever the core clock is changed during program
96  * execution. SystemCoreClockUpdate() evaluates the clock register settings and calculates
97  * the current core clock.
98  */
99 void SystemCoreClockUpdate(void);
100 
101 /**
102  * @brief SystemInit function hook.
103  *
104  * This weak function allows to call specific initialization code during the
105  * SystemInit() execution.This can be used when an application specific code needs
106  * to be called as close to the reset entry as possible (for example the Multicore
107  * Manager MCMGR_EarlyInit() function call).
108  * NOTE: No global r/w variables can be used in this hook function because the
109  * initialization of these variables happens after this function.
110  */
111 void SystemInitHook(void);
112 
113 #ifdef __cplusplus
114 }
115 #endif
116 
117 #endif  /* _SYSTEM_MIMX8US3_cm33_H_ */
118