logo

qmk_firmware

custom branch of QMK firmware git clone https://anongit.hacktivis.me/git/qmk_firmware.git

mcuconf.h (21338B)


  1. /*
  2. ChibiOS - Copyright (C) 2006..2020 Giovanni Di Sirio
  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. /*
  16. * STM32H723/33/25/35 drivers configuration.
  17. * The following settings override the default settings present in
  18. * the various device driver implementation headers.
  19. * Note that the settings for each driver only have effect if the whole
  20. * driver is enabled in halconf.h.
  21. *
  22. * IRQ priorities:
  23. * 15...0 Lowest...Highest.
  24. *
  25. * DMA priorities:
  26. * 0...3 Lowest...Highest.
  27. */
  28. #define STM32H7xx_MCUCONF
  29. #define STM32H723_MCUCONF
  30. #define STM32H733_MCUCONF
  31. #define STM32H725_MCUCONF
  32. #define STM32H735_MCUCONF
  33. /*
  34. * General settings.
  35. */
  36. #define STM32_NO_INIT FALSE
  37. /*
  38. * Memory attributes settings.
  39. */
  40. #define STM32_NOCACHE_ENABLE FALSE
  41. #define STM32_NOCACHE_MPU_REGION MPU_REGION_6
  42. #define STM32_NOCACHE_RBAR 0x24000000U
  43. #define STM32_NOCACHE_RASR MPU_RASR_SIZE_16K
  44. /*
  45. * PWR system settings.
  46. * Reading STM32 Reference Manual is required, settings in PWR_CR3 are
  47. * very critical.
  48. * Register constants are taken from the ST header.
  49. */
  50. #define STM32_VOS STM32_VOS_SCALE0
  51. #define STM32_PWR_CR1 (PWR_CR1_SVOS_1 | PWR_CR1_SVOS_0)
  52. #define STM32_PWR_CR2 (PWR_CR2_BREN)
  53. #define STM32_PWR_CR3 (PWR_CR3_LDOEN | PWR_CR3_USB33DEN)
  54. #define STM32_PWR_CPUCR 0
  55. /*
  56. * Clock tree static settings.
  57. * Reading STM32 Reference Manual is required.
  58. */
  59. #define STM32_HSI_ENABLED TRUE
  60. #define STM32_LSI_ENABLED FALSE
  61. #define STM32_CSI_ENABLED FALSE
  62. #define STM32_HSI48_ENABLED TRUE
  63. #define STM32_HSE_ENABLED TRUE
  64. #define STM32_LSE_ENABLED FALSE
  65. #define STM32_HSIDIV STM32_HSIDIV_DIV1
  66. /*
  67. * PLLs static settings.
  68. * Reading STM32 Reference Manual is required.
  69. */
  70. #define STM32_PLLSRC STM32_PLLSRC_HSE_CK
  71. #define STM32_PLLCFGR_MASK ~0
  72. #define STM32_PLL1_ENABLED TRUE
  73. #define STM32_PLL1_P_ENABLED TRUE
  74. #define STM32_PLL1_Q_ENABLED TRUE
  75. #define STM32_PLL1_R_ENABLED TRUE
  76. #define STM32_PLL1_DIVM_VALUE 4
  77. #define STM32_PLL1_DIVN_VALUE 275
  78. #define STM32_PLL1_FRACN_VALUE 0
  79. #define STM32_PLL1_DIVP_VALUE 1
  80. #define STM32_PLL1_DIVQ_VALUE 10
  81. #define STM32_PLL1_DIVR_VALUE 4
  82. #define STM32_PLL2_ENABLED TRUE
  83. #define STM32_PLL2_P_ENABLED TRUE
  84. #define STM32_PLL2_Q_ENABLED TRUE
  85. #define STM32_PLL2_R_ENABLED TRUE
  86. #define STM32_PLL2_DIVM_VALUE 4
  87. #define STM32_PLL2_DIVN_VALUE 400
  88. #define STM32_PLL2_FRACN_VALUE 0
  89. #define STM32_PLL2_DIVP_VALUE 40
  90. #define STM32_PLL2_DIVQ_VALUE 8
  91. #define STM32_PLL2_DIVR_VALUE 8
  92. #define STM32_PLL3_ENABLED TRUE
  93. #define STM32_PLL3_P_ENABLED TRUE
  94. #define STM32_PLL3_Q_ENABLED TRUE
  95. #define STM32_PLL3_R_ENABLED TRUE
  96. #define STM32_PLL3_DIVM_VALUE 4
  97. #define STM32_PLL3_DIVN_VALUE 240
  98. #define STM32_PLL3_FRACN_VALUE 0
  99. #define STM32_PLL3_DIVP_VALUE 10
  100. #define STM32_PLL3_DIVQ_VALUE 10
  101. #define STM32_PLL3_DIVR_VALUE 10
  102. /*
  103. * Core clocks dynamic settings (can be changed at runtime).
  104. * Reading STM32 Reference Manual is required.
  105. */
  106. #define STM32_SW STM32_SW_PLL1_P_CK
  107. #define STM32_RTCSEL STM32_RTCSEL_LSI_CK
  108. #define STM32_D1CPRE STM32_D1CPRE_DIV1
  109. #define STM32_D1HPRE STM32_D1HPRE_DIV2
  110. #define STM32_D1PPRE3 STM32_D1PPRE3_DIV2
  111. #define STM32_D2PPRE1 STM32_D2PPRE1_DIV2
  112. #define STM32_D2PPRE2 STM32_D2PPRE2_DIV2
  113. #define STM32_D3PPRE4 STM32_D3PPRE4_DIV2
  114. /*
  115. * Peripherals clocks static settings.
  116. * Reading STM32 Reference Manual is required.
  117. */
  118. #define STM32_MCO1SEL STM32_MCO1SEL_HSI_CK
  119. #define STM32_MCO1PRE_VALUE 4
  120. #define STM32_MCO2SEL STM32_MCO2SEL_SYS_CK
  121. #define STM32_MCO2PRE_VALUE 4
  122. #define STM32_TIMPRE_ENABLE TRUE
  123. #define STM32_HRTIMSEL 0
  124. #define STM32_STOPKERWUCK 0
  125. #define STM32_STOPWUCK 0
  126. #define STM32_RTCPRE_VALUE 8
  127. #define STM32_CKPERSEL STM32_CKPERSEL_HSE_CK
  128. #define STM32_SDMMCSEL STM32_SDMMCSEL_PLL1_Q_CK
  129. #define STM32_OCTOSPISEL STM32_OCTOSPISEL_HCLK
  130. #define STM32_FMCSEL STM32_FMCSEL_HCLK
  131. #define STM32_SWPSEL STM32_SWPSEL_PCLK1
  132. #define STM32_FDCANSEL STM32_FDCANSEL_HSE_CK
  133. #define STM32_DFSDM1SEL STM32_DFSDM1SEL_PCLK2
  134. #define STM32_SPDIFSEL STM32_SPDIFSEL_PLL1_Q_CK
  135. #define STM32_SPI45SEL STM32_SPI45SEL_PCLK2
  136. #define STM32_SPI123SEL STM32_SPI123SEL_PLL1_Q_CK
  137. #define STM32_SAI1SEL STM32_SAI1SEL_PLL1_Q_CK
  138. #define STM32_LPTIM1SEL STM32_LPTIM1SEL_PCLK1
  139. #define STM32_CECSEL STM32_CECSEL_LSE_CK
  140. #define STM32_USBSEL STM32_USBSEL_PLL3_Q_CK
  141. #define STM32_I2C1235SEL STM32_I2C1235SEL_PCLK1
  142. #define STM32_RNGSEL STM32_RNGSEL_PLL1_Q_CK
  143. #define STM32_USART16910SEL STM32_USART16910SEL_PCLK2
  144. #define STM32_USART234578SEL STM32_USART234578SEL_PCLK1
  145. #define STM32_SPI6SEL STM32_SPI6SEL_PCLK4
  146. #define STM32_SAI4BSEL STM32_SAI4BSEL_PLL1_Q_CK
  147. #define STM32_SAI4ASEL STM32_SAI4ASEL_PLL1_Q_CK
  148. #define STM32_ADCSEL STM32_ADCSEL_PLL2_P_CK
  149. #define STM32_LPTIM345SEL STM32_LPTIM345SEL_PCLK4
  150. #define STM32_LPTIM2SEL STM32_LPTIM2SEL_PCLK4
  151. #define STM32_I2C4SEL STM32_I2C4SEL_PCLK4
  152. #define STM32_LPUART1SEL STM32_LPUART1SEL_PCLK4
  153. /*
  154. * IRQ system settings.
  155. */
  156. #define STM32_IRQ_EXTI0_PRIORITY 6
  157. #define STM32_IRQ_EXTI1_PRIORITY 6
  158. #define STM32_IRQ_EXTI2_PRIORITY 6
  159. #define STM32_IRQ_EXTI3_PRIORITY 6
  160. #define STM32_IRQ_EXTI4_PRIORITY 6
  161. #define STM32_IRQ_EXTI5_9_PRIORITY 6
  162. #define STM32_IRQ_EXTI10_15_PRIORITY 6
  163. #define STM32_IRQ_EXTI16_PRIORITY 6
  164. #define STM32_IRQ_EXTI17_PRIORITY 6
  165. #define STM32_IRQ_EXTI18_PRIORITY 6
  166. #define STM32_IRQ_EXTI19_PRIORITY 6
  167. #define STM32_IRQ_EXTI20_21_PRIORITY 6
  168. #define STM32_IRQ_FDCAN1_PRIORITY 10
  169. #define STM32_IRQ_FDCAN2_PRIORITY 10
  170. #define STM32_IRQ_FDCAN3_PRIORITY 10
  171. #define STM32_IRQ_MDMA_PRIORITY 9
  172. #define STM32_IRQ_OCTOSPI1_PRIORITY 10
  173. #define STM32_IRQ_OCTOSPI2_PRIORITY 10
  174. #define STM32_IRQ_SDMMC1_PRIORITY 9
  175. #define STM32_IRQ_SDMMC2_PRIORITY 9
  176. #define STM32_IRQ_TIM1_UP_PRIORITY 7
  177. #define STM32_IRQ_TIM1_CC_PRIORITY 7
  178. #define STM32_IRQ_TIM2_PRIORITY 7
  179. #define STM32_IRQ_TIM3_PRIORITY 7
  180. #define STM32_IRQ_TIM4_PRIORITY 7
  181. #define STM32_IRQ_TIM5_PRIORITY 7
  182. #define STM32_IRQ_TIM6_PRIORITY 7
  183. #define STM32_IRQ_TIM7_PRIORITY 7
  184. #define STM32_IRQ_TIM8_BRK_TIM12_PRIORITY 7
  185. #define STM32_IRQ_TIM8_UP_TIM13_PRIORITY 7
  186. #define STM32_IRQ_TIM8_TRGCO_TIM14_PRIORITY 7
  187. #define STM32_IRQ_TIM8_CC_PRIORITY 7
  188. #define STM32_IRQ_TIM15_PRIORITY 7
  189. #define STM32_IRQ_TIM16_PRIORITY 7
  190. #define STM32_IRQ_TIM17_PRIORITY 7
  191. #define STM32_IRQ_USART1_PRIORITY 12
  192. #define STM32_IRQ_USART2_PRIORITY 12
  193. #define STM32_IRQ_USART3_PRIORITY 12
  194. #define STM32_IRQ_UART4_PRIORITY 12
  195. #define STM32_IRQ_UART5_PRIORITY 12
  196. #define STM32_IRQ_USART6_PRIORITY 12
  197. #define STM32_IRQ_UART7_PRIORITY 12
  198. #define STM32_IRQ_UART8_PRIORITY 12
  199. #define STM32_IRQ_UART9_PRIORITY 12
  200. #define STM32_IRQ_USART10_PRIORITY 12
  201. #define STM32_IRQ_LPUART1_PRIORITY 12
  202. /*
  203. * ADC driver system settings.
  204. */
  205. #define STM32_ADC_DUAL_MODE FALSE
  206. #define STM32_ADC_SAMPLES_SIZE 16
  207. #define STM32_ADC_USE_ADC12 FALSE
  208. #define STM32_ADC_ADC12_DMA_STREAM STM32_DMA_STREAM_ID_ANY
  209. #define STM32_ADC_ADC12_DMA_PRIORITY 2
  210. #define STM32_ADC_ADC12_IRQ_PRIORITY 5
  211. #define STM32_ADC_ADC12_CLOCK_MODE ADC_CCR_CKMODE_AHB_DIV4
  212. /*
  213. * CAN driver system settings.
  214. */
  215. #define STM32_CAN_USE_FDCAN1 FALSE
  216. #define STM32_CAN_USE_FDCAN2 FALSE
  217. #define STM32_CAN_USE_FDCAN3 FALSE
  218. /*
  219. * DAC driver system settings.
  220. */
  221. #define STM32_DAC_DUAL_MODE FALSE
  222. #define STM32_DAC_USE_DAC1_CH1 FALSE
  223. #define STM32_DAC_USE_DAC1_CH2 FALSE
  224. #define STM32_DAC_DAC1_CH1_IRQ_PRIORITY 10
  225. #define STM32_DAC_DAC1_CH2_IRQ_PRIORITY 10
  226. #define STM32_DAC_DAC1_CH1_DMA_PRIORITY 2
  227. #define STM32_DAC_DAC1_CH2_DMA_PRIORITY 2
  228. #define STM32_DAC_DAC1_CH1_DMA_STREAM STM32_DMA_STREAM_ID_ANY
  229. #define STM32_DAC_DAC1_CH2_DMA_STREAM STM32_DMA_STREAM_ID_ANY
  230. /*
  231. * GPT driver system settings.
  232. */
  233. #define STM32_GPT_USE_TIM1 FALSE
  234. #define STM32_GPT_USE_TIM2 FALSE
  235. #define STM32_GPT_USE_TIM3 FALSE
  236. #define STM32_GPT_USE_TIM4 FALSE
  237. #define STM32_GPT_USE_TIM5 FALSE
  238. #define STM32_GPT_USE_TIM6 FALSE
  239. #define STM32_GPT_USE_TIM7 FALSE
  240. #define STM32_GPT_USE_TIM8 FALSE
  241. #define STM32_GPT_USE_TIM12 FALSE
  242. #define STM32_GPT_USE_TIM13 FALSE
  243. #define STM32_GPT_USE_TIM14 FALSE
  244. #define STM32_GPT_USE_TIM15 FALSE
  245. #define STM32_GPT_USE_TIM16 FALSE
  246. #define STM32_GPT_USE_TIM17 FALSE
  247. /*
  248. * I2C driver system settings.
  249. */
  250. #define STM32_I2C_USE_I2C1 FALSE
  251. #define STM32_I2C_USE_I2C2 FALSE
  252. #define STM32_I2C_USE_I2C3 FALSE
  253. #define STM32_I2C_USE_I2C4 FALSE
  254. #define STM32_I2C_BUSY_TIMEOUT 50
  255. #define STM32_I2C_I2C1_RX_DMA_STREAM STM32_DMA_STREAM_ID_ANY
  256. #define STM32_I2C_I2C1_TX_DMA_STREAM STM32_DMA_STREAM_ID_ANY
  257. #define STM32_I2C_I2C2_RX_DMA_STREAM STM32_DMA_STREAM_ID_ANY
  258. #define STM32_I2C_I2C2_TX_DMA_STREAM STM32_DMA_STREAM_ID_ANY
  259. #define STM32_I2C_I2C3_RX_DMA_STREAM STM32_DMA_STREAM_ID_ANY
  260. #define STM32_I2C_I2C3_TX_DMA_STREAM STM32_DMA_STREAM_ID_ANY
  261. #define STM32_I2C_I2C4_RX_BDMA_STREAM STM32_BDMA_STREAM_ID_ANY
  262. #define STM32_I2C_I2C4_TX_BDMA_STREAM STM32_BDMA_STREAM_ID_ANY
  263. #define STM32_I2C_I2C1_IRQ_PRIORITY 5
  264. #define STM32_I2C_I2C2_IRQ_PRIORITY 5
  265. #define STM32_I2C_I2C3_IRQ_PRIORITY 5
  266. #define STM32_I2C_I2C4_IRQ_PRIORITY 5
  267. #define STM32_I2C_I2C1_DMA_PRIORITY 3
  268. #define STM32_I2C_I2C2_DMA_PRIORITY 3
  269. #define STM32_I2C_I2C3_DMA_PRIORITY 3
  270. #define STM32_I2C_I2C4_DMA_PRIORITY 3
  271. #define STM32_I2C_DMA_ERROR_HOOK(i2cp) osalSysHalt("DMA failure")
  272. /*
  273. * ICU driver system settings.
  274. */
  275. #define STM32_ICU_USE_TIM1 FALSE
  276. #define STM32_ICU_USE_TIM2 FALSE
  277. #define STM32_ICU_USE_TIM3 FALSE
  278. #define STM32_ICU_USE_TIM4 FALSE
  279. #define STM32_ICU_USE_TIM5 FALSE
  280. #define STM32_ICU_USE_TIM8 FALSE
  281. #define STM32_ICU_USE_TIM12 FALSE
  282. #define STM32_ICU_USE_TIM13 FALSE
  283. #define STM32_ICU_USE_TIM14 FALSE
  284. #define STM32_ICU_USE_TIM15 FALSE
  285. #define STM32_ICU_USE_TIM16 FALSE
  286. #define STM32_ICU_USE_TIM17 FALSE
  287. /*
  288. * MAC driver system settings.
  289. */
  290. #define STM32_MAC_TRANSMIT_BUFFERS 2
  291. #define STM32_MAC_RECEIVE_BUFFERS 4
  292. #define STM32_MAC_BUFFERS_SIZE 1522
  293. #define STM32_MAC_PHY_TIMEOUT 100
  294. #define STM32_MAC_ETH1_CHANGE_PHY_STATE TRUE
  295. #define STM32_MAC_ETH1_IRQ_PRIORITY 13
  296. #define STM32_MAC_IP_CHECKSUM_OFFLOAD 0
  297. /*
  298. * PWM driver system settings.
  299. */
  300. #define STM32_PWM_USE_TIM1 FALSE
  301. #define STM32_PWM_USE_TIM2 FALSE
  302. #define STM32_PWM_USE_TIM3 FALSE
  303. #define STM32_PWM_USE_TIM4 FALSE
  304. #define STM32_PWM_USE_TIM5 FALSE
  305. #define STM32_PWM_USE_TIM8 FALSE
  306. #define STM32_PWM_USE_TIM12 FALSE
  307. #define STM32_PWM_USE_TIM13 FALSE
  308. #define STM32_PWM_USE_TIM14 FALSE
  309. #define STM32_PWM_USE_TIM15 FALSE
  310. #define STM32_PWM_USE_TIM16 FALSE
  311. #define STM32_PWM_USE_TIM17 FALSE
  312. /*
  313. * RTC driver system settings.
  314. */
  315. #define STM32_RTC_PRESA_VALUE 32
  316. #define STM32_RTC_PRESS_VALUE 1024
  317. #define STM32_RTC_CR_INIT 0
  318. #define STM32_RTC_TAMPCR_INIT 0
  319. /*
  320. * SDC driver system settings.
  321. */
  322. #define STM32_SDC_USE_SDMMC1 FALSE
  323. #define STM32_SDC_USE_SDMMC2 FALSE
  324. #define STM32_SDC_SDMMC_UNALIGNED_SUPPORT TRUE
  325. #define STM32_SDC_SDMMC_WRITE_TIMEOUT 10000
  326. #define STM32_SDC_SDMMC_READ_TIMEOUT 10000
  327. #define STM32_SDC_SDMMC_CLOCK_DELAY 10
  328. #define STM32_SDC_SDMMC_PWRSAV TRUE
  329. /*
  330. * SERIAL driver system settings.
  331. */
  332. #define STM32_SERIAL_USE_USART1 FALSE
  333. #define STM32_SERIAL_USE_USART2 FALSE
  334. #define STM32_SERIAL_USE_USART3 FALSE
  335. #define STM32_SERIAL_USE_UART4 FALSE
  336. #define STM32_SERIAL_USE_UART5 FALSE
  337. #define STM32_SERIAL_USE_USART6 FALSE
  338. #define STM32_SERIAL_USE_UART7 FALSE
  339. #define STM32_SERIAL_USE_UART8 FALSE
  340. #define STM32_SERIAL_USE_UART9 FALSE
  341. #define STM32_SERIAL_USE_USART10 FALSE
  342. #define STM32_SERIAL_USE_LPUART1 FALSE
  343. /*
  344. * SIO driver system settings.
  345. */
  346. #define STM32_SIO_USE_USART1 FALSE
  347. #define STM32_SIO_USE_USART2 FALSE
  348. #define STM32_SIO_USE_USART3 FALSE
  349. #define STM32_SIO_USE_UART4 FALSE
  350. #define STM32_SIO_USE_UART5 FALSE
  351. #define STM32_SIO_USE_USART6 FALSE
  352. #define STM32_SIO_USE_UART7 FALSE
  353. #define STM32_SIO_USE_UART8 FALSE
  354. #define STM32_SIO_USE_UART9 FALSE
  355. #define STM32_SIO_USE_USART10 FALSE
  356. #define STM32_SIO_USE_LPUART1 FALSE
  357. /*
  358. * SPI driver system settings.
  359. */
  360. #define STM32_SPI_USE_SPI1 FALSE
  361. #define STM32_SPI_USE_SPI2 FALSE
  362. #define STM32_SPI_USE_SPI3 FALSE
  363. #define STM32_SPI_USE_SPI4 FALSE
  364. #define STM32_SPI_USE_SPI5 FALSE
  365. #define STM32_SPI_USE_SPI6 FALSE
  366. #define STM32_SPI_SPI1_RX_DMA_STREAM STM32_DMA_STREAM_ID_ANY
  367. #define STM32_SPI_SPI1_TX_DMA_STREAM STM32_DMA_STREAM_ID_ANY
  368. #define STM32_SPI_SPI2_RX_DMA_STREAM STM32_DMA_STREAM_ID_ANY
  369. #define STM32_SPI_SPI2_TX_DMA_STREAM STM32_DMA_STREAM_ID_ANY
  370. #define STM32_SPI_SPI3_RX_DMA_STREAM STM32_DMA_STREAM_ID_ANY
  371. #define STM32_SPI_SPI3_TX_DMA_STREAM STM32_DMA_STREAM_ID_ANY
  372. #define STM32_SPI_SPI4_RX_DMA_STREAM STM32_DMA_STREAM_ID_ANY
  373. #define STM32_SPI_SPI4_TX_DMA_STREAM STM32_DMA_STREAM_ID_ANY
  374. #define STM32_SPI_SPI5_RX_DMA_STREAM STM32_DMA_STREAM_ID_ANY
  375. #define STM32_SPI_SPI5_TX_DMA_STREAM STM32_DMA_STREAM_ID_ANY
  376. #define STM32_SPI_SPI6_RX_BDMA_STREAM STM32_BDMA_STREAM_ID_ANY
  377. #define STM32_SPI_SPI6_TX_BDMA_STREAM STM32_BDMA_STREAM_ID_ANY
  378. #define STM32_SPI_SPI1_DMA_PRIORITY 1
  379. #define STM32_SPI_SPI2_DMA_PRIORITY 1
  380. #define STM32_SPI_SPI3_DMA_PRIORITY 1
  381. #define STM32_SPI_SPI4_DMA_PRIORITY 1
  382. #define STM32_SPI_SPI5_DMA_PRIORITY 1
  383. #define STM32_SPI_SPI6_DMA_PRIORITY 1
  384. #define STM32_SPI_SPI1_IRQ_PRIORITY 10
  385. #define STM32_SPI_SPI2_IRQ_PRIORITY 10
  386. #define STM32_SPI_SPI3_IRQ_PRIORITY 10
  387. #define STM32_SPI_SPI4_IRQ_PRIORITY 10
  388. #define STM32_SPI_SPI5_IRQ_PRIORITY 10
  389. #define STM32_SPI_SPI6_IRQ_PRIORITY 10
  390. #define STM32_SPI_DMA_ERROR_HOOK(spip) osalSysHalt("DMA failure")
  391. /*
  392. * ST driver system settings.
  393. */
  394. #define STM32_ST_IRQ_PRIORITY 8
  395. #define STM32_ST_USE_TIMER 2
  396. /*
  397. * TRNG driver system settings.
  398. */
  399. #define STM32_TRNG_USE_RNG1 FALSE
  400. /*
  401. * UART driver system settings.
  402. */
  403. #define STM32_UART_USE_USART1 FALSE
  404. #define STM32_UART_USE_USART2 FALSE
  405. #define STM32_UART_USE_USART3 FALSE
  406. #define STM32_UART_USE_UART4 FALSE
  407. #define STM32_UART_USE_UART5 FALSE
  408. #define STM32_UART_USE_USART6 FALSE
  409. #define STM32_UART_USE_UART7 FALSE
  410. #define STM32_UART_USE_UART8 FALSE
  411. #define STM32_UART_USE_UART9 FALSE
  412. #define STM32_UART_USE_USART10 FALSE
  413. #define STM32_UART_USART1_RX_DMA_STREAM STM32_DMA_STREAM_ID_ANY
  414. #define STM32_UART_USART1_TX_DMA_STREAM STM32_DMA_STREAM_ID_ANY
  415. #define STM32_UART_USART2_RX_DMA_STREAM STM32_DMA_STREAM_ID_ANY
  416. #define STM32_UART_USART2_TX_DMA_STREAM STM32_DMA_STREAM_ID_ANY
  417. #define STM32_UART_USART3_RX_DMA_STREAM STM32_DMA_STREAM_ID_ANY
  418. #define STM32_UART_USART3_TX_DMA_STREAM STM32_DMA_STREAM_ID_ANY
  419. #define STM32_UART_UART4_RX_DMA_STREAM STM32_DMA_STREAM_ID_ANY
  420. #define STM32_UART_UART4_TX_DMA_STREAM STM32_DMA_STREAM_ID_ANY
  421. #define STM32_UART_UART5_RX_DMA_STREAM STM32_DMA_STREAM_ID_ANY
  422. #define STM32_UART_UART5_TX_DMA_STREAM STM32_DMA_STREAM_ID_ANY
  423. #define STM32_UART_USART6_RX_DMA_STREAM STM32_DMA_STREAM_ID_ANY
  424. #define STM32_UART_USART6_TX_DMA_STREAM STM32_DMA_STREAM_ID_ANY
  425. #define STM32_UART_UART7_RX_DMA_STREAM STM32_DMA_STREAM_ID_ANY
  426. #define STM32_UART_UART7_TX_DMA_STREAM STM32_DMA_STREAM_ID_ANY
  427. #define STM32_UART_UART8_RX_DMA_STREAM STM32_DMA_STREAM_ID_ANY
  428. #define STM32_UART_UART8_TX_DMA_STREAM STM32_DMA_STREAM_ID_ANY
  429. #define STM32_UART_UART9_RX_DMA_STREAM STM32_DMA_STREAM_ID_ANY
  430. #define STM32_UART_UART9_TX_DMA_STREAM STM32_DMA_STREAM_ID_ANY
  431. #define STM32_UART_USART10_RX_DMA_STREAM STM32_DMA_STREAM_ID_ANY
  432. #define STM32_UART_USART10_TX_DMA_STREAM STM32_DMA_STREAM_ID_ANY
  433. #define STM32_UART_USART1_DMA_PRIORITY 0
  434. #define STM32_UART_USART2_DMA_PRIORITY 0
  435. #define STM32_UART_USART3_DMA_PRIORITY 0
  436. #define STM32_UART_UART4_DMA_PRIORITY 0
  437. #define STM32_UART_UART5_DMA_PRIORITY 0
  438. #define STM32_UART_USART6_DMA_PRIORITY 0
  439. #define STM32_UART_UART7_DMA_PRIORITY 0
  440. #define STM32_UART_UART8_DMA_PRIORITY 0
  441. #define STM32_UART_UART9_DMA_PRIORITY 0
  442. #define STM32_UART_USART10_DMA_PRIORITY 0
  443. #define STM32_UART_DMA_ERROR_HOOK(uartp) osalSysHalt("DMA failure")
  444. /*
  445. * USB driver system settings.
  446. */
  447. #define STM32_USB_USE_OTG2 TRUE
  448. #define STM32_USB_OTG2_IRQ_PRIORITY 14
  449. #define STM32_USB_OTG2_RX_FIFO_SIZE 1024
  450. #define STM32_USB_HOST_WAKEUP_DURATION 2
  451. /*
  452. * WDG driver system settings.
  453. */
  454. #define STM32_WDG_USE_IWDG FALSE
  455. /*
  456. * WSPI driver system settings.
  457. */
  458. #define STM32_WSPI_USE_OCTOSPI1 FALSE
  459. #define STM32_WSPI_USE_OCTOSPI2 FALSE
  460. #define STM32_WSPI_OCTOSPI1_PRESCALER_VALUE 1
  461. #define STM32_WSPI_OCTOSPI2_PRESCALER_VALUE 1
  462. #define STM32_WSPI_OCTOSPI1_SSHIFT FALSE
  463. #define STM32_WSPI_OCTOSPI2_SSHIFT FALSE
  464. #define STM32_WSPI_OCTOSPI1_DHQC FALSE
  465. #define STM32_WSPI_OCTOSPI2_DHQC FALSE
  466. #define STM32_WSPI_OCTOSPI1_MDMA_CHANNEL STM32_MDMA_CHANNEL_ID_ANY
  467. #define STM32_WSPI_OCTOSPI2_MDMA_CHANNEL STM32_MDMA_CHANNEL_ID_ANY
  468. #define STM32_WSPI_OCTOSPI1_MDMA_PRIORITY 1
  469. #define STM32_WSPI_OCTOSPI2_MDMA_PRIORITY 1
  470. #define STM32_WSPI_OCTOSPI1_MDMA_IRQ_PRIORITY 10
  471. #define STM32_WSPI_OCTOSPI2_MDMA_IRQ_PRIORITY 10
  472. #define STM32_WSPI_DMA_ERROR_HOOK(wspip) osalSysHalt("MDMA failure")
  473. #endif /* MCUCONF_H */