system_MIMXRT1052.h 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127
  1. /*
  2. ** ###################################################################
  3. ** Processors: MIMXRT1052CVJ5B
  4. ** MIMXRT1052CVL5B
  5. ** MIMXRT1052DVJ6B
  6. ** MIMXRT1052DVL6B
  7. **
  8. ** Compilers: Freescale C/C++ for Embedded ARM
  9. ** GNU C Compiler
  10. ** IAR ANSI C/C++ Compiler for ARM
  11. ** Keil ARM C/C++ Compiler
  12. ** MCUXpresso Compiler
  13. **
  14. ** Reference manual: IMXRT1050RM Rev.2.1, 12/2018
  15. ** Version: rev. 1.2, 2018-11-27
  16. ** Build: b181205
  17. **
  18. ** Abstract:
  19. ** Provides a system configuration function and a global variable that
  20. ** contains the system frequency. It configures the device and initializes
  21. ** the oscillator (PLL) that is part of the microcontroller device.
  22. **
  23. ** Copyright 2016 Freescale Semiconductor, Inc.
  24. ** Copyright 2016-2018 NXP
  25. ** All rights reserved.
  26. **
  27. ** SPDX-License-Identifier: BSD-3-Clause
  28. **
  29. ** http: www.nxp.com
  30. ** mail: support@nxp.com
  31. **
  32. ** Revisions:
  33. ** - rev. 0.1 (2017-01-10)
  34. ** Initial version.
  35. ** - rev. 1.0 (2018-09-21)
  36. ** Update interrupt vector table and dma request source.
  37. ** Update register BEE_ADDR_OFFSET1's bitfield name to ADDR_OFFSET1.
  38. ** Split GPIO_COMBINED_IRQS to GPIO_COMBINED_LOW_IRQS and GPIO_COMBINED_HIGH_IRQS.
  39. ** - rev. 1.1 (2018-11-16)
  40. ** Update header files to align with IMXRT1050RM Rev.1.
  41. ** - rev. 1.2 (2018-11-27)
  42. ** Update header files to align with IMXRT1050RM Rev.2.1.
  43. **
  44. ** ###################################################################
  45. */
  46. /*!
  47. * @file MIMXRT1052
  48. * @version 1.2
  49. * @date 2018-11-27
  50. * @brief Device specific configuration file for MIMXRT1052 (header file)
  51. *
  52. * Provides a system configuration function and a global variable that contains
  53. * the system frequency. It configures the device and initializes the oscillator
  54. * (PLL) that is part of the microcontroller device.
  55. */
  56. #ifndef _SYSTEM_MIMXRT1052_H_
  57. #define _SYSTEM_MIMXRT1052_H_ /**< Symbol preventing repeated inclusion */
  58. #ifdef __cplusplus
  59. extern "C" {
  60. #endif
  61. #include <stdint.h>
  62. #ifndef DISABLE_WDOG
  63. #define DISABLE_WDOG 1
  64. #endif
  65. /* Define clock source values */
  66. #define CPU_XTAL_CLK_HZ 24000000UL /* Value of the external crystal or oscillator clock frequency in Hz */
  67. #define CPU_CLK1_HZ 0UL /* Value of the CLK1 (select the CLK1_N/CLK1_P as source) frequency in Hz */
  68. /* If CLOCK1_P,CLOCK1_N is choose as the pll bypass clock source, please implement the CLKPN_FREQ define, otherwise 0 will be returned. */
  69. #define DEFAULT_SYSTEM_CLOCK 528000000UL /* Default System clock value */
  70. /**
  71. * @brief System clock frequency (core clock)
  72. *
  73. * The system clock frequency supplied to the SysTick timer and the processor
  74. * core clock. This variable can be used by the user application to setup the
  75. * SysTick timer or configure other parameters. It may also be used by debugger to
  76. * query the frequency of the debug timer or configure the trace clock speed
  77. * SystemCoreClock is initialized with a correct predefined value.
  78. */
  79. extern uint32_t SystemCoreClock;
  80. /**
  81. * @brief Setup the microcontroller system.
  82. *
  83. * Typically this function configures the oscillator (PLL) that is part of the
  84. * microcontroller device. For systems with variable clock speed it also updates
  85. * the variable SystemCoreClock. SystemInit is called from startup_device file.
  86. */
  87. void SystemInit (void);
  88. /**
  89. * @brief Updates the SystemCoreClock variable.
  90. *
  91. * It must be called whenever the core clock is changed during program
  92. * execution. SystemCoreClockUpdate() evaluates the clock register settings and calculates
  93. * the current core clock.
  94. */
  95. void SystemCoreClockUpdate (void);
  96. /**
  97. * @brief SystemInit function hook.
  98. *
  99. * This weak function allows to call specific initialization code during the
  100. * SystemInit() execution.This can be used when an application specific code needs
  101. * to be called as close to the reset entry as possible (for example the Multicore
  102. * Manager MCMGR_EarlyInit() function call).
  103. * NOTE: No global r/w variables can be used in this hook function because the
  104. * initialization of these variables happens after this function.
  105. */
  106. void SystemInitHook (void);
  107. #ifdef __cplusplus
  108. }
  109. #endif
  110. #endif /* _SYSTEM_MIMXRT1052_H_ */