1 /*
2 ** ###################################################################
3 **     Processors:          MIMX9352CVUXK_cm33
4 **                          MIMX9352DVUXM_cm33
5 **
6 **     Compilers:           GNU C Compiler
7 **                          IAR ANSI C/C++ Compiler for ARM
8 **                          Keil ARM C/C++ Compiler
9 **
10 **     Reference manual:    IMX93RM, Internal, November. 2021
11 **     Version:             rev. 1.0, 2021-11-16
12 **     Build:               b220830
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-2022 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 (2021-11-16)
30 **         Initial version.
31 **
32 ** ###################################################################
33 */
34 
35 #ifndef _SYSTEM_MIMX9352_cm33_H_
36 #define _SYSTEM_MIMX9352_cm33_H_ /**< Symbol preventing repeated inclusion */
37 
38 #ifdef __cplusplus
39 extern "C" {
40 #endif
41 
42 #include <stdint.h>
43 #include "fsl_device_registers.h"
44 
45 #define DEFAULT_SYSTEM_CLOCK 200000000u
46 
47 /**
48  * @brief System clock frequency (core clock)
49  *
50  * The system clock frequency supplied to the SysTick timer and the processor
51  * core clock. This variable can be used by the user application to setup the
52  * SysTick timer or configure other parameters. It may also be used by debugger to
53  * query the frequency of the debug timer or configure the trace clock speed
54  * SystemCoreClock is initialized with a correct predefined value.
55  */
56 extern uint32_t SystemCoreClock;
57 
58 /**
59  * @brief Setup the microcontroller system.
60  *
61  * Typically this function configures the oscillator (PLL) that is part of the
62  * microcontroller device. For systems with variable clock speed it also updates
63  * the variable SystemCoreClock. SystemInit is called from startup_device file.
64  */
65 void SystemInit(void);
66 
67 /**
68  * @brief SystemInit function hook.
69  *
70  * This weak function allows to call specific initialization code during the
71  * SystemInit() execution.This can be used when an application specific code needs
72  * to be called as close to the reset entry as possible (for example the Multicore
73  * Manager MCMGR_EarlyInit() function call).
74  * NOTE: No global r/w variables can be used in this hook function because the
75  * initialization of these variables happens after this function.
76  */
77 void SystemInitHook(void);
78 
79 /**
80  * @brief Updates the SystemCoreClock variable.
81  *
82  * It must be called whenever the core clock is changed during program
83  * execution. SystemCoreClockUpdate() evaluates the clock register settings and calculates
84  * the current core clock.
85  */
86 void SystemCoreClockUpdate(void);
87 
88 #ifdef __cplusplus
89 }
90 #endif
91 
92 #endif /* _SYSTEM_MIMX9352_cm33_H_ */
93