1 /* 2 ** ################################################################### 3 ** Processor: MCXC243VFT 4 ** Compilers: Freescale C/C++ for Embedded ARM 5 ** GNU C Compiler 6 ** IAR ANSI C/C++ Compiler for ARM 7 ** Keil ARM C/C++ Compiler 8 ** MCUXpresso Compiler 9 ** 10 ** Reference manual: MCXC444RM, Rev.1, Mar 2024 11 ** Version: rev. 1.0, 2024-03-11 12 ** Build: b240401 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-2024 NXP 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 (2024-03-11) 28 ** Initial version. 29 ** 30 ** ################################################################### 31 */ 32 33 /*! 34 * @file MCXC243 35 * @version 1.0 36 * @date 2024-03-11 37 * @brief Device specific configuration file for MCXC243 (header file) 38 * 39 * Provides a system configuration function and a global variable that contains 40 * the system frequency. It configures the device and initializes the oscillator 41 * (PLL) that is part of the microcontroller device. 42 */ 43 44 #ifndef _SYSTEM_MCXC243_H_ 45 #define _SYSTEM_MCXC243_H_ /**< Symbol preventing repeated inclusion */ 46 47 #ifdef __cplusplus 48 extern "C" { 49 #endif 50 51 #include <stdint.h> 52 53 54 #ifndef DISABLE_WDOG 55 #define DISABLE_WDOG 1 56 #endif 57 58 #define ACK_ISOLATION 1 59 60 /* Define clock source values */ 61 #define CPU_XTAL_CLK_HZ 32768U /* Value of the external crystal or oscillator clock frequency in Hz */ 62 #define CPU_INT_FAST_CLK_HZ 48000000U /* Value of the fast internal oscillator clock frequency in Hz */ 63 #define CPU_INT_IRC_CLK_HZ 48000000U /* Value of the 48M internal oscillator clock frequency in Hz */ 64 65 /* Low power mode enable */ 66 /* SMC_PMPROT: AVLP=1,AVLLS=1 */ 67 #define SYSTEM_SMC_PMPROT_VALUE 0x2AU /* SMC_PMPROT */ 68 69 #define DEFAULT_SYSTEM_CLOCK 8000000U /* Default System clock value */ 70 #define CPU_INT_SLOW_CLK_HZ 8000000U /* Value of the slow internal oscillator clock frequency in Hz */ 71 72 73 74 /** 75 * @brief System clock frequency (core clock) 76 * 77 * The system clock frequency supplied to the SysTick timer and the processor 78 * core clock. This variable can be used by the user application to setup the 79 * SysTick timer or configure other parameters. It may also be used by debugger to 80 * query the frequency of the debug timer or configure the trace clock speed 81 * SystemCoreClock is initialized with a correct predefined value. 82 */ 83 extern uint32_t SystemCoreClock; 84 85 /** 86 * @brief Setup the microcontroller system. 87 * 88 * Typically this function configures the oscillator (PLL) that is part of the 89 * microcontroller device. For systems with variable clock speed it also updates 90 * the variable SystemCoreClock. SystemInit is called from startup_device file. 91 */ 92 void SystemInit (void); 93 94 /** 95 * @brief Updates the SystemCoreClock variable. 96 * 97 * It must be called whenever the core clock is changed during program 98 * execution. SystemCoreClockUpdate() evaluates the clock register settings and calculates 99 * the current core clock. 100 */ 101 void SystemCoreClockUpdate (void); 102 103 /** 104 * @brief SystemInit function hook. 105 * 106 * This weak function allows to call specific initialization code during the 107 * SystemInit() execution.This can be used when an application specific code needs 108 * to be called as close to the reset entry as possible (for example the Multicore 109 * Manager MCMGR_EarlyInit() function call). 110 * NOTE: No global r/w variables can be used in this hook function because the 111 * initialization of these variables happens after this function. 112 */ 113 void SystemInitHook (void); 114 115 #ifdef __cplusplus 116 } 117 #endif 118 119 #endif /* _SYSTEM_MCXC243_H_ */ 120