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