You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

168 lines
5.4 KiB

  1. /*
  2. Copyright (C) 2022 Westberry Technology (ChangZhou) Corp., Ltd
  3. Licensed under the Apache License, Version 2.0 (the "License");
  4. you may not use this file except in compliance with the License.
  5. You may obtain a copy of the License at
  6. http://www.apache.org/licenses/LICENSE-2.0
  7. Unless required by applicable law or agreed to in writing, software
  8. distributed under the License is distributed on an "AS IS" BASIS,
  9. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  10. See the License for the specific language governing permissions and
  11. limitations under the License.
  12. */
  13. #ifndef MCUCONF_H
  14. #define MCUCONF_H
  15. #define WB32FQ95xx_MCUCONF TRUE
  16. /*
  17. * WB32FQ95 drivers configuration.
  18. * The following settings override the default settings present in
  19. * the various device driver implementation headers.
  20. * Note that the settings for each driver only have effect if the whole
  21. * driver is enabled in halconf.h.
  22. *
  23. * IRQ priorities:
  24. * 15...0 Lowest...Highest.
  25. *
  26. */
  27. /**
  28. * @name Internal clock sources
  29. * @{
  30. */
  31. #define WB32_HSECLK 12000000
  32. #define WB32_LSECLK 32768
  33. /*
  34. * HAL driver system settings.
  35. */
  36. #define WB32_NO_INIT FALSE
  37. #define WB32_MHSI_ENABLED TRUE
  38. #define WB32_FHSI_ENABLED FALSE
  39. #define WB32_LSI_ENABLED FALSE
  40. #define WB32_HSE_ENABLED TRUE
  41. #define WB32_LSE_ENABLED FALSE
  42. #define WB32_PLL_ENABLED TRUE
  43. #define WB32_MAINCLKSRC WB32_MAINCLKSRC_PLL
  44. #define WB32_PLLSRC WB32_PLLSRC_HSE
  45. #define WB32_PLLDIV_VALUE 2
  46. #define WB32_PLLMUL_VALUE 12 //The allowed range is 12,16,20,24.
  47. #define WB32_HPRE 1
  48. #define WB32_PPRE1 1
  49. #define WB32_PPRE2 1
  50. #define WB32_USBPRE WB32_USBPRE_DIV1P5
  51. /*
  52. * EXTI driver system settings.
  53. */
  54. #define WB32_IRQ_EXTI0_PRIORITY 6
  55. #define WB32_IRQ_EXTI1_PRIORITY 6
  56. #define WB32_IRQ_EXTI2_PRIORITY 6
  57. #define WB32_IRQ_EXTI3_PRIORITY 6
  58. #define WB32_IRQ_EXTI4_PRIORITY 6
  59. #define WB32_IRQ_EXTI5_9_PRIORITY 6
  60. #define WB32_IRQ_EXTI10_15_PRIORITY 6
  61. #define WB32_IRQ_EXTI16_PRIORITY 6
  62. #define WB32_IRQ_EXTI17_PRIORITY 6
  63. #define WB32_IRQ_EXTI18_PRIORITY 6
  64. #define WB32_IRQ_EXTI19_PRIORITY 6
  65. /*
  66. * GPT driver system settings.
  67. */
  68. #define WB32_TIM_MAX_CHANNELS 4
  69. #define WB32_GPT_USE_TIM1 FALSE
  70. #define WB32_GPT_USE_TIM2 FALSE
  71. #define WB32_GPT_USE_TIM3 FALSE
  72. #define WB32_GPT_USE_TIM4 FALSE
  73. #define WB32_GPT_TIM1_IRQ_PRIORITY 7
  74. #define WB32_GPT_TIM2_IRQ_PRIORITY 7
  75. #define WB32_GPT_TIM3_IRQ_PRIORITY 7
  76. #define WB32_GPT_TIM4_IRQ_PRIORITY 7
  77. /*
  78. * ICU driver system settings.
  79. */
  80. #define WB32_ICU_USE_TIM1 FALSE
  81. #define WB32_ICU_USE_TIM2 FALSE
  82. #define WB32_ICU_USE_TIM3 FALSE
  83. #define WB32_ICU_USE_TIM4 FALSE
  84. #define WB32_ICU_TIM1_IRQ_PRIORITY 7
  85. #define WB32_ICU_TIM2_IRQ_PRIORITY 7
  86. #define WB32_ICU_TIM3_IRQ_PRIORITY 7
  87. #define WB32_ICU_TIM4_IRQ_PRIORITY 7
  88. /*
  89. * PWM driver system settings.
  90. */
  91. #define WB32_PWM_USE_ADVANCED FALSE
  92. #define WB32_PWM_USE_TIM1 FALSE
  93. #define WB32_PWM_USE_TIM2 FALSE
  94. #define WB32_PWM_USE_TIM3 FALSE
  95. #define WB32_PWM_USE_TIM4 FALSE
  96. #define WB32_PWM_TIM1_IRQ_PRIORITY 7
  97. #define WB32_PWM_TIM2_IRQ_PRIORITY 7
  98. #define WB32_PWM_TIM3_IRQ_PRIORITY 7
  99. #define WB32_PWM_TIM4_IRQ_PRIORITY 7
  100. /*
  101. * I2C driver system settings.
  102. */
  103. #define WB32_I2C_USE_I2C1 FALSE
  104. #define WB32_I2C_USE_I2C2 FALSE
  105. #define WB32_I2C_BUSY_TIMEOUT 50
  106. #define WB32_I2C_I2C1_IRQ_PRIORITY 5
  107. #define WB32_I2C_I2C2_IRQ_PRIORITY 5
  108. /*
  109. * SERIAL driver system settings.
  110. */
  111. #define WB32_SERIAL_USE_UART1 FALSE
  112. #define WB32_SERIAL_USE_UART2 FALSE
  113. #define WB32_SERIAL_USE_UART3 FALSE
  114. #define WB32_SERIAL_USART1_PRIORITY 12
  115. #define WB32_SERIAL_USART2_PRIORITY 12
  116. #define WB32_SERIAL_USART3_PRIORITY 12
  117. /*
  118. * SPI driver system settings.
  119. */
  120. #define WB32_SPI_USE_QSPI FALSE
  121. #define WB32_SPI_USE_SPIM2 FALSE
  122. #define WB32_SPI_USE_SPIS1 FALSE
  123. #define WB32_SPI_USE_SPIS2 FALSE
  124. #define WB32_SPI_QSPI_IRQ_PRIORITY 10
  125. #define WB32_SPI_SPIM2_IRQ_PRIORITY 10
  126. #define WB32_SPI_SPIS1_IRQ_PRIORITY 10
  127. #define WB32_SPI_SPIS2_IRQ_PRIORITY 10
  128. /*
  129. * ST driver system settings.
  130. */
  131. #define WB32_ST_IRQ_PRIORITY 8
  132. #define WB32_ST_USE_TIMER 2
  133. /*
  134. * UART driver system settings.
  135. */
  136. #define WB32_UART_USE_UART1 FALSE
  137. #define WB32_UART_USE_UART2 FALSE
  138. #define WB32_UART_USE_UART3 FALSE
  139. #define WB32_UART_UART1_IRQ_PRIORITY 12
  140. #define WB32_UART_UART2_IRQ_PRIORITY 12
  141. #define WB32_UART_UART3_IRQ_PRIORITY 12
  142. /*
  143. * USB driver system settings.
  144. */
  145. #define WB32_USB_USE_USB1 TRUE
  146. #define WB32_USB_USB1_IRQ_PRIORITY 13
  147. #define WB32_USB_HOST_WAKEUP_DURATION 10
  148. #endif /* MCUCONF_H */