1 /*
2 ** ###################################################################
3 **     Processors:          MIMX8ML6CVNKZ
4 **                          MIMX8ML6DVNLZ
5 **
6 **     Compilers:           GNU C Compiler
7 **                          IAR ANSI C/C++ Compiler for ARM
8 **                          Keil ARM C/C++ Compiler
9 **
10 **     Reference manual:    IMX8MPRM, Rev.D, 12/2020
11 **     Version:             rev. 5.0, 2021-03-01
12 **     Build:               b210301
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-2021 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 (2019-10-11)
30 **         Initial version.
31 **     - rev. 2.0 (2020-02-21)
32 **         Rev.B Header.
33 **     - rev. 3.0 (2020-06-22)
34 **         Rev.C Header.
35 **     - rev. 4.0 (2020-11-16)
36 **         Rev.D Header.
37 **     - rev. 5.0 (2021-03-01)
38 **         Rev.D Header Final.
39 **
40 ** ###################################################################
41 */
42 
43 /*!
44  * @file MIMX8ML6_cm7
45  * @version 5.0
46  * @date 2021-03-01
47  * @brief Device specific configuration file for MIMX8ML6_cm7 (header file)
48  *
49  * Provides a system configuration function and a global variable that contains
50  * the system frequency. It configures the device and initializes the oscillator
51  * (PLL) that is part of the microcontroller device.
52  */
53 
54 #ifndef _SYSTEM_MIMX8ML6_cm7_H_
55 #define _SYSTEM_MIMX8ML6_cm7_H_ /**< Symbol preventing repeated inclusion */
56 
57 #ifdef __cplusplus
58 extern "C" {
59 #endif
60 
61 #include <stdint.h>
62 
63 /* i.MX8ML Definitions */
64 #ifndef DISABLE_WDOG
65 #define DISABLE_WDOG 1
66 #endif
67 /* Define clock source values */
68 #define CPU_XTAL_SOSC_CLK_24MHZ 24000000U  /* Value of the external System Oscillator Clock(SOSC) frequency in Hz */
69 #define CLK_PAD_CLK             0U         /* The value could be changed according to the  actual usage */
70 #define DEFAULT_SYSTEM_CLOCK    800000000U /* Default System clock value */
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_MIMX8ML6_cm7_H_ */
118