system_LPC54608.h 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121
  1. /*
  2. ** ###################################################################
  3. ** Processors: LPC54608J512BD208
  4. ** LPC54608J512ET180
  5. **
  6. ** Compilers: Keil ARM C/C++ Compiler
  7. ** GNU C Compiler
  8. ** IAR ANSI C/C++ Compiler for ARM
  9. ** MCUXpresso Compiler
  10. **
  11. ** Reference manual: LPC54S60x/LPC5460x User manual Rev.0.9 7 Nov 2016
  12. ** Version: rev. 1.1, 2016-11-25
  13. ** Build: b161227
  14. **
  15. ** Abstract:
  16. ** Provides a system configuration function and a global variable that
  17. ** contains the system frequency. It configures the device and initializes
  18. ** the oscillator (PLL) that is part of the microcontroller device.
  19. **
  20. ** Copyright (c) 2016 Freescale Semiconductor, Inc.
  21. ** Copyright 2016 - 2017 NXP
  22. ** Redistribution and use in source and binary forms, with or without modification,
  23. ** are permitted provided that the following conditions are met:
  24. **
  25. ** o Redistributions of source code must retain the above copyright notice, this list
  26. ** of conditions and the following disclaimer.
  27. **
  28. ** o Redistributions in binary form must reproduce the above copyright notice, this
  29. ** list of conditions and the following disclaimer in the documentation and/or
  30. ** other materials provided with the distribution.
  31. **
  32. ** o Neither the name of the copyright holder nor the names of its
  33. ** contributors may be used to endorse or promote products derived from this
  34. ** software without specific prior written permission.
  35. **
  36. ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
  37. ** ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
  38. ** WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
  39. ** DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
  40. ** ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
  41. ** (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
  42. ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
  43. ** ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  44. ** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
  45. ** SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  46. **
  47. ** http: www.nxp.com
  48. ** mail: support@nxp.com
  49. **
  50. ** Revisions:
  51. ** - rev. 1.0 (2016-08-12)
  52. ** Initial version.
  53. ** - rev. 1.1 (2016-11-25)
  54. ** Update CANFD and Classic CAN register.
  55. ** Add MAC TIMERSTAMP registers.
  56. **
  57. ** ###################################################################
  58. */
  59. /*!
  60. * @file LPC54608
  61. * @version 1.1
  62. * @date 2016-11-25
  63. * @brief Device specific configuration file for LPC54608 (header file)
  64. *
  65. * Provides a system configuration function and a global variable that contains
  66. * the system frequency. It configures the device and initializes the oscillator
  67. * (PLL) that is part of the microcontroller device.
  68. */
  69. #ifndef _SYSTEM_LPC54608_H_
  70. #define _SYSTEM_LPC54608_H_ /**< Symbol preventing repeated inclusion */
  71. #ifdef __cplusplus
  72. extern "C" {
  73. #endif
  74. #include <stdint.h>
  75. #define DEFAULT_SYSTEM_CLOCK 12000000u /* Default System clock value */
  76. #define CLK_RTC_32K_CLK 32768u /* RTC oscillator 32 kHz output (32k_clk */
  77. #define CLK_FRO_12MHZ 12000000u /* FRO 12 MHz (fro_12m) */
  78. #define CLK_FRO_48MHZ 48000000u /* FRO 48 MHz (fro_48m) */
  79. #define CLK_FRO_96MHZ 96000000u /* FRO 96 MHz (fro_96m) */
  80. #define CLK_CLK_IN 0u /* Default CLK_IN pin clock */
  81. /**
  82. * @brief System clock frequency (core clock)
  83. *
  84. * The system clock frequency supplied to the SysTick timer and the processor
  85. * core clock. This variable can be used by the user application to setup the
  86. * SysTick timer or configure other parameters. It may also be used by debugger to
  87. * query the frequency of the debug timer or configure the trace clock speed
  88. * SystemCoreClock is initialized with a correct predefined value.
  89. */
  90. extern uint32_t SystemCoreClock;
  91. /**
  92. * @brief Setup the microcontroller system.
  93. *
  94. * Typically this function configures the oscillator (PLL) that is part of the
  95. * microcontroller device. For systems with variable clock speed it also updates
  96. * the variable SystemCoreClock. SystemInit is called from startup_device file.
  97. */
  98. void SystemInit (void);
  99. /**
  100. * @brief Updates the SystemCoreClock variable.
  101. *
  102. * It must be called whenever the core clock is changed during program
  103. * execution. SystemCoreClockUpdate() evaluates the clock register settings and calculates
  104. * the current core clock.
  105. */
  106. void SystemCoreClockUpdate (void);
  107. #ifdef __cplusplus
  108. }
  109. #endif
  110. #endif /* _SYSTEM_LPC54608_H_ */