system_M451Series.h 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. /******************************************************************************
  2. * @file system_M451Series.h
  3. * @version V0.10
  4. * $Revision: 7 $
  5. * $Date: 15/09/02 10:02a $
  6. * @brief CMSIS Cortex-M4 Core Peripheral Access Layer Header File for M451 Series MCU
  7. *
  8. * @note
  9. * Copyright (C) 2013~2015 Nuvoton Technology Corp. All rights reserved.
  10. *****************************************************************************/
  11. #ifndef __SYSTEM_M451SERIES_H__
  12. #define __SYSTEM_M451SERIES_H__
  13. #ifdef __cplusplus
  14. extern "C" {
  15. #endif
  16. #include <stdint.h>
  17. /*---------------------------------------------------------------------------------------------------------*/
  18. /* Macro Definition */
  19. /*---------------------------------------------------------------------------------------------------------*/
  20. #ifndef DEBUG_PORT
  21. # define DEBUG_PORT UART0 /*!< Select Debug Port which is used for retarget.c to output debug message to UART */
  22. #endif
  23. /*----------------------------------------------------------------------------
  24. Define clocks
  25. *----------------------------------------------------------------------------*/
  26. #define __HSI (12000000UL) /*!< PLL default output is 72MHz */
  27. #define __HXT (12000000UL) /*!< External Crystal Clock Frequency */
  28. #define __LXT (32768UL) /*!< External Crystal Clock Frequency 32.768KHz */
  29. #define __HIRC (22118400UL) /*!< Internal 22M RC Oscillator Frequency */
  30. #define __LIRC (10000UL) /*!< Internal 10K RC Oscillator Frequency */
  31. #define __SYS_OSC_CLK ( ___HSI) /* Main oscillator frequency */
  32. #define __SYSTEM_CLOCK (1*__HXT)
  33. extern uint32_t SystemCoreClock; /*!< System Clock Frequency (Core Clock) */
  34. extern uint32_t CyclesPerUs; /*!< Cycles per micro second */
  35. extern uint32_t PllClock; /*!< PLL Output Clock Frequency */
  36. /**
  37. * Initialize the system
  38. *
  39. * @param None
  40. * @return None
  41. *
  42. * @brief Setup the microcontroller system.
  43. * Initialize the System and update the SystemCoreClock variable.
  44. */
  45. extern void SystemInit(void);
  46. /**
  47. * Update SystemCoreClock variable
  48. *
  49. * @param None
  50. * @return None
  51. *
  52. * @brief Updates the SystemCoreClock with current core Clock
  53. * retrieved from cpu registers.
  54. */
  55. extern void SystemCoreClockUpdate(void);
  56. #ifdef __cplusplus
  57. }
  58. #endif
  59. #endif /* __SYSTEM_M451SERIES_H__ */
  60. /*** (C) COPYRIGHT 2013~2015 Nuvoton Technology Corp. ***/