system_LPC55S16.h 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  1. /*
  2. ** ###################################################################
  3. ** Processors: LPC55S16JBD100
  4. ** LPC55S16JBD64
  5. ** LPC55S16JEV98
  6. **
  7. ** Compilers: GNU C Compiler
  8. ** IAR ANSI C/C++ Compiler for ARM
  9. ** Keil ARM C/C++ Compiler
  10. ** MCUXpresso Compiler
  11. **
  12. ** Reference manual: LPC55S1x/LPC551x User manual Rev.0.6 15 November 2019
  13. ** Version: rev. 1.1, 2019-12-03
  14. ** Build: b220117
  15. **
  16. ** Abstract:
  17. ** Provides a system configuration function and a global variable that
  18. ** contains the system frequency. It configures the device and initializes
  19. ** the oscillator (PLL) that is part of the microcontroller device.
  20. **
  21. ** Copyright 2016 Freescale Semiconductor, Inc.
  22. ** Copyright 2016-2022 NXP
  23. ** All rights reserved.
  24. **
  25. ** SPDX-License-Identifier: BSD-3-Clause
  26. **
  27. ** http: www.nxp.com
  28. ** mail: support@nxp.com
  29. **
  30. ** Revisions:
  31. ** - rev. 1.0 (2018-08-22)
  32. ** Initial version based on v0.2UM
  33. ** - rev. 1.1 (2019-12-03)
  34. ** Initial version based on v0.6UM
  35. **
  36. ** ###################################################################
  37. */
  38. /*!
  39. * @file LPC55S16
  40. * @version 1.1
  41. * @date 2019-12-03
  42. * @brief Device specific configuration file for LPC55S16 (header file)
  43. *
  44. * Provides a system configuration function and a global variable that contains
  45. * the system frequency. It configures the device and initializes the oscillator
  46. * (PLL) that is part of the microcontroller device.
  47. */
  48. #ifndef _SYSTEM_LPC55S16_H_
  49. #define _SYSTEM_LPC55S16_H_ /**< Symbol preventing repeated inclusion */
  50. #ifdef __cplusplus
  51. extern "C" {
  52. #endif
  53. #include <stdint.h>
  54. #define DEFAULT_SYSTEM_CLOCK 12000000u /* Default System clock value */
  55. #define CLK_RTC_32K_CLK 32768u /* RTC oscillator 32 kHz output (32k_clk */
  56. #define CLK_FRO_12MHZ 12000000u /* FRO 12 MHz (fro_12m) */
  57. #define CLK_FRO_48MHZ 48000000u /* FRO 48 MHz (fro_48m) */
  58. #define CLK_FRO_96MHZ 96000000u /* FRO 96 MHz (fro_96m) */
  59. #define CLK_CLK_IN 16000000u /* Default CLK_IN pin clock */
  60. /**
  61. * @brief System clock frequency (core clock)
  62. *
  63. * The system clock frequency supplied to the SysTick timer and the processor
  64. * core clock. This variable can be used by the user application to setup the
  65. * SysTick timer or configure other parameters. It may also be used by debugger to
  66. * query the frequency of the debug timer or configure the trace clock speed
  67. * SystemCoreClock is initialized with a correct predefined value.
  68. */
  69. extern uint32_t SystemCoreClock;
  70. /**
  71. * @brief Setup the microcontroller system.
  72. *
  73. * Typically this function configures the oscillator (PLL) that is part of the
  74. * microcontroller device. For systems with variable clock speed it also updates
  75. * the variable SystemCoreClock. SystemInit is called from startup_device file.
  76. */
  77. void SystemInit (void);
  78. /**
  79. * @brief Updates the SystemCoreClock variable.
  80. *
  81. * It must be called whenever the core clock is changed during program
  82. * execution. SystemCoreClockUpdate() evaluates the clock register settings and calculates
  83. * the current core clock.
  84. */
  85. void SystemCoreClockUpdate (void);
  86. /**
  87. * @brief SystemInit function hook.
  88. *
  89. * This weak function allows to call specific initialization code during the
  90. * SystemInit() execution.This can be used when an application specific code needs
  91. * to be called as close to the reset entry as possible (for example the Multicore
  92. * Manager MCMGR_EarlyInit() function call).
  93. * NOTE: No global r/w variables can be used in this hook function because the
  94. * initialization of these variables happens after this function.
  95. */
  96. void SystemInitHook (void);
  97. #ifdef __cplusplus
  98. }
  99. #endif
  100. #endif /* _SYSTEM_LPC55S16_H_ */