stm32_registry.h 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441
  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 STM32H7xx/stm32_registry.h
  15. * @brief STM32H7xx 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 STM32F7xx capabilities
  27. * @{
  28. */
  29. /*===========================================================================*/
  30. /* STM32H743xx, STM32H753xx. */
  31. /*===========================================================================*/
  32. #if defined(STM32H743xx) || defined(STM32H753xx) || \
  33. defined(__DOXYGEN__)
  34. /* ADC attributes.*/
  35. #define STM32_ADC12_HANDLER Vector88
  36. #define STM32_ADC12_NUMBER 18
  37. #define STM32_ADC3_HANDLER Vector23C
  38. #define STM32_ADC3_NUMBER 127
  39. #define STM32_HAS_ADC1 TRUE
  40. #define STM32_HAS_ADC2 TRUE
  41. #define STM32_HAS_ADC3 TRUE
  42. #define STM32_HAS_ADC4 FALSE
  43. #define STM32_HAS_SDADC1 FALSE
  44. #define STM32_HAS_SDADC2 FALSE
  45. #define STM32_HAS_SDADC3 FALSE
  46. /* CAN attributes.*/
  47. #define STM32_HAS_CAN1 FALSE
  48. #define STM32_HAS_CAN2 FALSE
  49. #define STM32_HAS_CAN3 FALSE
  50. /* DAC attributes.*/
  51. #define STM32_HAS_DAC1_CH1 TRUE
  52. #define STM32_HAS_DAC1_CH2 TRUE
  53. #define STM32_HAS_DAC2_CH1 FALSE
  54. #define STM32_HAS_DAC2_CH2 FALSE
  55. /* BDMA attributes.*/
  56. #define STM32_HAS_BDMA1 TRUE
  57. #define STM32_BDMA1_CH0_HANDLER Vector244
  58. #define STM32_BDMA1_CH1_HANDLER Vector248
  59. #define STM32_BDMA1_CH2_HANDLER Vector24C
  60. #define STM32_BDMA1_CH3_HANDLER Vector250
  61. #define STM32_BDMA1_CH4_HANDLER Vector254
  62. #define STM32_BDMA1_CH5_HANDLER Vector258
  63. #define STM32_BDMA1_CH6_HANDLER Vector25C
  64. #define STM32_BDMA1_CH7_HANDLER Vector260
  65. #define STM32_BDMA1_CH0_NUMBER 129
  66. #define STM32_BDMA1_CH1_NUMBER 130
  67. #define STM32_BDMA1_CH2_NUMBER 131
  68. #define STM32_BDMA1_CH3_NUMBER 132
  69. #define STM32_BDMA1_CH4_NUMBER 133
  70. #define STM32_BDMA1_CH5_NUMBER 134
  71. #define STM32_BDMA1_CH6_NUMBER 135
  72. #define STM32_BDMA1_CH7_NUMBER 136
  73. /* DMA attributes.*/
  74. #define STM32_ADVANCED_DMA TRUE
  75. #define STM32_DMA_SUPPORTS_DMAMUX TRUE
  76. #define STM32_HAS_DMA1 TRUE
  77. #define STM32_DMA1_CH0_HANDLER Vector6C
  78. #define STM32_DMA1_CH1_HANDLER Vector70
  79. #define STM32_DMA1_CH2_HANDLER Vector74
  80. #define STM32_DMA1_CH3_HANDLER Vector78
  81. #define STM32_DMA1_CH4_HANDLER Vector7C
  82. #define STM32_DMA1_CH5_HANDLER Vector80
  83. #define STM32_DMA1_CH6_HANDLER Vector84
  84. #define STM32_DMA1_CH7_HANDLER VectorFC
  85. #define STM32_DMA1_CH0_NUMBER 11
  86. #define STM32_DMA1_CH1_NUMBER 12
  87. #define STM32_DMA1_CH2_NUMBER 13
  88. #define STM32_DMA1_CH3_NUMBER 14
  89. #define STM32_DMA1_CH4_NUMBER 15
  90. #define STM32_DMA1_CH5_NUMBER 16
  91. #define STM32_DMA1_CH6_NUMBER 17
  92. #define STM32_DMA1_CH7_NUMBER 47
  93. #define STM32_HAS_DMA2 TRUE
  94. #define STM32_DMA2_CH0_HANDLER Vector120
  95. #define STM32_DMA2_CH1_HANDLER Vector124
  96. #define STM32_DMA2_CH2_HANDLER Vector128
  97. #define STM32_DMA2_CH3_HANDLER Vector12C
  98. #define STM32_DMA2_CH4_HANDLER Vector130
  99. #define STM32_DMA2_CH5_HANDLER Vector150
  100. #define STM32_DMA2_CH6_HANDLER Vector154
  101. #define STM32_DMA2_CH7_HANDLER Vector158
  102. #define STM32_DMA2_CH0_NUMBER 56
  103. #define STM32_DMA2_CH1_NUMBER 57
  104. #define STM32_DMA2_CH2_NUMBER 58
  105. #define STM32_DMA2_CH3_NUMBER 59
  106. #define STM32_DMA2_CH4_NUMBER 60
  107. #define STM32_DMA2_CH5_NUMBER 68
  108. #define STM32_DMA2_CH6_NUMBER 69
  109. #define STM32_DMA2_CH7_NUMBER 70
  110. /* ETH attributes.*/
  111. #define STM32_HAS_ETH TRUE
  112. #define STM32_ETH_HANDLER Vector134
  113. #define STM32_ETH_NUMBER 61
  114. /* EXTI attributes.*/
  115. #define STM32_EXTI_NUM_LINES 34
  116. #define STM32_EXTI_IMR1_MASK 0x1F800000U
  117. #define STM32_EXTI_IMR2_MASK 0xFFFFFFFCU
  118. /* GPIO attributes.*/
  119. #define STM32_HAS_GPIOA TRUE
  120. #define STM32_HAS_GPIOB TRUE
  121. #define STM32_HAS_GPIOC TRUE
  122. #define STM32_HAS_GPIOD TRUE
  123. #define STM32_HAS_GPIOE TRUE
  124. #define STM32_HAS_GPIOH TRUE
  125. #define STM32_HAS_GPIOF TRUE
  126. #define STM32_HAS_GPIOG TRUE
  127. #define STM32_HAS_GPIOI TRUE
  128. #define STM32_HAS_GPIOJ TRUE
  129. #define STM32_HAS_GPIOK TRUE
  130. #define STM32_GPIO_EN_MASK (RCC_AHB4ENR_GPIOAEN | \
  131. RCC_AHB4ENR_GPIOBEN | \
  132. RCC_AHB4ENR_GPIOCEN | \
  133. RCC_AHB4ENR_GPIODEN | \
  134. RCC_AHB4ENR_GPIOEEN | \
  135. RCC_AHB4ENR_GPIOFEN | \
  136. RCC_AHB4ENR_GPIOGEN | \
  137. RCC_AHB4ENR_GPIOHEN | \
  138. RCC_AHB4ENR_GPIOIEN | \
  139. RCC_AHB4ENR_GPIOJEN | \
  140. RCC_AHB4ENR_GPIOKEN)
  141. /* I2C attributes.*/
  142. #define STM32_HAS_I2C1 TRUE
  143. #define STM32_I2C1_EVENT_HANDLER VectorBC
  144. #define STM32_I2C1_ERROR_HANDLER VectorC0
  145. #define STM32_I2C1_EVENT_NUMBER 31
  146. #define STM32_I2C1_ERROR_NUMBER 32
  147. #define STM32_HAS_I2C2 TRUE
  148. #define STM32_I2C2_EVENT_HANDLER VectorC4
  149. #define STM32_I2C2_ERROR_HANDLER VectorC8
  150. #define STM32_I2C2_EVENT_NUMBER 33
  151. #define STM32_I2C2_ERROR_NUMBER 34
  152. #define STM32_HAS_I2C3 TRUE
  153. #define STM32_I2C3_EVENT_HANDLER Vector160
  154. #define STM32_I2C3_ERROR_HANDLER Vector164
  155. #define STM32_I2C3_EVENT_NUMBER 72
  156. #define STM32_I2C3_ERROR_NUMBER 73
  157. #define STM32_HAS_I2C4 TRUE
  158. #define STM32_I2C4_EVENT_HANDLER Vector1BC
  159. #define STM32_I2C4_ERROR_HANDLER Vector1C0
  160. #define STM32_I2C4_EVENT_NUMBER 95
  161. #define STM32_I2C4_ERROR_NUMBER 96
  162. /* QUADSPI attributes.*/
  163. #define STM32_HAS_QUADSPI1 FALSE
  164. /* RTC attributes.*/
  165. #define STM32_HAS_RTC TRUE
  166. #define STM32_RTC_HAS_SUBSECONDS TRUE
  167. #define STM32_RTC_HAS_PERIODIC_WAKEUPS TRUE
  168. #define STM32_RTC_NUM_ALARMS 2
  169. #define STM32_RTC_HAS_INTERRUPTS FALSE
  170. /* SDMMC attributes.*/
  171. #define STM32_HAS_SDMMC1 TRUE
  172. #define STM32_SDMMC1_HANDLER Vector104
  173. #define STM32_SDMMC1_NUMBER 49
  174. #define STM32_HAS_SDMMC2 TRUE
  175. #define STM32_SDMMC2_HANDLER Vector230
  176. #define STM32_SDMMC2_NUMBER 124
  177. /* SPI attributes.*/
  178. #define STM32_HAS_SPI1 TRUE
  179. #define STM32_SPI1_SUPPORTS_I2S TRUE
  180. #define STM32_SPI1_I2S_FULLDUPLEX TRUE
  181. #define STM32_SPI1_HANDLER VectorCC
  182. #define STM32_SPI1_NUMBER 35
  183. #define STM32_HAS_SPI2 TRUE
  184. #define STM32_SPI2_SUPPORTS_I2S TRUE
  185. #define STM32_SPI2_I2S_FULLDUPLEX TRUE
  186. #define STM32_SPI2_HANDLER VectorD0
  187. #define STM32_SPI2_NUMBER 36
  188. #define STM32_HAS_SPI3 TRUE
  189. #define STM32_SPI3_SUPPORTS_I2S TRUE
  190. #define STM32_SPI3_I2S_FULLDUPLEX TRUE
  191. #define STM32_SPI3_HANDLER Vector10C
  192. #define STM32_SPI3_NUMBER 51
  193. #define STM32_HAS_SPI4 TRUE
  194. #define STM32_SPI4_SUPPORTS_I2S FALSE
  195. #define STM32_SPI4_HANDLER Vector190
  196. #define STM32_SPI4_NUMBER 84
  197. #define STM32_HAS_SPI5 TRUE
  198. #define STM32_SPI5_SUPPORTS_I2S FALSE
  199. #define STM32_SPI5_HANDLER Vector194
  200. #define STM32_SPI5_NUMBER 85
  201. #define STM32_HAS_SPI6 TRUE
  202. #define STM32_SPI6_SUPPORTS_I2S FALSE
  203. #define STM32_SPI6_HANDLER Vector198
  204. #define STM32_SPI6_NUMBER 86
  205. /* TIM attributes.*/
  206. #define STM32_TIM_MAX_CHANNELS 6
  207. #define STM32_HAS_TIM1 TRUE
  208. #define STM32_TIM1_IS_32BITS FALSE
  209. #define STM32_TIM1_CHANNELS 6
  210. #define STM32_TIM1_UP_HANDLER VectorA4
  211. #define STM32_TIM1_CC_HANDLER VectorAC
  212. #define STM32_TIM1_UP_NUMBER 25
  213. #define STM32_TIM1_CC_NUMBER 27
  214. #define STM32_HAS_TIM2 TRUE
  215. #define STM32_TIM2_IS_32BITS TRUE
  216. #define STM32_TIM2_CHANNELS 4
  217. #define STM32_TIM2_HANDLER VectorB0
  218. #define STM32_TIM2_NUMBER 28
  219. #define STM32_HAS_TIM3 TRUE
  220. #define STM32_TIM3_IS_32BITS FALSE
  221. #define STM32_TIM3_CHANNELS 4
  222. #define STM32_TIM3_HANDLER VectorB4
  223. #define STM32_TIM3_NUMBER 29
  224. #define STM32_HAS_TIM4 TRUE
  225. #define STM32_TIM4_IS_32BITS FALSE
  226. #define STM32_TIM4_CHANNELS 4
  227. #define STM32_TIM4_HANDLER VectorB8
  228. #define STM32_TIM4_NUMBER 30
  229. #define STM32_HAS_TIM5 TRUE
  230. #define STM32_TIM5_IS_32BITS TRUE
  231. #define STM32_TIM5_CHANNELS 4
  232. #define STM32_TIM5_HANDLER Vector108
  233. #define STM32_TIM5_NUMBER 50
  234. #define STM32_HAS_TIM6 TRUE
  235. #define STM32_TIM6_IS_32BITS FALSE
  236. #define STM32_TIM6_CHANNELS 0
  237. #define STM32_TIM6_HANDLER Vector118
  238. #define STM32_TIM6_NUMBER 54
  239. #define STM32_HAS_TIM7 TRUE
  240. #define STM32_TIM7_IS_32BITS FALSE
  241. #define STM32_TIM7_CHANNELS 0
  242. #define STM32_TIM7_HANDLER Vector11C
  243. #define STM32_TIM7_NUMBER 55
  244. #define STM32_HAS_TIM12 TRUE
  245. #define STM32_TIM12_IS_32BITS FALSE
  246. #define STM32_TIM12_CHANNELS 2
  247. #define STM32_TIM12_HANDLER VectorEC
  248. #define STM32_TIM12_NUMBER 43
  249. #define STM32_HAS_TIM13 TRUE
  250. #define STM32_TIM13_IS_32BITS FALSE
  251. #define STM32_TIM13_CHANNELS 1
  252. #define STM32_TIM13_HANDLER VectorF0
  253. #define STM32_TIM13_NUMBER 44
  254. #define STM32_HAS_TIM14 TRUE
  255. #define STM32_TIM14_IS_32BITS FALSE
  256. #define STM32_TIM14_CHANNELS 1
  257. #define STM32_TIM14_HANDLER VectorF4
  258. #define STM32_TIM14_NUMBER 45
  259. #define STM32_HAS_TIM15 TRUE
  260. #define STM32_TIM15_IS_32BITS FALSE
  261. #define STM32_TIM15_CHANNELS 2
  262. #define STM32_TIM15_HANDLER Vector210
  263. #define STM32_TIM15_NUMBER 116
  264. #define STM32_HAS_TIM16 FALSE
  265. #define STM32_TIM16_IS_32BITS FALSE
  266. #define STM32_TIM16_CHANNELS 1
  267. #define STM32_TIM16_HANDLER Vector214
  268. #define STM32_TIM16_NUMBER 117
  269. #define STM32_HAS_TIM17 FALSE
  270. #define STM32_TIM17_IS_32BITS FALSE
  271. #define STM32_TIM17_CHANNELS 1
  272. #define STM32_TIM17_HANDLER Vector218
  273. #define STM32_TIM17_NUMBER 118
  274. #define STM32_HAS_TIM8 FALSE
  275. #define STM32_HAS_TIM9 FALSE
  276. #define STM32_HAS_TIM10 FALSE
  277. #define STM32_HAS_TIM11 FALSE
  278. #define STM32_HAS_TIM18 FALSE
  279. #define STM32_HAS_TIM19 FALSE
  280. #define STM32_HAS_TIM20 FALSE
  281. #define STM32_HAS_TIM21 FALSE
  282. #define STM32_HAS_TIM22 FALSE
  283. /* USART attributes.*/
  284. #define STM32_HAS_USART1 TRUE
  285. #define STM32_USART1_HANDLER VectorD4
  286. #define STM32_USART1_NUMBER 37
  287. #define STM32_HAS_USART2 TRUE
  288. #define STM32_USART2_HANDLER VectorD8
  289. #define STM32_USART2_NUMBER 38
  290. #define STM32_HAS_USART3 TRUE
  291. #define STM32_USART3_HANDLER VectorDC
  292. #define STM32_USART3_NUMBER 39
  293. #define STM32_HAS_UART4 TRUE
  294. #define STM32_UART4_HANDLER Vector110
  295. #define STM32_UART4_NUMBER 52
  296. #define STM32_HAS_UART5 TRUE
  297. #define STM32_UART5_HANDLER Vector114
  298. #define STM32_UART5_NUMBER 53
  299. #define STM32_HAS_USART6 TRUE
  300. #define STM32_USART6_HANDLER Vector15C
  301. #define STM32_USART6_NUMBER 71
  302. #define STM32_HAS_UART7 TRUE
  303. #define STM32_UART7_HANDLER Vector188
  304. #define STM32_UART7_NUMBER 82
  305. #define STM32_HAS_UART8 TRUE
  306. #define STM32_UART8_HANDLER Vector18C
  307. #define STM32_UART8_NUMBER 83
  308. #define STM32_HAS_LPUART1 FALSE
  309. /* USB attributes.*/
  310. #define STM32_OTG_STEPPING 2
  311. #define STM32_HAS_OTG1 TRUE
  312. #define STM32_OTG1_ENDPOINTS 8
  313. #define STM32_OTG1_HANDLER Vector1D4
  314. #define STM32_OTG1_EP1OUT_HANDLER Vector1C8
  315. #define STM32_OTG1_EP1IN_HANDLER Vector1CC
  316. #define STM32_OTG1_NUMBER 101
  317. #define STM32_OTG1_EP1OUT_NUMBER 98
  318. #define STM32_OTG1_EP1IN_NUMBER 99
  319. #define STM32_HAS_OTG2 TRUE
  320. #define STM32_OTG2_ENDPOINTS 8
  321. #define STM32_OTG2_HANDLER Vector174
  322. #define STM32_OTG2_EP1OUT_HANDLER Vector168
  323. #define STM32_OTG2_EP1IN_HANDLER Vector16C
  324. #define STM32_OTG2_NUMBER 77
  325. #define STM32_OTG2_EP1OUT_NUMBER 74
  326. #define STM32_OTG2_EP1IN_NUMBER 75
  327. #define STM32_HAS_USB FALSE
  328. /* IWDG attributes.*/
  329. #define STM32_HAS_IWDG TRUE
  330. #define STM32_IWDG_IS_WINDOWED TRUE
  331. /* LTDC attributes.*/
  332. #define STM32_HAS_LTDC TRUE
  333. #define STM32_LTDC_EV_HANDLER Vector1A0
  334. #define STM32_LTDC_ER_HANDLER Vector1A4
  335. #define STM32_LTDC_EV_NUMBER 88
  336. #define STM32_LTDC_ER_NUMBER 89
  337. /* DMA2D attributes.*/
  338. #define STM32_HAS_DMA2D TRUE
  339. #define STM32_DMA2D_HANDLER Vector1A8
  340. #define STM32_DMA2D_NUMBER 90
  341. /* FSMC attributes.*/
  342. #define STM32_HAS_FSMC TRUE
  343. #define STM32_FSMC_IS_FMC TRUE
  344. #define STM32_FSMC_HANDLER Vector100
  345. #define STM32_FSMC_NUMBER 48
  346. /* CRC attributes.*/
  347. #define STM32_HAS_CRC TRUE
  348. #define STM32_CRC_PROGRAMMABLE TRUE
  349. /* DCMI attributes.*/
  350. #define STM32_HAS_DCMI TRUE
  351. #define STM32_DCMI_HANDLER Vector178
  352. #define STM32_DCMI_NUMBER 78
  353. /* FDCAN attrubutes */
  354. #define STM32_HAS_FDCAN1 TRUE
  355. #define STM32_FDCAN1_IT0_HANDLER Vector8C
  356. #define STM32_FDCAN1_IT1_HANDLER Vector94
  357. #define STM32_FDCAN1_IT0_NUMBER 19
  358. #define STM32_FDCAN1_IT1_NUMBER 21
  359. #define STM32_HAS_FDCAN2 TRUE
  360. #define STM32_FDCAN2_IT0_HANDLER Vector90
  361. #define STM32_FDCAN2_IT1_HANDLER Vector98
  362. #define STM32_FDCAN2_IT0_NUMBER 20
  363. #define STM32_FDCAN2_IT1_NUMBER 22
  364. #endif /* defined(STM32H743xx) || defined(STM32H753xx) */
  365. /** @} */
  366. #endif /* STM32_REGISTRY_H */
  367. /** @} */