system_M480.h 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  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. #ifndef __SYSTEM_M480_H__
  10. #define __SYSTEM_M480_H__
  11. #ifdef __cplusplus
  12. extern "C" {
  13. #endif
  14. #include <stdint.h>
  15. /*----------------------------------------------------------------------------
  16. Define clocks
  17. *----------------------------------------------------------------------------*/
  18. #ifndef __HSI
  19. #define __HSI (12000000UL) /*!< PLL default output is 50MHz */
  20. #endif
  21. #ifndef __HXT
  22. #define __HXT (12000000UL) /*!< External Crystal Clock Frequency */
  23. #endif
  24. #ifndef __LXT
  25. #define __LXT (32768UL) /*!< External Crystal Clock Frequency 32.768KHz */
  26. #endif
  27. #define __HIRC (12000000UL) /*!< Internal 12M RC Oscillator Frequency */
  28. #define __LIRC (10000UL) /*!< Internal 10K RC Oscillator Frequency */
  29. #define __SYS_OSC_CLK ( ___HSI) /* Main oscillator frequency */
  30. #define __SYSTEM_CLOCK (1UL*__HXT)
  31. extern uint32_t SystemCoreClock; /*!< System Clock Frequency (Core Clock) */
  32. extern uint32_t CyclesPerUs; /*!< Cycles per micro second */
  33. extern uint32_t PllClock; /*!< PLL Output Clock Frequency */
  34. /**
  35. * Initialize the system
  36. *
  37. * @param none
  38. * @return none
  39. *
  40. * @brief Setup the micro controller system.
  41. * Initialize the System and update the SystemCoreClock variable.
  42. */
  43. extern void SystemInit (void);
  44. /**
  45. * Update SystemCoreClock variable
  46. *
  47. * @param none
  48. * @return none
  49. *
  50. * @brief Updates the SystemCoreClock with current core Clock
  51. * retrieved from cpu registers.
  52. */
  53. extern void SystemCoreClockUpdate (void);
  54. #ifdef __cplusplus
  55. }
  56. #endif
  57. #endif /* __SYSTEM_M480_H__ */
  58. /*** (C) COPYRIGHT 2016 Nuvoton Technology Corp. ***/