system_MIMXRT1052.h 4.7 KB

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