1 /* 2 ** ################################################################### 3 ** Processors: MIMXRT758SGAWAR 4 ** MIMXRT758SGFOA 5 ** 6 ** Reference manual: iMXRT700RM Rev.2 DraftA, 05/2024 7 ** Version: rev. 2.0, 2024-05-28 8 ** Build: b240614 9 ** 10 ** Abstract: 11 ** Provides a system configuration function and a global variable that 12 ** contains the system frequency. It configures the device and initializes 13 ** the oscillator (PLL) that is part of the microcontroller device. 14 ** 15 ** Copyright 2016 Freescale Semiconductor, Inc. 16 ** Copyright 2016-2024 NXP 17 ** SPDX-License-Identifier: BSD-3-Clause 18 ** 19 ** http: www.nxp.com 20 ** mail: support@nxp.com 21 ** 22 ** Revisions: 23 ** - rev. 1.0 (2022-09-15) 24 ** Initial version. 25 ** - rev. 2.0 (2024-05-28) 26 ** Rev2 DraftA. 27 ** 28 ** ################################################################### 29 */ 30 31 /*! 32 * @file MIMXRT758S_ezhv 33 * @version 1.0 34 * @date 2024-06-14 35 * @brief Device specific configuration file for MIMXRT758S_ezhv (header file) 36 * 37 * Provides a system configuration function and a global variable that contains 38 * the system frequency. It configures the device and initializes the oscillator 39 * (PLL) that is part of the microcontroller device. 40 */ 41 42 #ifndef _SYSTEM_MIMXRT758S_EZHV_H_ 43 #define _SYSTEM_MIMXRT758S_EZHV_H_ /**< Symbol preventing repeated inclusion */ 44 45 #ifdef __cplusplus 46 extern "C" { 47 #endif 48 49 #include <stdint.h> 50 51 #define DEFAULT_SYSTEM_CLOCK 192000000u /* Default System clock value */ 52 #ifndef CLK_XTAL_OSC_CLK 53 #define CLK_XTAL_OSC_CLK 24000000u /* Default XTAL OSC clock, set to 0 when external CLKIN is used */ 54 #endif 55 #ifndef CLK_EXT_CLKIN 56 #define CLK_EXT_CLKIN 0u /* Default external CLKIN pin clock, set to 0 when XTAL OSC is used */ 57 #endif 58 #define CLK_OSC_CLK ((CLK_XTAL_OSC_CLK != 0U) ? CLK_XTAL_OSC_CLK : CLK_EXT_CLKIN) 59 60 #define CLK_RTC_32K_CLK 32768u /* RTC oscillator 32 kHz (32k_clk) */ 61 #define CLK_LPOSC_1MHZ 1000000u /* Low power oscillator 1 MHz (1m_lposc) */ 62 #define CLK_FRO0_DEFAULT_CLK 300000000u /* FRO0 default clock frequency (fro0_max) */ 63 #define CLK_FRO1_MAX_CLK 192000000u /* FRO1 max clock frequency (fro1) */ 64 #define CLK_FRO2_DEFAULT_CLK 196000000u /* FRO2 default clock frequency (fro2_max) */ 65 66 /** 67 * @brief System clock frequency (core clock) 68 * 69 * The system clock frequency supplied to the SysTick timer and the processor 70 * core clock. This variable can be used by the user application to setup the 71 * SysTick timer or configure other parameters. It may also be used by debugger to 72 * query the frequency of the debug timer or configure the trace clock speed 73 * SystemCoreClock is initialized with a correct predefined value. 74 */ 75 extern uint32_t SystemCoreClock; 76 77 /** 78 * @brief Setup the microcontroller system. 79 * 80 * Typically this function configures the oscillator (PLL) that is part of the 81 * microcontroller device. For systems with variable clock speed it also updates 82 * the variable SystemCoreClock. SystemInit is called from startup_device file. 83 */ 84 void SystemInit (void); 85 86 /** 87 * @brief Updates the SystemCoreClock variable. 88 * 89 * It must be called whenever the core clock is changed during program 90 * execution. SystemCoreClockUpdate() evaluates the clock register settings and calculates 91 * the current core clock. 92 */ 93 void SystemCoreClockUpdate (void); 94 95 /** 96 * @brief SystemInit function hook. 97 * 98 * This weak function allows to call specific initialization code during the 99 * SystemInit() execution.This can be used when an application specific code needs 100 * to be called as close to the reset entry as possible (for example the Multicore 101 * Manager MCMGR_EarlyInit() function call). 102 * NOTE: No global r/w variables can be used in this hook function because the 103 * initialization of these variables happens after this function. 104 */ 105 void SystemInitHook (void); 106 107 #ifdef __cplusplus 108 } 109 #endif 110 111 #endif /* _SYSTEM_MIMXRT758S_EZHV_H_ */ 112