system_MIMXRT1176_cm7.h 4.2 KB

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