1 /**************************************************************************//** 2 * @file system_M480.h 3 * @version V1.00 4 * @brief CMSIS Cortex-M4 Core Peripheral Access Layer Header File for M480 5 * 6 * SPDX-License-Identifier: Apache-2.0 7 * @copyright (C) 2017-2020 Nuvoton Technology Corp. All rights reserved. 8 *****************************************************************************/ 9 10 #ifndef __SYSTEM_M480_H__ 11 #define __SYSTEM_M480_H__ 12 13 #ifdef __cplusplus 14 extern "C" { 15 #endif 16 17 #include <stdint.h> 18 19 20 /*---------------------------------------------------------------------------- 21 Define clocks 22 *----------------------------------------------------------------------------*/ 23 24 #define __HSI (12000000UL) /*!< PLL default output is 50MHz */ 25 26 #define __HXT (12000000UL) /*!< External Crystal Clock Frequency */ 27 28 #define __LXT (32768UL) /*!< External Crystal Clock Frequency 32.768KHz */ 29 30 #define __HIRC (12000000UL) /*!< Internal 12M RC Oscillator Frequency */ 31 #define __LIRC (10000UL) /*!< Internal 10K RC Oscillator Frequency */ 32 #define __SYS_OSC_CLK ( ___HSI) /* Main oscillator frequency */ 33 34 35 #define __SYSTEM_CLOCK (1UL*__HXT) 36 37 extern uint32_t SystemCoreClock; /*!< System Clock Frequency (Core Clock) */ 38 extern uint32_t CyclesPerUs; /*!< Cycles per micro second */ 39 extern uint32_t PllClock; /*!< PLL Output Clock Frequency */ 40 41 42 /** 43 * Initialize the system 44 * 45 * @param none 46 * @return none 47 * 48 * @brief Setup the micro controller system. 49 * Initialize the System and update the SystemCoreClock variable. 50 */ 51 extern void SystemInit (void); 52 53 /** 54 * Update SystemCoreClock variable 55 * 56 * @param none 57 * @return none 58 * 59 * @brief Updates the SystemCoreClock with current core Clock 60 * retrieved from cpu registers. 61 */ 62 extern void SystemCoreClockUpdate (void); 63 64 #ifdef __cplusplus 65 } 66 #endif 67 68 #endif /* __SYSTEM_M480_H__ */ 69 70 /*** (C) COPYRIGHT 2016 Nuvoton Technology Corp. ***/ 71