clock_config.h 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142
  1. /*
  2. * The Clear BSD License
  3. * Copyright (c) 2015, Freescale Semiconductor, Inc.
  4. * Copyright 2016-2017 NXP
  5. * All rights reserved.
  6. *
  7. * Redistribution and use in source and binary forms, with or without modification,
  8. * are permitted (subject to the limitations in the disclaimer below) provided
  9. * that the following conditions are met:
  10. *
  11. * o Redistributions of source code must retain the above copyright notice, this list
  12. * of conditions and the following disclaimer.
  13. *
  14. * o Redistributions in binary form must reproduce the above copyright notice, this
  15. * list of conditions and the following disclaimer in the documentation and/or
  16. * other materials provided with the distribution.
  17. *
  18. * o Neither the name of the copyright holder nor the names of its
  19. * contributors may be used to endorse or promote products derived from this
  20. * software without specific prior written permission.
  21. *
  22. * NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE GRANTED BY THIS LICENSE.
  23. * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
  24. * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
  25. * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
  26. * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
  27. * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
  28. * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
  29. * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
  30. * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  31. * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
  32. * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  33. */
  34. #ifndef _CLOCK_CONFIG_H_
  35. #define _CLOCK_CONFIG_H_
  36. #include "fsl_common.h"
  37. /*******************************************************************************
  38. * Definitions
  39. ******************************************************************************/
  40. /*******************************************************************************
  41. ************************ BOARD_InitBootClocks function ************************
  42. ******************************************************************************/
  43. #if defined(__cplusplus)
  44. extern "C" {
  45. #endif /* __cplusplus*/
  46. /*!
  47. * @brief This function executes default configuration of clocks.
  48. *
  49. */
  50. void BOARD_InitBootClocks(void);
  51. #if defined(__cplusplus)
  52. }
  53. #endif /* __cplusplus*/
  54. #define BOARD_XTAL0_CLK_HZ 12000000U /*!< Board xtal0 frequency in Hz */
  55. #define BOARD_XTAL32K_CLK_HZ 32768U /*!< Board xtal32K frequency in Hz */
  56. #define BOARD_BootClockRUN BOARD_BootClockFROHF48M
  57. /*******************************************************************************
  58. ********************* Configuration BOARD_BootClockFRO12M ***********************
  59. ******************************************************************************/
  60. /*******************************************************************************
  61. * Definitions for BOARD_BootClockFRO12M configuration
  62. ******************************************************************************/
  63. #define BOARD_BOOTCLOCKFRO12M_CORE_CLOCK 12000000U /*!< Core clock frequency: 12000000Hz */
  64. /*******************************************************************************
  65. * API for BOARD_BootClockFRO12M configuration
  66. ******************************************************************************/
  67. #if defined(__cplusplus)
  68. extern "C" {
  69. #endif /* __cplusplus*/
  70. /*!
  71. * @brief This function executes configuration of clocks.
  72. *
  73. */
  74. void BOARD_BootClockFRO12M(void);
  75. #if defined(__cplusplus)
  76. }
  77. #endif /* __cplusplus*/
  78. /*******************************************************************************
  79. ********************** Configuration BOARD_BootClockFROHF48M ***********************
  80. ******************************************************************************/
  81. /*******************************************************************************
  82. * Definitions for BOARD_BootClockFROHF48M configuration
  83. ******************************************************************************/
  84. #define BOARD_BOOTCLOCKFROHF48M_CORE_CLOCK 48000000U /*!< Core clock frequency: 48000000Hz */
  85. /*******************************************************************************
  86. * API for BOARD_BootClockFROHF48M configuration
  87. ******************************************************************************/
  88. #if defined(__cplusplus)
  89. extern "C" {
  90. #endif /* __cplusplus*/
  91. /*!
  92. * @brief This function executes configuration of clocks.
  93. *
  94. */
  95. void BOARD_BootClockFROHF48M(void);
  96. #if defined(__cplusplus)
  97. }
  98. #endif /* __cplusplus*/
  99. /*******************************************************************************
  100. ********************* Configuration BOARD_BootClockFROHF96M **********************
  101. ******************************************************************************/
  102. /*******************************************************************************
  103. * Definitions for BOARD_BootClockFROHF96M configuration
  104. ******************************************************************************/
  105. #define BOARD_BOOTCLOCKFROHF96M_CORE_CLOCK 96000000U /*!< Core clock frequency: 96000000Hz */
  106. /*******************************************************************************
  107. * API for BOARD_BootClockFROHF96M configuration
  108. ******************************************************************************/
  109. #if defined(__cplusplus)
  110. extern "C" {
  111. #endif /* __cplusplus*/
  112. /*!
  113. * @brief This function executes configuration of clocks.
  114. *
  115. */
  116. void BOARD_BootClockFROHF96M(void);
  117. #if defined(__cplusplus)
  118. }
  119. #endif /* __cplusplus*/
  120. #endif /* _CLOCK_CONFIG_H_ */