1 /* 2 ** ################################################################### 3 ** Processors: MIMXRT685SFAWBR_dsp 4 ** MIMXRT685SFFOB_dsp 5 ** MIMXRT685SFVKB_dsp 6 ** 7 ** Compiler: Xtensa Compiler 8 ** Reference manual: MIMXRT685 User manual Rev. 0.95 11 November 2019 9 ** Version: rev. 2.0, 2019-11-12 10 ** Build: b201016 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-2020 NXP 19 ** All rights reserved. 20 ** 21 ** SPDX-License-Identifier: BSD-3-Clause 22 ** 23 ** http: www.nxp.com 24 ** mail: support@nxp.com 25 ** 26 ** Revisions: 27 ** - rev. 1.0 (2018-06-19) 28 ** Initial version. 29 ** - rev. 2.0 (2019-11-12) 30 ** Base on rev 0.95 RM (B0 Header) 31 ** 32 ** ################################################################### 33 */ 34 35 /*! 36 * @file MIMXRT685S 37 * @version 1.0 38 * @date 161020 39 * @brief Device specific configuration file for MIMXRT685S (header file) 40 * 41 * Provides a system configuration function and a global variable that contains 42 * the system frequency. It configures the device and initializes the oscillator 43 * (PLL) that is part of the microcontroller device. 44 */ 45 #ifndef _SYSTEM_MIMXRT685S_DSP_H_ 46 #define _SYSTEM_MIMXRT685S_DSP_H_ /**< Symbol preventing repeated inclusion */ 47 48 #ifdef __cplusplus 49 extern "C" { 50 #endif 51 52 #include <stdint.h> 53 54 55 #define DEFAULT_SYSTEM_CLOCK 12000000u /* Default System clock value */ 56 #ifndef CLK_XTAL_OSC_CLK 57 #define CLK_XTAL_OSC_CLK 24000000u /* Default XTAL OSC clock */ 58 #endif 59 #define CLK_RTC_32K_CLK 32768u /* RTC oscillator 32 kHz (32k_clk) */ 60 #define CLK_LPOSC_1MHZ 1000000u /* Low power oscillator 1 MHz (1m_lposc) */ 61 #define CLK_FRO_16MHZ 16000000u /* Slow FRO 16 MHz (fro_16m) */ 62 #define CLK_FRO_48MHZ 48000000u /* Fast FRO 48 MHz (fro_48m) */ 63 #define CLK_FRO_60MHZ 60000000u /* Fast FRO 60 MHz (fro_60m) */ 64 #ifndef CLK_EXT_CLKIN 65 #define CLK_EXT_CLKIN 0u /* Default CLK_IN pin clock */ 66 #endif 67 68 /** 69 * @brief System clock frequency (core clock) 70 * 71 * The system clock frequency supplied to the SysTick timer and the processor 72 * core clock. This variable can be used by the user application to setup the 73 * SysTick timer or configure other parameters. It may also be used by debugger to 74 * query the frequency of the debug timer or configure the trace clock speed 75 * SystemCoreClock is initialized with a correct predefined value. 76 */ 77 extern uint32_t SystemCoreClock; 78 79 /** 80 * @brief Setup the microcontroller system. 81 * 82 * Typically this function configures the oscillator (PLL) that is part of the 83 * microcontroller device. For systems with variable clock speed it also updates 84 * the variable SystemCoreClock. SystemInit is called from startup_device file. 85 */ 86 void SystemInit (void); 87 88 /** 89 * @brief Updates the SystemCoreClock variable. 90 * 91 * It must be called whenever the core clock is changed during program 92 * execution. SystemCoreClockUpdate() evaluates the clock register settings and calculates 93 * the current core clock. 94 */ 95 void SystemCoreClockUpdate (void); 96 97 /** 98 * @brief SystemInit function hook. 99 * 100 * This weak function allows to call specific initialization code during the 101 * SystemInit() execution.This can be used when an application specific code needs 102 * to be called as close to the reset entry as possible (for example the Multicore 103 * Manager MCMGR_EarlyInit() function call). 104 * NOTE: No global r/w variables can be used in this hook function because the 105 * initialization of these variables happens after this function. 106 */ 107 void SystemInitHook (void); 108 109 #ifdef __cplusplus 110 } 111 #endif 112 113 #endif /* _SYSTEM_MIMXRT685S_DSP_H_ */ 114