Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.
 
 
 

131 строка
4.6 KiB

  1. /*
  2. ** ###################################################################
  3. ** Processors: MKV56F1M0VLL24
  4. ** MKV56F1M0VLQ24
  5. ** MKV56F1M0VMD24
  6. ** MKV56F512VLL24
  7. ** MKV56F512VLQ24
  8. ** MKV56F512VMD24
  9. **
  10. ** Compilers: Freescale C/C++ for Embedded ARM
  11. ** GNU C Compiler
  12. ** IAR ANSI C/C++ Compiler for ARM
  13. ** Keil ARM C/C++ Compiler
  14. ** MCUXpresso Compiler
  15. **
  16. ** Reference manual: KV5XP144M240RM Rev. 3, 02/2016
  17. ** Version: rev. 0.3, 2016-02-29
  18. ** Build: b181105
  19. **
  20. ** Abstract:
  21. ** Provides a system configuration function and a global variable that
  22. ** contains the system frequency. It configures the device and initializes
  23. ** the oscillator (PLL) that is part of the microcontroller device.
  24. **
  25. ** Copyright 2016 Freescale Semiconductor, Inc.
  26. ** Copyright 2016-2018 NXP
  27. ** All rights reserved.
  28. **
  29. ** SPDX-License-Identifier: BSD-3-Clause
  30. **
  31. ** http: www.nxp.com
  32. ** mail: support@nxp.com
  33. **
  34. ** Revisions:
  35. ** - rev. 0.1 (2015-02-24)
  36. ** Initial version.
  37. ** - rev. 0.2 (2015-10-21)
  38. ** UART0 - removed LON functionality.
  39. ** FMC - corrected base address.
  40. ** - rev. 0.3 (2016-02-29)
  41. ** PORT - removed registers GICLR, GICHR.
  42. **
  43. ** ###################################################################
  44. */
  45. /*!
  46. * @file MKV56F24
  47. * @version 0.3
  48. * @date 2016-02-29
  49. * @brief Device specific configuration file for MKV56F24 (header file)
  50. *
  51. * Provides a system configuration function and a global variable that contains
  52. * the system frequency. It configures the device and initializes the oscillator
  53. * (PLL) that is part of the microcontroller device.
  54. */
  55. #ifndef _SYSTEM_MKV56F24_H_
  56. #define _SYSTEM_MKV56F24_H_ /**< Symbol preventing repeated inclusion */
  57. #ifdef __cplusplus
  58. extern "C" {
  59. #endif
  60. #include <stdint.h>
  61. #ifndef DISABLE_WDOG
  62. #define DISABLE_WDOG 1
  63. #endif
  64. /* Define clock source values */
  65. #define CPU_XTAL_CLK_HZ 50000000UL /* Value of the external crystal or oscillator clock frequency in Hz */
  66. #define CPU_INT_SLOW_CLK_HZ 32768UL /* Value of the slow internal oscillator clock frequency in Hz */
  67. #define CPU_INT_FAST_CLK_HZ 4000000UL /* Value of the fast internal oscillator clock frequency in Hz */
  68. /* Low power mode enable */
  69. /* SMC_PMPROT: AHSRUN=1,?=0,AVLP=1,?=0,?=0,?=0,AVLLS=1,?=0 */
  70. #define SYSTEM_SMC_PMPROT_VALUE SMC_PMPROT_AHSRUN_MASK | SMC_PMPROT_AVLP_MASK | SMC_PMPROT_AVLLS_MASK /* Mask of allowed low power modes used to initialize power modes protection register */
  71. #define DEFAULT_SYSTEM_CLOCK 20971520UL /* Default System clock value */
  72. /**
  73. * @brief System clock frequency (core clock)
  74. *
  75. * The system clock frequency supplied to the SysTick timer and the processor
  76. * core clock. This variable can be used by the user application to setup the
  77. * SysTick timer or configure other parameters. It may also be used by debugger to
  78. * query the frequency of the debug timer or configure the trace clock speed
  79. * SystemCoreClock is initialized with a correct predefined value.
  80. */
  81. extern uint32_t SystemCoreClock;
  82. /**
  83. * @brief Setup the microcontroller system.
  84. *
  85. * Typically this function configures the oscillator (PLL) that is part of the
  86. * microcontroller device. For systems with variable clock speed it also updates
  87. * the variable SystemCoreClock. SystemInit is called from startup_device file.
  88. */
  89. void SystemInit (void);
  90. /**
  91. * @brief Updates the SystemCoreClock variable.
  92. *
  93. * It must be called whenever the core clock is changed during program
  94. * execution. SystemCoreClockUpdate() evaluates the clock register settings and calculates
  95. * the current core clock.
  96. */
  97. void SystemCoreClockUpdate (void);
  98. /**
  99. * @brief SystemInit function hook.
  100. *
  101. * This weak function allows to call specific initialization code during the
  102. * SystemInit() execution.This can be used when an application specific code needs
  103. * to be called as close to the reset entry as possible (for example the Multicore
  104. * Manager MCMGR_EarlyInit() function call).
  105. * NOTE: No global r/w variables can be used in this hook function because the
  106. * initialization of these variables happens after this function.
  107. */
  108. void SystemInitHook (void);
  109. #ifdef __cplusplus
  110. }
  111. #endif
  112. #endif /* _SYSTEM_MKV56F24_H_ */