stm32_registry.h 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544
  1. /*
  2. ChibiOS - Copyright (C) 2006..2018 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. /**
  14. * @file STM32F37x/stm32_registry.h
  15. * @brief STM32F37x capabilities registry.
  16. *
  17. * @addtogroup HAL
  18. * @{
  19. */
  20. #ifndef STM32_REGISTRY_H
  21. #define STM32_REGISTRY_H
  22. /*===========================================================================*/
  23. /* Platform capabilities. */
  24. /*===========================================================================*/
  25. /**
  26. * @name STM32F37x capabilities
  27. * @{
  28. */
  29. /*===========================================================================*/
  30. /* STM32F373xC. */
  31. /*===========================================================================*/
  32. #if defined(STM32F373xC) || defined(__DOXYGEN__)
  33. /* ADC attributes.*/
  34. #define STM32_HAS_ADC1 TRUE
  35. #define STM32_HAS_ADC2 FALSE
  36. #define STM32_HAS_ADC3 FALSE
  37. #define STM32_HAS_ADC4 FALSE
  38. #define STM32_HAS_SDADC1 TRUE
  39. #define STM32_HAS_SDADC2 TRUE
  40. #define STM32_HAS_SDADC3 TRUE
  41. /* CAN attributes.*/
  42. #define STM32_HAS_CAN1 TRUE
  43. #define STM32_HAS_CAN2 FALSE
  44. #define STM32_HAS_CAN3 FALSE
  45. #define STM32_CAN_MAX_FILTERS 14
  46. /* DAC attributes.*/
  47. #define STM32_HAS_DAC1_CH1 TRUE
  48. #define STM32_DAC_DAC1_CH1_DMA_STREAM STM32_DMA_STREAM_ID(2, 3)
  49. #define STM32_HAS_DAC1_CH2 TRUE
  50. #define STM32_DAC_DAC1_CH2_DMA_STREAM STM32_DMA_STREAM_ID(2, 4)
  51. #define STM32_HAS_DAC2_CH1 TRUE
  52. #define STM32_DAC_DAC2_CH1_DMA_STREAM STM32_DMA_STREAM_ID(2, 5)
  53. #define STM32_HAS_DAC2_CH2 FALSE
  54. /* DMA attributes.*/
  55. #define STM32_ADVANCED_DMA FALSE
  56. #define STM32_DMA_SUPPORTS_DMAMUX FALSE
  57. #define STM32_DMA_SUPPORTS_CSELR FALSE
  58. #define STM32_DMA1_NUM_CHANNELS 7
  59. #define STM32_DMA1_CH1_HANDLER Vector6C
  60. #define STM32_DMA1_CH2_HANDLER Vector70
  61. #define STM32_DMA1_CH3_HANDLER Vector74
  62. #define STM32_DMA1_CH4_HANDLER Vector78
  63. #define STM32_DMA1_CH5_HANDLER Vector7C
  64. #define STM32_DMA1_CH6_HANDLER Vector80
  65. #define STM32_DMA1_CH7_HANDLER Vector84
  66. #define STM32_DMA1_CH1_NUMBER 11
  67. #define STM32_DMA1_CH2_NUMBER 12
  68. #define STM32_DMA1_CH3_NUMBER 13
  69. #define STM32_DMA1_CH4_NUMBER 14
  70. #define STM32_DMA1_CH5_NUMBER 15
  71. #define STM32_DMA1_CH6_NUMBER 16
  72. #define STM32_DMA1_CH7_NUMBER 17
  73. #define STM32_DMA2_NUM_CHANNELS 5
  74. #define STM32_DMA2_CH1_HANDLER Vector120
  75. #define STM32_DMA2_CH2_HANDLER Vector124
  76. #define STM32_DMA2_CH3_HANDLER Vector128
  77. #define STM32_DMA2_CH4_HANDLER Vector12C
  78. #define STM32_DMA2_CH5_HANDLER Vector130
  79. #define STM32_DMA2_CH1_NUMBER 56
  80. #define STM32_DMA2_CH2_NUMBER 57
  81. #define STM32_DMA2_CH3_NUMBER 58
  82. #define STM32_DMA2_CH4_NUMBER 59
  83. #define STM32_DMA2_CH5_NUMBER 60
  84. /* ETH attributes.*/
  85. #define STM32_HAS_ETH FALSE
  86. /* EXTI attributes.*/
  87. #define STM32_EXTI_NUM_LINES 23
  88. #define STM32_EXTI_IMR_MASK 0x1F800000U
  89. /* GPIO attributes.*/
  90. #define STM32_HAS_GPIOA TRUE
  91. #define STM32_HAS_GPIOB TRUE
  92. #define STM32_HAS_GPIOC TRUE
  93. #define STM32_HAS_GPIOD TRUE
  94. #define STM32_HAS_GPIOE TRUE
  95. #define STM32_HAS_GPIOF TRUE
  96. #define STM32_HAS_GPIOG FALSE
  97. #define STM32_HAS_GPIOH FALSE
  98. #define STM32_HAS_GPIOI FALSE
  99. #define STM32_HAS_GPIOJ FALSE
  100. #define STM32_HAS_GPIOK FALSE
  101. #define STM32_GPIO_EN_MASK (RCC_AHBENR_GPIOAEN | \
  102. RCC_AHBENR_GPIOBEN | \
  103. RCC_AHBENR_GPIOCEN | \
  104. RCC_AHBENR_GPIODEN | \
  105. RCC_AHBENR_GPIOEEN | \
  106. RCC_AHBENR_GPIOFEN)
  107. /* I2C attributes.*/
  108. #define STM32_HAS_I2C1 TRUE
  109. #define STM32_I2C_I2C1_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 7)
  110. #define STM32_I2C_I2C1_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 6)
  111. #define STM32_HAS_I2C2 TRUE
  112. #define STM32_I2C_I2C2_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 5)
  113. #define STM32_I2C_I2C2_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 4)
  114. #define STM32_HAS_I2C3 FALSE
  115. #define STM32_HAS_I2C4 FALSE
  116. /* QUADSPI attributes.*/
  117. #define STM32_HAS_QUADSPI1 FALSE
  118. /* RTC attributes.*/
  119. #define STM32_HAS_RTC TRUE
  120. #define STM32_RTC_HAS_SUBSECONDS TRUE
  121. #define STM32_RTC_HAS_PERIODIC_WAKEUPS TRUE
  122. #define STM32_RTC_NUM_ALARMS 2
  123. #define STM32_RTC_HAS_INTERRUPTS FALSE
  124. /* SDIO attributes.*/
  125. #define STM32_HAS_SDIO FALSE
  126. /* SPI attributes.*/
  127. #define STM32_HAS_SPI1 TRUE
  128. #define STM32_SPI1_SUPPORTS_I2S TRUE
  129. #define STM32_SPI1_I2S_FULLDUPLEX FALSE
  130. #define STM32_SPI_SPI1_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 2)
  131. #define STM32_SPI_SPI1_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 3)
  132. #define STM32_HAS_SPI2 TRUE
  133. #define STM32_SPI2_SUPPORTS_I2S TRUE
  134. #define STM32_SPI2_I2S_FULLDUPLEX FALSE
  135. #define STM32_SPI_SPI2_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 4)
  136. #define STM32_SPI_SPI2_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 5)
  137. #define STM32_HAS_SPI3 TRUE
  138. #define STM32_SPI3_SUPPORTS_I2S TRUE
  139. #define STM32_SPI3_I2S_FULLDUPLEX FALSE
  140. #define STM32_SPI_SPI3_RX_DMA_STREAM STM32_DMA_STREAM_ID(2, 1)
  141. #define STM32_SPI_SPI3_TX_DMA_STREAM STM32_DMA_STREAM_ID(2, 2)
  142. #define STM32_HAS_SPI4 FALSE
  143. #define STM32_HAS_SPI5 FALSE
  144. #define STM32_HAS_SPI6 FALSE
  145. /* TIM attributes.*/
  146. #define STM32_TIM_MAX_CHANNELS 4
  147. #define STM32_HAS_TIM2 TRUE
  148. #define STM32_TIM2_IS_32BITS TRUE
  149. #define STM32_TIM2_CHANNELS 4
  150. #define STM32_HAS_TIM3 TRUE
  151. #define STM32_TIM3_IS_32BITS FALSE
  152. #define STM32_TIM3_CHANNELS 4
  153. #define STM32_HAS_TIM4 TRUE
  154. #define STM32_TIM4_IS_32BITS FALSE
  155. #define STM32_TIM4_CHANNELS 4
  156. #define STM32_HAS_TIM5 TRUE
  157. #define STM32_TIM5_IS_32BITS TRUE
  158. #define STM32_TIM5_CHANNELS 4
  159. #define STM32_HAS_TIM6 TRUE
  160. #define STM32_TIM6_IS_32BITS FALSE
  161. #define STM32_TIM6_CHANNELS 0
  162. #define STM32_HAS_TIM7 TRUE
  163. #define STM32_TIM7_IS_32BITS FALSE
  164. #define STM32_TIM7_CHANNELS 0
  165. #define STM32_HAS_TIM12 TRUE
  166. #define STM32_TIM12_IS_32BITS FALSE
  167. #define STM32_TIM12_CHANNELS 2
  168. #define STM32_HAS_TIM13 TRUE
  169. #define STM32_TIM13_IS_32BITS FALSE
  170. #define STM32_TIM13_CHANNELS 1
  171. #define STM32_HAS_TIM14 TRUE
  172. #define STM32_TIM14_IS_32BITS FALSE
  173. #define STM32_TIM14_CHANNELS 1
  174. #define STM32_HAS_TIM15 TRUE
  175. #define STM32_TIM15_IS_32BITS FALSE
  176. #define STM32_TIM15_CHANNELS 2
  177. #define STM32_HAS_TIM16 TRUE
  178. #define STM32_TIM16_IS_32BITS FALSE
  179. #define STM32_TIM16_CHANNELS 1
  180. #define STM32_HAS_TIM17 TRUE
  181. #define STM32_TIM17_IS_32BITS FALSE
  182. #define STM32_TIM17_CHANNELS 1
  183. #define STM32_HAS_TIM18 TRUE
  184. #define STM32_TIM18_IS_32BITS FALSE
  185. #define STM32_TIM18_CHANNELS 0
  186. #define STM32_HAS_TIM19 TRUE
  187. #define STM32_TIM19_IS_32BITS FALSE
  188. #define STM32_TIM19_CHANNELS 4
  189. #define STM32_HAS_TIM1 FALSE
  190. #define STM32_HAS_TIM8 FALSE
  191. #define STM32_HAS_TIM9 FALSE
  192. #define STM32_HAS_TIM10 FALSE
  193. #define STM32_HAS_TIM11 FALSE
  194. #define STM32_HAS_TIM20 FALSE
  195. #define STM32_HAS_TIM21 FALSE
  196. #define STM32_HAS_TIM22 FALSE
  197. /* USART attributes.*/
  198. #define STM32_HAS_USART1 TRUE
  199. #define STM32_UART_USART1_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 5)
  200. #define STM32_UART_USART1_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 4)
  201. #define STM32_HAS_USART2 TRUE
  202. #define STM32_UART_USART2_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 6)
  203. #define STM32_UART_USART2_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 7)
  204. #define STM32_HAS_USART3 TRUE
  205. #define STM32_UART_USART3_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 3)
  206. #define STM32_UART_USART3_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 2)
  207. #define STM32_HAS_UART4 FALSE
  208. #define STM32_HAS_UART5 FALSE
  209. #define STM32_HAS_USART6 FALSE
  210. #define STM32_HAS_UART7 FALSE
  211. #define STM32_HAS_UART8 FALSE
  212. #define STM32_HAS_LPUART1 FALSE
  213. /* USB attributes.*/
  214. #define STM32_HAS_USB TRUE
  215. #define STM32_USB_ACCESS_SCHEME_2x16 FALSE
  216. #define STM32_USB_PMA_SIZE 512
  217. #define STM32_USB_HAS_BCDR FALSE
  218. #define STM32_HAS_OTG1 FALSE
  219. #define STM32_HAS_OTG2 FALSE
  220. /* IWDG attributes.*/
  221. #define STM32_HAS_IWDG TRUE
  222. #define STM32_IWDG_IS_WINDOWED TRUE
  223. /* LTDC attributes.*/
  224. #define STM32_HAS_LTDC FALSE
  225. /* DMA2D attributes.*/
  226. #define STM32_HAS_DMA2D FALSE
  227. /* FSMC attributes.*/
  228. #define STM32_HAS_FSMC FALSE
  229. /* CRC attributes.*/
  230. #define STM32_HAS_CRC TRUE
  231. #define STM32_CRC_PROGRAMMABLE TRUE
  232. #endif /* defined(STM32F373xC) */
  233. /*===========================================================================*/
  234. /* STM32F378xx. */
  235. /*===========================================================================*/
  236. #if defined(STM32F378xx) || defined(__DOXYGEN__)
  237. /* ADC attributes.*/
  238. #define STM32_HAS_ADC1 TRUE
  239. #define STM32_HAS_ADC2 FALSE
  240. #define STM32_HAS_ADC3 FALSE
  241. #define STM32_HAS_ADC4 FALSE
  242. #define STM32_HAS_SDADC1 TRUE
  243. #define STM32_HAS_SDADC2 TRUE
  244. #define STM32_HAS_SDADC3 TRUE
  245. /* CAN attributes.*/
  246. #define STM32_HAS_CAN1 TRUE
  247. #define STM32_HAS_CAN2 FALSE
  248. #define STM32_HAS_CAN3 FALSE
  249. #define STM32_CAN_MAX_FILTERS 14
  250. /* DAC attributes.*/
  251. #define STM32_HAS_DAC1_CH1 TRUE
  252. #define STM32_DAC_DAC1_CH1_DMA_STREAM STM32_DMA_STREAM_ID(2, 3)
  253. #define STM32_HAS_DAC1_CH2 TRUE
  254. #define STM32_DAC_DAC1_CH2_DMA_STREAM STM32_DMA_STREAM_ID(2, 4)
  255. #define STM32_HAS_DAC2_CH1 TRUE
  256. #define STM32_DAC_DAC2_CH1_DMA_STREAM STM32_DMA_STREAM_ID(2, 5)
  257. #define STM32_HAS_DAC2_CH2 FALSE
  258. /* DMA attributes.*/
  259. #define STM32_ADVANCED_DMA FALSE
  260. #define STM32_DMA_SUPPORTS_DMAMUX FALSE
  261. #define STM32_DMA_SUPPORTS_CSELR FALSE
  262. #define STM32_DMA1_NUM_CHANNELS 7
  263. #define STM32_DMA1_CH1_HANDLER Vector6C
  264. #define STM32_DMA1_CH2_HANDLER Vector70
  265. #define STM32_DMA1_CH3_HANDLER Vector74
  266. #define STM32_DMA1_CH4_HANDLER Vector78
  267. #define STM32_DMA1_CH5_HANDLER Vector7C
  268. #define STM32_DMA1_CH6_HANDLER Vector80
  269. #define STM32_DMA1_CH7_HANDLER Vector84
  270. #define STM32_DMA1_CH1_NUMBER 11
  271. #define STM32_DMA1_CH2_NUMBER 12
  272. #define STM32_DMA1_CH3_NUMBER 13
  273. #define STM32_DMA1_CH4_NUMBER 14
  274. #define STM32_DMA1_CH5_NUMBER 15
  275. #define STM32_DMA1_CH6_NUMBER 16
  276. #define STM32_DMA1_CH7_NUMBER 17
  277. #define STM32_DMA2_NUM_CHANNELS 5
  278. #define STM32_DMA2_CH1_HANDLER Vector120
  279. #define STM32_DMA2_CH2_HANDLER Vector124
  280. #define STM32_DMA2_CH3_HANDLER Vector128
  281. #define STM32_DMA2_CH4_HANDLER Vector12C
  282. #define STM32_DMA2_CH5_HANDLER Vector130
  283. #define STM32_DMA2_CH1_NUMBER 56
  284. #define STM32_DMA2_CH2_NUMBER 57
  285. #define STM32_DMA2_CH3_NUMBER 58
  286. #define STM32_DMA2_CH4_NUMBER 59
  287. #define STM32_DMA2_CH5_NUMBER 60
  288. /* ETH attributes.*/
  289. #define STM32_HAS_ETH FALSE
  290. /* EXTI attributes.*/
  291. #define STM32_EXTI_NUM_LINES 23
  292. #define STM32_EXTI_IMR_MASK 0x1F800000U
  293. /* GPIO attributes.*/
  294. #define STM32_HAS_GPIOA TRUE
  295. #define STM32_HAS_GPIOB TRUE
  296. #define STM32_HAS_GPIOC TRUE
  297. #define STM32_HAS_GPIOD TRUE
  298. #define STM32_HAS_GPIOE TRUE
  299. #define STM32_HAS_GPIOF TRUE
  300. #define STM32_HAS_GPIOG FALSE
  301. #define STM32_HAS_GPIOH FALSE
  302. #define STM32_HAS_GPIOI FALSE
  303. #define STM32_HAS_GPIOJ FALSE
  304. #define STM32_HAS_GPIOK FALSE
  305. #define STM32_GPIO_EN_MASK (RCC_AHBENR_GPIOAEN | \
  306. RCC_AHBENR_GPIOBEN | \
  307. RCC_AHBENR_GPIOCEN | \
  308. RCC_AHBENR_GPIODEN | \
  309. RCC_AHBENR_GPIOEEN | \
  310. RCC_AHBENR_GPIOFEN)
  311. /* I2C attributes.*/
  312. #define STM32_HAS_I2C1 TRUE
  313. #define STM32_I2C_I2C1_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 7)
  314. #define STM32_I2C_I2C1_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 6)
  315. #define STM32_HAS_I2C2 TRUE
  316. #define STM32_I2C_I2C2_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 5)
  317. #define STM32_I2C_I2C2_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 4)
  318. #define STM32_HAS_I2C3 FALSE
  319. #define STM32_HAS_I2C4 FALSE
  320. /* QUADSPI attributes.*/
  321. #define STM32_HAS_QUADSPI1 FALSE
  322. /* RTC attributes.*/
  323. #define STM32_HAS_RTC TRUE
  324. #define STM32_RTC_HAS_SUBSECONDS TRUE
  325. #define STM32_RTC_HAS_PERIODIC_WAKEUPS TRUE
  326. #define STM32_RTC_NUM_ALARMS 2
  327. #define STM32_RTC_HAS_INTERRUPTS FALSE
  328. /* SDIO attributes.*/
  329. #define STM32_HAS_SDIO FALSE
  330. /* SPI attributes.*/
  331. #define STM32_HAS_SPI1 TRUE
  332. #define STM32_SPI1_SUPPORTS_I2S TRUE
  333. #define STM32_SPI1_I2S_FULLDUPLEX FALSE
  334. #define STM32_SPI_SPI1_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 2)
  335. #define STM32_SPI_SPI1_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 3)
  336. #define STM32_HAS_SPI2 TRUE
  337. #define STM32_SPI2_SUPPORTS_I2S TRUE
  338. #define STM32_SPI2_I2S_FULLDUPLEX FALSE
  339. #define STM32_SPI_SPI2_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 4)
  340. #define STM32_SPI_SPI2_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 5)
  341. #define STM32_HAS_SPI3 TRUE
  342. #define STM32_SPI3_SUPPORTS_I2S TRUE
  343. #define STM32_SPI3_I2S_FULLDUPLEX FALSE
  344. #define STM32_SPI_SPI3_RX_DMA_STREAM STM32_DMA_STREAM_ID(2, 1)
  345. #define STM32_SPI_SPI3_TX_DMA_STREAM STM32_DMA_STREAM_ID(2, 2)
  346. #define STM32_HAS_SPI4 FALSE
  347. #define STM32_HAS_SPI5 FALSE
  348. #define STM32_HAS_SPI6 FALSE
  349. /* TIM attributes.*/
  350. #define STM32_TIM_MAX_CHANNELS 4
  351. #define STM32_HAS_TIM2 TRUE
  352. #define STM32_TIM2_IS_32BITS TRUE
  353. #define STM32_TIM2_CHANNELS 4
  354. #define STM32_HAS_TIM3 TRUE
  355. #define STM32_TIM3_IS_32BITS FALSE
  356. #define STM32_TIM3_CHANNELS 4
  357. #define STM32_HAS_TIM4 TRUE
  358. #define STM32_TIM4_IS_32BITS FALSE
  359. #define STM32_TIM4_CHANNELS 4
  360. #define STM32_HAS_TIM5 TRUE
  361. #define STM32_TIM5_IS_32BITS TRUE
  362. #define STM32_TIM5_CHANNELS 4
  363. #define STM32_HAS_TIM6 TRUE
  364. #define STM32_TIM6_IS_32BITS FALSE
  365. #define STM32_TIM6_CHANNELS 0
  366. #define STM32_HAS_TIM7 TRUE
  367. #define STM32_TIM7_IS_32BITS FALSE
  368. #define STM32_TIM7_CHANNELS 0
  369. #define STM32_HAS_TIM12 TRUE
  370. #define STM32_TIM12_IS_32BITS FALSE
  371. #define STM32_TIM12_CHANNELS 2
  372. #define STM32_HAS_TIM13 TRUE
  373. #define STM32_TIM13_IS_32BITS FALSE
  374. #define STM32_TIM13_CHANNELS 1
  375. #define STM32_HAS_TIM14 TRUE
  376. #define STM32_TIM14_IS_32BITS FALSE
  377. #define STM32_TIM14_CHANNELS 1
  378. #define STM32_HAS_TIM15 TRUE
  379. #define STM32_TIM15_IS_32BITS FALSE
  380. #define STM32_TIM15_CHANNELS 2
  381. #define STM32_HAS_TIM16 TRUE
  382. #define STM32_TIM16_IS_32BITS FALSE
  383. #define STM32_TIM16_CHANNELS 1
  384. #define STM32_HAS_TIM17 TRUE
  385. #define STM32_TIM17_IS_32BITS FALSE
  386. #define STM32_TIM17_CHANNELS 1
  387. #define STM32_HAS_TIM18 TRUE
  388. #define STM32_TIM18_IS_32BITS FALSE
  389. #define STM32_TIM18_CHANNELS 0
  390. #define STM32_HAS_TIM19 TRUE
  391. #define STM32_TIM19_IS_32BITS FALSE
  392. #define STM32_TIM19_CHANNELS 4
  393. #define STM32_HAS_TIM1 FALSE
  394. #define STM32_HAS_TIM8 FALSE
  395. #define STM32_HAS_TIM9 FALSE
  396. #define STM32_HAS_TIM10 FALSE
  397. #define STM32_HAS_TIM11 FALSE
  398. #define STM32_HAS_TIM20 FALSE
  399. #define STM32_HAS_TIM21 FALSE
  400. #define STM32_HAS_TIM22 FALSE
  401. /* USART attributes.*/
  402. #define STM32_HAS_USART1 TRUE
  403. #define STM32_UART_USART1_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 5)
  404. #define STM32_UART_USART1_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 4)
  405. #define STM32_HAS_USART2 TRUE
  406. #define STM32_UART_USART2_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 6)
  407. #define STM32_UART_USART2_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 7)
  408. #define STM32_HAS_USART3 TRUE
  409. #define STM32_UART_USART3_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 3)
  410. #define STM32_UART_USART3_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 2)
  411. #define STM32_HAS_UART4 FALSE
  412. #define STM32_HAS_UART5 FALSE
  413. #define STM32_HAS_USART6 FALSE
  414. #define STM32_HAS_UART7 FALSE
  415. #define STM32_HAS_UART8 FALSE
  416. #define STM32_HAS_LPUART1 FALSE
  417. /* USB attributes.*/
  418. #define STM32_HAS_USB FALSE
  419. #define STM32_USB_ACCESS_SCHEME_2x16 FALSE
  420. #define STM32_USB_PMA_SIZE 512
  421. #define STM32_HAS_OTG1 FALSE
  422. #define STM32_HAS_OTG2 FALSE
  423. /* IWDG attributes.*/
  424. #define STM32_HAS_IWDG TRUE
  425. #define STM32_IWDG_IS_WINDOWED TRUE
  426. /* LTDC attributes.*/
  427. #define STM32_HAS_LTDC FALSE
  428. /* DMA2D attributes.*/
  429. #define STM32_HAS_DMA2D FALSE
  430. /* FSMC attributes.*/
  431. #define STM32_HAS_FSMC FALSE
  432. /* CRC attributes.*/
  433. #define STM32_HAS_CRC TRUE
  434. #define STM32_CRC_PROGRAMMABLE TRUE
  435. #endif /* defined(STM32F378xx) */
  436. /** @} */
  437. #endif /* STM32_REGISTRY_H */
  438. /** @} */