STM32F427xx.py 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779
  1. #!/usr/bin/env python
  2. '''
  3. these tables are generated from the STM32 datasheets for the
  4. STM32F42x
  5. '''
  6. # additional build information for ChibiOS
  7. build = {
  8. "CHIBIOS_STARTUP_MK" : "os/common/startup/ARMCMx/compilers/GCC/mk/startup_stm32f4xx.mk",
  9. "CHIBIOS_PLATFORM_MK" : "os/hal/ports/STM32/STM32F4xx/platform.mk"
  10. }
  11. # MCU parameters
  12. mcu = {
  13. # location of MCU serial number
  14. 'UDID_START' : 0x1FFF7A10,
  15. # ram map, as list of (address, size-kb, flags)
  16. # flags of 1 means DMA-capable
  17. # flags of 2 means faster memory for CPU intensive work
  18. 'RAM_MAP' : [
  19. (0x20000000, 192, 1), # main memory, DMA safe
  20. (0x10000000, 64, 2), # CCM memory, faster, but not DMA safe
  21. ]
  22. }
  23. DMA_Map = {
  24. # format is (DMA_TABLE, StreamNum, Channel)
  25. # extracted from tabula-STM32F4x7-dma.csv
  26. "ADC1" : [(2,0,0),(2,4,0)],
  27. "ADC2" : [(2,2,1),(2,3,1)],
  28. "ADC3" : [(2,0,2),(2,1,2)],
  29. "CRYP_IN" : [(2,6,2)],
  30. "CRYP_OUT" : [(2,5,2)],
  31. "DAC1" : [(1,5,7)],
  32. "DAC2" : [(1,6,7)],
  33. "DCMI" : [(2,1,1),(2,7,1)],
  34. "HASH_IN" : [(2,7,2)],
  35. "I2C1_RX" : [(1,0,1),(1,5,1)],
  36. "I2C1_TX" : [(1,6,1),(1,7,1)],
  37. "I2C2_RX" : [(1,2,7),(1,3,7)],
  38. "I2C2_TX" : [(1,7,7)],
  39. "I2C3_RX" : [(1,2,3)],
  40. "I2C3_TX" : [(1,4,3)],
  41. "I2S2_EXT_RX" : [(1,3,3)],
  42. "I2S2_EXT_TX" : [(1,4,2)],
  43. "I2S3_EXT_RX" : [(1,2,2),(1,0,3)],
  44. "I2S3_EXT_TX" : [(1,5,2)],
  45. "SAI1_A" : [(2,1,0),(2,3,0)],
  46. "SAI1_B" : [(2,5,0),(2,4,1)],
  47. "SDIO" : [(2,3,4),(2,6,4)],
  48. "SPI1_RX" : [(2,0,3),(2,2,3)],
  49. "SPI1_TX" : [(2,3,3),(2,5,3)],
  50. "SPI2_RX" : [(1,3,0)],
  51. "SPI2_TX" : [(1,4,0)],
  52. "SPI3_RX" : [(1,0,0),(1,2,0)],
  53. "SPI3_TX" : [(1,5,0),(1,7,0)],
  54. "SPI4_RX" : [(2,0,4),(2,3,5)],
  55. "SPI4_TX" : [(2,1,4),(2,4,5)],
  56. "SPI5_RX" : [(2,3,2),(2,5,7)],
  57. "SPI5_TX" : [(2,4,2),(2,6,7)],
  58. "SPI6_RX" : [(2,6,1)],
  59. "SPI6_TX" : [(2,5,1)],
  60. "TIM1_CH1" : [(2,6,0),(2,1,6),(2,3,6)],
  61. "TIM1_CH2" : [(2,6,0),(2,2,6)],
  62. "TIM1_CH3" : [(2,6,0),(2,6,6)],
  63. "TIM1_CH4" : [(2,4,6)],
  64. "TIM1_COM" : [(2,4,6)],
  65. "TIM1_TRIG" : [(2,0,6),(2,4,6)],
  66. "TIM1_UP" : [(2,5,6)],
  67. "TIM2_CH1" : [(1,5,3)],
  68. "TIM2_CH2" : [(1,6,3)],
  69. "TIM2_CH3" : [(1,1,3)],
  70. "TIM2_CH4" : [(1,6,3),(1,7,3)],
  71. "TIM2_UP" : [(1,1,3),(1,7,3)],
  72. "TIM3_CH1" : [(1,4,5)],
  73. "TIM3_CH2" : [(1,5,5)],
  74. "TIM3_CH3" : [(1,7,5)],
  75. "TIM3_CH4" : [(1,2,5)],
  76. "TIM3_TRIG" : [(1,4,5)],
  77. "TIM3_UP" : [(1,2,5)],
  78. "TIM4_CH1" : [(1,0,2)],
  79. "TIM4_CH2" : [(1,3,2)],
  80. "TIM4_CH3" : [(1,7,2)],
  81. "TIM4_UP" : [(1,6,2)],
  82. "TIM5_CH1" : [(1,2,6)],
  83. "TIM5_CH2" : [(1,4,6)],
  84. "TIM5_CH3" : [(1,0,6)],
  85. "TIM5_CH4" : [(1,1,6),(1,3,6)],
  86. "TIM5_TRIG" : [(1,1,6),(1,3,6)],
  87. "TIM5_UP" : [(1,0,6),(1,6,6)],
  88. "TIM6_UP" : [(1,1,7)],
  89. "TIM7_UP" : [(1,2,1),(1,4,1)],
  90. "TIM8_CH1" : [(2,2,0),(2,2,7)],
  91. "TIM8_CH2" : [(2,2,0),(2,3,7)],
  92. "TIM8_CH3" : [(2,2,0),(2,4,7)],
  93. "TIM8_CH4" : [(2,7,7)],
  94. "TIM8_COM" : [(2,7,7)],
  95. "TIM8_TRIG" : [(2,7,7)],
  96. "TIM8_UP" : [(2,1,7)],
  97. "UART4_RX" : [(1,2,4)],
  98. "UART4_TX" : [(1,4,4)],
  99. "UART5_RX" : [(1,0,4)],
  100. "UART5_TX" : [(1,7,4)],
  101. "UART7_RX" : [(1,3,5)],
  102. "UART7_TX" : [(1,1,5)],
  103. "UART8_RX" : [(1,6,5)],
  104. "UART8_TX" : [(1,0,5)],
  105. "USART1_RX" : [(2,2,4),(2,5,4)],
  106. "USART1_TX" : [(2,7,4)],
  107. "USART2_RX" : [(1,5,4)],
  108. "USART2_TX" : [(1,6,4)],
  109. "USART3_RX" : [(1,1,4)],
  110. "USART3_TX" : [(1,3,4),(1,4,7)],
  111. "USART6_RX" : [(2,1,5),(2,2,5)],
  112. "USART6_TX" : [(2,6,5),(2,7,5)],
  113. }
  114. AltFunction_map = {
  115. # format is PIN:FUNCTION : AFNUM
  116. # extracted from tabula-AF-F427.csv
  117. "PA0:ETH_MII_CRS" : 11,
  118. "PA0:EVENTOUT" : 15,
  119. "PA0:TIM2_CH1" : 1,
  120. "PA0:TIM2_ETR" : 1,
  121. "PA0:TIM5_CH1" : 2,
  122. "PA0:TIM8_ETR" : 3,
  123. "PA0:UART4_TX" : 8,
  124. "PA0:USART2_CTS" : 7,
  125. "PA10:DCMI_D1" : 13,
  126. "PA10:EVENTOUT" : 15,
  127. "PA10:OTG_FS_ID" : 10,
  128. "PA10:TIM1_CH3" : 1,
  129. "PA10:USART1_RX" : 7,
  130. "PA11:CAN1_RX" : 9,
  131. "PA11:EVENTOUT" : 15,
  132. "PA11:LCD_R4" : 14,
  133. "PA11:OTG_FS_DM" : 10,
  134. "PA11:TIM1_CH4" : 1,
  135. "PA11:USART1_CTS" : 7,
  136. "PA12:CAN1_TX" : 9,
  137. "PA12:EVENTOUT" : 15,
  138. "PA12:LCD_R5" : 14,
  139. "PA12:OTG_FS_DP" : 10,
  140. "PA12:TIM1_ETR" : 1,
  141. "PA12:USART1_RTS" : 7,
  142. "PA13:EVENTOUT" : 15,
  143. "PA13:JTMS-SWDIO" : 0,
  144. "PA14:EVENTOUT" : 15,
  145. "PA14:JTCK-SWCLK" : 0,
  146. "PA15:EVENTOUT" : 15,
  147. "PA15:I2S3_WS" : 6,
  148. "PA15:JTDI" : 0,
  149. "PA15:SPI1_NSS" : 5,
  150. "PA15:SPI3_NSS" : 6,
  151. "PA15:TIM2_CH1" : 1,
  152. "PA15:TIM2_ETR" : 1,
  153. "PA1:ETH_MII_RX_CLK" : 11,
  154. "PA1:ETH_RMII_REF_CLK" : 11,
  155. "PA1:EVENTOUT" : 15,
  156. "PA1:TIM2_CH2" : 1,
  157. "PA1:TIM5_CH2" : 2,
  158. "PA1:UART4_RX" : 8,
  159. "PA1:USART2_RTS" : 7,
  160. "PA2:ETH_MDIO" : 11,
  161. "PA2:EVENTOUT" : 15,
  162. "PA2:TIM2_CH3" : 1,
  163. "PA2:TIM5_CH3" : 2,
  164. "PA2:TIM9_CH1" : 3,
  165. "PA2:USART2_TX" : 7,
  166. "PA3:ETH_MII_COL" : 11,
  167. "PA3:EVENTOUT" : 15,
  168. "PA3:LCD_B5" : 14,
  169. "PA3:OTG_HS_ULPI_D0" : 10,
  170. "PA3:TIM2_CH4" : 1,
  171. "PA3:TIM5_CH4" : 2,
  172. "PA3:TIM9_CH2" : 3,
  173. "PA3:USART2_RX" : 7,
  174. "PA4:DCMI_HSYNC" : 13,
  175. "PA4:EVENTOUT" : 15,
  176. "PA4:I2S3_WS" : 6,
  177. "PA4:LCD_VSYNC" : 14,
  178. "PA4:OTG_HS_SOF" : 12,
  179. "PA4:SPI1_NSS" : 5,
  180. "PA4:SPI3_NSS" : 6,
  181. "PA4:USART2_CK" : 7,
  182. "PA5:EVENTOUT" : 15,
  183. "PA5:OTG_HS_ULPI_CK" : 10,
  184. "PA5:SPI1_SCK" : 5,
  185. "PA5:TIM2_CH1" : 1,
  186. "PA5:TIM2_ETR" : 1,
  187. "PA5:TIM8_CH1N" : 3,
  188. "PA6:DCMI_PIXCLK" : 13,
  189. "PA6:EVENTOUT" : 15,
  190. "PA6:LCD_G2" : 14,
  191. "PA6:SPI1_MISO" : 5,
  192. "PA6:TIM13_CH1" : 9,
  193. "PA6:TIM1_BKIN" : 1,
  194. "PA6:TIM3_CH1" : 2,
  195. "PA6:TIM8_BKIN" : 3,
  196. "PA7:ETH_MII_RX_DV" : 11,
  197. "PA7:ETH_RMII_CRS_DV" : 11,
  198. "PA7:EVENTOUT" : 15,
  199. "PA7:SPI1_MOSI" : 5,
  200. "PA7:TIM14_CH1" : 9,
  201. "PA7:TIM1_CH1N" : 1,
  202. "PA7:TIM3_CH2" : 2,
  203. "PA7:TIM8_CH1N" : 3,
  204. "PA8:EVENTOUT" : 15,
  205. "PA8:I2C3_SCL" : 4,
  206. "PA8:LCD_R6" : 14,
  207. "PA8:MCO1" : 0,
  208. "PA8:OTG_FS_SOF" : 10,
  209. "PA8:TIM1_CH1" : 1,
  210. "PA8:USART1_CK" : 7,
  211. "PA9:DCMI_D0" : 13,
  212. "PA9:EVENTOUT" : 15,
  213. "PA9:I2C3_SMBA" : 4,
  214. "PA9:TIM1_CH2" : 1,
  215. "PA9:USART1_TX" : 7,
  216. "PB0:ETH_MII_RXD2" : 11,
  217. "PB0:EVENTOUT" : 15,
  218. "PB0:LCD_R3" : 9,
  219. "PB0:OTG_HS_ULPI_D1" : 10,
  220. "PB0:TIM1_CH2N" : 1,
  221. "PB0:TIM3_CH3" : 2,
  222. "PB0:TIM8_CH2N" : 3,
  223. "PB10:ETH_MII_RX_ER" : 11,
  224. "PB10:EVENTOUT" : 15,
  225. "PB10:I2C2_SCL" : 4,
  226. "PB10:I2S2_CK" : 5,
  227. "PB10:LCD_G4" : 14,
  228. "PB10:OTG_HS_ULPI_D3" : 10,
  229. "PB10:SPI2_SCK" : 5,
  230. "PB10:TIM2_CH3" : 1,
  231. "PB10:USART3_TX" : 7,
  232. "PB11:ETH_MII_TX_EN" : 11,
  233. "PB11:ETH_RMII_TX_EN" : 11,
  234. "PB11:EVENTOUT" : 15,
  235. "PB11:I2C2_SDA" : 4,
  236. "PB11:LCD_G5" : 14,
  237. "PB11:OTG_HS_ULPI_D4" : 10,
  238. "PB11:TIM2_CH4" : 1,
  239. "PB11:USART3_RX" : 7,
  240. "PB12:CAN2_RX" : 9,
  241. "PB12:ETH_MII_TXD0" : 11,
  242. "PB12:ETH_RMII_TXD0" : 11,
  243. "PB12:EVENTOUT" : 15,
  244. "PB12:I2C2_SMBA" : 4,
  245. "PB12:I2S2_WS" : 5,
  246. "PB12:OTG_HS_ID" : 12,
  247. "PB12:OTG_HS_ULPI_D5" : 10,
  248. "PB12:SPI2_NSS" : 5,
  249. "PB12:TIM1_BKIN" : 1,
  250. "PB12:USART3_CK" : 7,
  251. "PB13:CAN2_TX" : 9,
  252. "PB13:ETH_MII_TXD1" : 11,
  253. "PB13:ETH_RMII_TXD1" : 11,
  254. "PB13:EVENTOUT" : 15,
  255. "PB13:I2S2_CK" : 5,
  256. "PB13:OTG_HS_ULPI_D6" : 10,
  257. "PB13:SPI2_SCK" : 5,
  258. "PB13:TIM1_CH1N" : 1,
  259. "PB13:USART3_CTS" : 7,
  260. "PB14:EVENTOUT" : 15,
  261. "PB14:I2S2EXT_SD" : 6,
  262. "PB14:OTG_HS_DM" : 12,
  263. "PB14:SPI2_MISO" : 5,
  264. "PB14:TIM12_CH1" : 9,
  265. "PB14:TIM1_CH2N" : 1,
  266. "PB14:TIM8_CH2N" : 3,
  267. "PB14:USART3_RTS" : 7,
  268. "PB15:EVENTOUT" : 15,
  269. "PB15:I2S2_SD" : 5,
  270. "PB15:OTG_HS_DP" : 12,
  271. "PB15:RTC_REFIN" : 0,
  272. "PB15:SPI2_MOSI" : 5,
  273. "PB15:TIM12_CH2" : 9,
  274. "PB15:TIM1_CH3N" : 1,
  275. "PB15:TIM8_CH3N" : 3,
  276. "PB1:ETH_MII_RXD3" : 11,
  277. "PB1:EVENTOUT" : 15,
  278. "PB1:LCD_R6" : 9,
  279. "PB1:OTG_HS_ULPI_D2" : 10,
  280. "PB1:TIM1_CH3N" : 1,
  281. "PB1:TIM3_CH4" : 2,
  282. "PB1:TIM8_CH3N" : 3,
  283. "PB2:EVENTOUT" : 15,
  284. "PB3:EVENTOUT" : 15,
  285. "PB3:I2S3_CK" : 6,
  286. "PB3:JTDO" : 0,
  287. "PB3:SPI1_SCK" : 5,
  288. "PB3:SPI3_SCK" : 6,
  289. "PB3:TIM2_CH2" : 1,
  290. "PB3:TRACESWO" : 0,
  291. "PB4:EVENTOUT" : 15,
  292. "PB4:I2S3EXT_SD" : 7,
  293. "PB4:NJTRST" : 0,
  294. "PB4:SPI1_MISO" : 5,
  295. "PB4:SPI3_MISO" : 6,
  296. "PB4:TIM3_CH1" : 2,
  297. "PB5:CAN2_RX" : 9,
  298. "PB5:DCMI_D10" : 13,
  299. "PB5:ETH_PPS_OUT" : 11,
  300. "PB5:EVENTOUT" : 15,
  301. "PB5:FMC_SDCKE1" : 12,
  302. "PB5:I2C1_SMBA" : 4,
  303. "PB5:I2S3_SD" : 6,
  304. "PB5:OTG_HS_ULPI_D7" : 10,
  305. "PB5:SPI1_MOSI" : 5,
  306. "PB5:SPI3_MOSI" : 6,
  307. "PB5:TIM3_CH2" : 2,
  308. "PB6:CAN2_TX" : 9,
  309. "PB6:DCMI_D5" : 13,
  310. "PB6:EVENTOUT" : 15,
  311. "PB6:FMC_SDNE1" : 12,
  312. "PB6:I2C1_SCL" : 4,
  313. "PB6:TIM4_CH1" : 2,
  314. "PB6:USART1_TX" : 7,
  315. "PB7:DCMI_VSYNC" : 13,
  316. "PB7:EVENTOUT" : 15,
  317. "PB7:FMC_NL" : 12,
  318. "PB7:I2C1_SDA" : 4,
  319. "PB7:TIM4_CH2" : 2,
  320. "PB7:USART1_RX" : 7,
  321. "PB8:CAN1_RX" : 9,
  322. "PB8:DCMI_D6" : 13,
  323. "PB8:ETH_MII_TXD3" : 11,
  324. "PB8:EVENTOUT" : 15,
  325. "PB8:I2C1_SCL" : 4,
  326. "PB8:LCD_B6" : 14,
  327. "PB8:SDIO_D4" : 12,
  328. "PB8:TIM10_CH1" : 3,
  329. "PB8:TIM4_CH3" : 2,
  330. "PB9:CAN1_TX" : 9,
  331. "PB9:DCMI_D7" : 13,
  332. "PB9:EVENTOUT" : 15,
  333. "PB9:I2C1_SDA" : 4,
  334. "PB9:I2S2_WS" : 5,
  335. "PB9:LCD_B7" : 14,
  336. "PB9:SDIO_D5" : 12,
  337. "PB9:SPI2_NSS" : 5,
  338. "PB9:TIM11_CH1" : 3,
  339. "PB9:TIM4_CH4" : 2,
  340. "PC0:EVENTOUT" : 15,
  341. "PC0:FMC_SDNWE" : 12,
  342. "PC0:OTG_HS_ULPI_STP" : 10,
  343. "PC10:DCMI_D8" : 13,
  344. "PC10:EVENTOUT" : 15,
  345. "PC10:I2S3_CK" : 6,
  346. "PC10:LCD_R2" : 14,
  347. "PC10:SDIO_D2" : 12,
  348. "PC10:SPI3_SCK" : 6,
  349. "PC10:UART4_TX" : 8,
  350. "PC10:USART3_TX" : 7,
  351. "PC11:DCMI_D4" : 13,
  352. "PC11:EVENTOUT" : 15,
  353. "PC11:I2S3EXT_SD" : 5,
  354. "PC11:SDIO_D3" : 12,
  355. "PC11:SPI3_MISO" : 6,
  356. "PC11:UART4_RX" : 8,
  357. "PC11:USART3_RX" : 7,
  358. "PC12:DCMI_D9" : 13,
  359. "PC12:EVENTOUT" : 15,
  360. "PC12:I2S3_SD" : 6,
  361. "PC12:SDIO_CK" : 12,
  362. "PC12:SPI3_MOSI" : 6,
  363. "PC12:UART5_TX" : 8,
  364. "PC12:USART3_CK" : 7,
  365. "PC13:EVENTOUT" : 15,
  366. "PC14:EVENTOUT" : 15,
  367. "PC15:EVENTOUT" : 15,
  368. "PC1:ETH_MDC" : 11,
  369. "PC1:EVENTOUT" : 15,
  370. "PC2:ETH_MII_TXD2" : 11,
  371. "PC2:EVENTOUT" : 15,
  372. "PC2:FMC_SDNE0" : 12,
  373. "PC2:I2S2EXT_SD" : 6,
  374. "PC2:OTG_HS_ULPI_DIR" : 10,
  375. "PC2:SPI2_MISO" : 5,
  376. "PC3:ETH_MII_TX_CLK" : 11,
  377. "PC3:EVENTOUT" : 15,
  378. "PC3:FMC_SDCKE0" : 12,
  379. "PC3:I2S2_SD" : 5,
  380. "PC3:OTG_HS_ULPI_NXT" : 10,
  381. "PC3:SPI2_MOSI" : 5,
  382. "PC4:ETH_MII_RXD0" : 11,
  383. "PC4:ETH_RMII_RXD0" : 11,
  384. "PC4:EVENTOUT" : 15,
  385. "PC5:ETH_MII_RXD1" : 11,
  386. "PC5:ETH_RMII_RXD1" : 11,
  387. "PC5:EVENTOUT" : 15,
  388. "PC6:DCMI_D0" : 13,
  389. "PC6:EVENTOUT" : 15,
  390. "PC6:I2S2_MCK" : 5,
  391. "PC6:LCD_HSYNC" : 14,
  392. "PC6:SDIO_D6" : 12,
  393. "PC6:TIM3_CH1" : 2,
  394. "PC6:TIM8_CH1" : 3,
  395. "PC6:USART6_TX" : 8,
  396. "PC7:DCMI_D1" : 13,
  397. "PC7:EVENTOUT" : 15,
  398. "PC7:I2S3_MCK" : 6,
  399. "PC7:LCD_G6" : 14,
  400. "PC7:SDIO_D7" : 12,
  401. "PC7:TIM3_CH2" : 2,
  402. "PC7:TIM8_CH2" : 3,
  403. "PC7:USART6_RX" : 8,
  404. "PC8:DCMI_D2" : 13,
  405. "PC8:EVENTOUT" : 15,
  406. "PC8:SDIO_D0" : 12,
  407. "PC8:TIM3_CH3" : 2,
  408. "PC8:TIM8_CH3" : 3,
  409. "PC8:USART6_CK" : 8,
  410. "PC9:DCMI_D3" : 13,
  411. "PC9:EVENTOUT" : 15,
  412. "PC9:I2C3_SDA" : 4,
  413. "PC9:I2S_CKIN" : 5,
  414. "PC9:MCO2" : 0,
  415. "PC9:SDIO_D1" : 12,
  416. "PC9:TIM3_CH4" : 2,
  417. "PC9:TIM8_CH4" : 3,
  418. "PD0:CAN1_RX" : 9,
  419. "PD0:EVENTOUT" : 15,
  420. "PD0:FMC_D2" : 12,
  421. "PD10:EVENTOUT" : 15,
  422. "PD10:FMC_D15" : 12,
  423. "PD10:LCD_B3" : 14,
  424. "PD10:USART3_CK" : 7,
  425. "PD11:EVENTOUT" : 15,
  426. "PD11:FMC_A16" : 12,
  427. "PD11:USART3_CTS" : 7,
  428. "PD12:EVENTOUT" : 15,
  429. "PD12:FMC_A17" : 12,
  430. "PD12:TIM4_CH1" : 2,
  431. "PD12:USART3_RTS" : 7,
  432. "PD13:EVENTOUT" : 15,
  433. "PD13:FMC_A18" : 12,
  434. "PD13:TIM4_CH2" : 2,
  435. "PD14:EVENTOUT" : 15,
  436. "PD14:FMC_D0" : 12,
  437. "PD14:TIM4_CH3" : 2,
  438. "PD15:EVENTOUT" : 15,
  439. "PD15:FMC_D1" : 12,
  440. "PD15:TIM4_CH4" : 2,
  441. "PD1:CAN1_TX" : 9,
  442. "PD1:EVENTOUT" : 15,
  443. "PD1:FMC_D3" : 12,
  444. "PD2:DCMI_D11" : 13,
  445. "PD2:EVENTOUT" : 15,
  446. "PD2:SDIO_CMD" : 12,
  447. "PD2:TIM3_ETR" : 2,
  448. "PD2:UART5_RX" : 8,
  449. "PD3:DCMI_D5" : 13,
  450. "PD3:EVENTOUT" : 15,
  451. "PD3:FMC_CLK" : 12,
  452. "PD3:I2S2_CK" : 5,
  453. "PD3:LCD_G7" : 14,
  454. "PD3:SPI2_SCK" : 5,
  455. "PD3:USART2_CTS" : 7,
  456. "PD4:EVENTOUT" : 15,
  457. "PD4:FMC_NOE" : 12,
  458. "PD4:USART2_RTS" : 7,
  459. "PD5:EVENTOUT" : 15,
  460. "PD5:FMC_NWE" : 12,
  461. "PD5:USART2_TX" : 7,
  462. "PD6:DCMI_D10" : 13,
  463. "PD6:EVENTOUT" : 15,
  464. "PD6:FMC_NWAIT" : 12,
  465. "PD6:I2S3_SD" : 5,
  466. "PD6:LCD_B2" : 14,
  467. "PD6:SAI1_SD_A" : 6,
  468. "PD6:SPI3_MOSI" : 5,
  469. "PD6:USART2_RX" : 7,
  470. "PD7:EVENTOUT" : 15,
  471. "PD7:FMC_NCE2" : 12,
  472. "PD7:FMC_NE1" : 12,
  473. "PD7:USART2_CK" : 7,
  474. "PD8:EVENTOUT" : 15,
  475. "PD8:FMC_D13" : 12,
  476. "PD8:USART3_TX" : 7,
  477. "PD9:EVENTOUT" : 15,
  478. "PD9:FMC_D14" : 12,
  479. "PD9:USART3_RX" : 7,
  480. "PE0:DCMI_D2" : 13,
  481. "PE0:EVENTOUT" : 15,
  482. "PE0:FMC_NBL0" : 12,
  483. "PE0:TIM4_ETR" : 2,
  484. "PE0:UART8_RX" : 8,
  485. "PE10:EVENTOUT" : 15,
  486. "PE10:FMC_D7" : 12,
  487. "PE10:TIM1_CH2N" : 1,
  488. "PE11:EVENTOUT" : 15,
  489. "PE11:FMC_D8" : 12,
  490. "PE11:LCD_G3" : 14,
  491. "PE11:SPI4_NSS" : 5,
  492. "PE11:TIM1_CH2" : 1,
  493. "PE12:EVENTOUT" : 15,
  494. "PE12:FMC_D9" : 12,
  495. "PE12:LCD_B4" : 14,
  496. "PE12:SPI4_SCK" : 5,
  497. "PE12:TIM1_CH3N" : 1,
  498. "PE13:EVENTOUT" : 15,
  499. "PE13:FMC_D10" : 12,
  500. "PE13:LCD_DE" : 14,
  501. "PE13:SPI4_MISO" : 5,
  502. "PE13:TIM1_CH3" : 1,
  503. "PE14:EVENTOUT" : 15,
  504. "PE14:FMC_D11" : 12,
  505. "PE14:LCD_CLK" : 14,
  506. "PE14:SPI4_MOSI" : 5,
  507. "PE14:TIM1_CH4" : 1,
  508. "PE15:" : 5,
  509. "PE15:EVENTOUT" : 15,
  510. "PE15:FMC_D12" : 12,
  511. "PE15:LCD_R7" : 14,
  512. "PE15:TIM1_BKIN" : 1,
  513. "PE1:DCMI_D3" : 13,
  514. "PE1:EVENTOUT" : 15,
  515. "PE1:FMC_NBL1" : 12,
  516. "PE1:UART8_TX" : 8,
  517. "PE2:ETH_MII_TXD3" : 11,
  518. "PE2:EVENTOUT" : 15,
  519. "PE2:FMC_A23" : 12,
  520. "PE2:SAI1_MCLK_A" : 6,
  521. "PE2:SPI4_SCK" : 5,
  522. "PE2:TRACECLK" : 0,
  523. "PE3:EVENTOUT" : 15,
  524. "PE3:FMC_A19" : 12,
  525. "PE3:SAI1_SD_B" : 6,
  526. "PE3:TRACED0" : 0,
  527. "PE4:DCMI_D4" : 13,
  528. "PE4:EVENTOUT" : 15,
  529. "PE4:FMC_A20" : 12,
  530. "PE4:LCD_B0" : 14,
  531. "PE4:SAI1_FS_A" : 6,
  532. "PE4:SPI4_NSS" : 5,
  533. "PE4:TRACED1" : 0,
  534. "PE5:DCMI_D6" : 13,
  535. "PE5:EVENTOUT" : 15,
  536. "PE5:FMC_A21" : 12,
  537. "PE5:LCD_G0" : 14,
  538. "PE5:SAI1_SCK_A" : 6,
  539. "PE5:SPI4_MISO" : 5,
  540. "PE5:TIM9_CH1" : 3,
  541. "PE5:TRACED2" : 0,
  542. "PE6:DCMI_D7" : 13,
  543. "PE6:EVENTOUT" : 15,
  544. "PE6:FMC_A22" : 12,
  545. "PE6:LCD_G1" : 14,
  546. "PE6:SAI1_SD_A" : 6,
  547. "PE6:SPI4_MOSI" : 5,
  548. "PE6:TIM9_CH2" : 3,
  549. "PE6:TRACED3" : 0,
  550. "PE7:EVENTOUT" : 15,
  551. "PE7:FMC_D4" : 12,
  552. "PE7:TIM1_ETR" : 1,
  553. "PE7:UART7_RX" : 8,
  554. "PE8:EVENTOUT" : 15,
  555. "PE8:FMC_D5" : 12,
  556. "PE8:TIM1_CH1N" : 1,
  557. "PE8:UART7_TX" : 8,
  558. "PE9:EVENTOUT" : 15,
  559. "PE9:FMC_D6" : 12,
  560. "PE9:TIM1_CH1" : 1,
  561. "PF0:EVENTOUT" : 15,
  562. "PF0:FMC_A0" : 12,
  563. "PF0:I2C2_SDA" : 4,
  564. "PF10:DCMI_D11" : 13,
  565. "PF10:EVENTOUT" : 15,
  566. "PF10:FMC_INTR" : 12,
  567. "PF10:LCD_DE" : 14,
  568. "PF11:DCMI_D12" : 13,
  569. "PF11:EVENTOUT" : 15,
  570. "PF11:FMC_SDNRAS" : 12,
  571. "PF11:SPI5_MOSI" : 5,
  572. "PF12:EVENTOUT" : 15,
  573. "PF12:FMC_A6" : 12,
  574. "PF13:EVENTOUT" : 15,
  575. "PF13:FMC_A7" : 12,
  576. "PF14:EVENTOUT" : 15,
  577. "PF14:FMC_A8" : 12,
  578. "PF15:EVENTOUT" : 15,
  579. "PF15:FMC_A9" : 12,
  580. "PF1:" : 3,
  581. "PF1:EVENTOUT" : 15,
  582. "PF1:FMC_A1" : 12,
  583. "PF1:I2C2_SCL" : 4,
  584. "PF2:EVENTOUT" : 15,
  585. "PF2:FMC_A2" : 12,
  586. "PF2:I2C2_SMBA" : 4,
  587. "PF3:" : 4,
  588. "PF3:EVENTOUT" : 15,
  589. "PF3:FMC_A3" : 12,
  590. "PF4:" : 4,
  591. "PF4:EVENTOUT" : 15,
  592. "PF4:FMC_A4" : 12,
  593. "PF5:" : 4,
  594. "PF5:EVENTOUT" : 15,
  595. "PF5:FMC_A5" : 12,
  596. "PF6:EVENTOUT" : 15,
  597. "PF6:FMC_NIORD" : 12,
  598. "PF6:SAI1_SD_B" : 6,
  599. "PF6:SPI5_NSS" : 5,
  600. "PF6:TIM10_CH1" : 3,
  601. "PF6:UART7_RX" : 8,
  602. "PF7:EVENTOUT" : 15,
  603. "PF7:FMC_NREG" : 12,
  604. "PF7:SAI1_MCLK_B" : 6,
  605. "PF7:SPI5_SCK" : 5,
  606. "PF7:TIM11_CH1" : 3,
  607. "PF7:UART7_TX" : 8,
  608. "PF8:EVENTOUT" : 15,
  609. "PF8:FMC_NIOWR" : 12,
  610. "PF8:SAI1_SCK_B" : 6,
  611. "PF8:SPI5_MISO" : 5,
  612. "PF8:TIM13_CH1" : 9,
  613. "PF9:EVENTOUT" : 15,
  614. "PF9:FMC_CD" : 12,
  615. "PF9:SAI1_FS_B" : 6,
  616. "PF9:SPI5_MOSI" : 5,
  617. "PF9:TIM14_CH1" : 9,
  618. "PG0:EVENTOUT" : 15,
  619. "PG0:FMC_A10" : 12,
  620. "PG10:DCMI_D2" : 13,
  621. "PG10:EVENTOUT" : 15,
  622. "PG10:FMC_NCE4_1" : 12,
  623. "PG10:FMC_NE3" : 12,
  624. "PG10:LCD_B2" : 14,
  625. "PG10:LCD_G3" : 9,
  626. "PG11:DCMI_D3" : 13,
  627. "PG11:ETH_MII_TX_EN" : 11,
  628. "PG11:ETH_RMII_TX_EN" : 11,
  629. "PG11:EVENTOUT" : 15,
  630. "PG11:FMC_NCE4_2" : 12,
  631. "PG11:LCD_B3" : 14,
  632. "PG12:EVENTOUT" : 15,
  633. "PG12:FMC_NE4" : 12,
  634. "PG12:LCD_B1" : 14,
  635. "PG12:LCD_B4" : 9,
  636. "PG12:SPI6_MISO" : 5,
  637. "PG12:USART6_RTS" : 8,
  638. "PG13:ETH_MII_TXD0" : 11,
  639. "PG13:ETH_RMII_TXD0" : 11,
  640. "PG13:EVENTOUT" : 15,
  641. "PG13:FMC_A24" : 12,
  642. "PG13:SPI6_SCK" : 5,
  643. "PG13:USART6_CTS" : 8,
  644. "PG14:ETH_MII_TXD1" : 11,
  645. "PG14:ETH_RMII_TXD1" : 11,
  646. "PG14:EVENTOUT" : 15,
  647. "PG14:FMC_A25" : 12,
  648. "PG14:SPI6_MOSI" : 5,
  649. "PG14:USART6_TX" : 8,
  650. "PG15:DCMI_D13" : 13,
  651. "PG15:EVENTOUT" : 15,
  652. "PG15:FMC_SDNCAS" : 12,
  653. "PG15:USART6_CTS" : 8,
  654. "PG1:EVENTOUT" : 15,
  655. "PG1:FMC_A11" : 12,
  656. "PG2:EVENTOUT" : 15,
  657. "PG2:FMC_A12" : 12,
  658. "PG3:EVENTOUT" : 15,
  659. "PG3:FMC_A13" : 12,
  660. "PG4:EVENTOUT" : 15,
  661. "PG4:FMC_A14" : 12,
  662. "PG4:FMC_BA0" : 12,
  663. "PG5:EVENTOUT" : 15,
  664. "PG5:FMC_A15" : 12,
  665. "PG5:FMC_BA1" : 12,
  666. "PG6:DCMI_D12" : 13,
  667. "PG6:EVENTOUT" : 15,
  668. "PG6:FMC_INT2" : 12,
  669. "PG6:LCD_R7" : 14,
  670. "PG7:DCMI_D13" : 13,
  671. "PG7:EVENTOUT" : 15,
  672. "PG7:FMC_INT3" : 12,
  673. "PG7:LCD_CLK" : 14,
  674. "PG7:USART6_CK" : 8,
  675. "PG8:ETH_PPS_OUT" : 11,
  676. "PG8:EVENTOUT" : 15,
  677. "PG8:FMC_SDCLK" : 12,
  678. "PG8:SPI6_NSS" : 5,
  679. "PG8:USART6_RTS" : 8,
  680. "PG9:DCMI_VSYNC(1)" : 13,
  681. "PG9:EVENTOUT" : 15,
  682. "PG9:FMC_NCE3" : 12,
  683. "PG9:FMC_NE2" : 12,
  684. "PG9:USART6_RX" : 8,
  685. "PH0:EVENTOUT" : 15,
  686. "PH10:DCMI_D1" : 13,
  687. "PH10:EVENTOUT" : 15,
  688. "PH10:FMC_D18" : 12,
  689. "PH10:LCD_R4" : 14,
  690. "PH10:TIM5_CH1" : 2,
  691. "PH11:DCMI_D2" : 13,
  692. "PH11:EVENTOUT" : 15,
  693. "PH11:FMC_D19" : 12,
  694. "PH11:LCD_R5" : 14,
  695. "PH11:TIM5_CH2" : 2,
  696. "PH12:DCMI_D3" : 13,
  697. "PH12:EVENTOUT" : 15,
  698. "PH12:FMC_D20" : 12,
  699. "PH12:LCD_R6" : 14,
  700. "PH12:TIM5_CH3" : 2,
  701. "PH13:CAN1_TX" : 9,
  702. "PH13:EVENTOUT" : 15,
  703. "PH13:FMC_D21" : 12,
  704. "PH13:LCD_G2" : 14,
  705. "PH13:TIM8_CH1N" : 3,
  706. "PH14:DCMI_D4" : 13,
  707. "PH14:EVENTOUT" : 15,
  708. "PH14:FMC_D22" : 12,
  709. "PH14:LCD_G3" : 14,
  710. "PH14:TIM8_CH2N" : 3,
  711. "PH15:DCMI_D11" : 13,
  712. "PH15:EVENTOUT" : 15,
  713. "PH15:FMC_D23" : 12,
  714. "PH15:LCD_G4" : 14,
  715. "PH15:TIM8_CH3N" : 3,
  716. "PH1:EVENTOUT" : 15,
  717. "PH2:ETH_MII_CRS" : 11,
  718. "PH2:EVENTOUT" : 15,
  719. "PH2:FMC_SDCKE0" : 12,
  720. "PH2:LCD_R0" : 14,
  721. "PH3:ETH_MII_COL" : 11,
  722. "PH3:EVENTOUT" : 15,
  723. "PH3:FMC_SDNE0" : 12,
  724. "PH3:LCD_R1" : 14,
  725. "PH4:EVENTOUT" : 15,
  726. "PH4:I2C2_SCL" : 4,
  727. "PH4:OTG_HS_ULPI_NXT" : 10,
  728. "PH5:EVENTOUT" : 15,
  729. "PH5:FMC_SDNWE" : 12,
  730. "PH5:I2C2_SDA" : 4,
  731. "PH5:SPI5_NSS" : 5,
  732. "PH6:DCMI_D8" : 13,
  733. "PH6:FMC_SDNE1" : 12,
  734. "PH6:I2C2_SMBA" : 4,
  735. "PH6:SPI5_SCK" : 5,
  736. "PH6:TIM12_CH1" : 9,
  737. "PH7:DCMI_D9" : 13,
  738. "PH7:ETH_MII_RXD3" : 11,
  739. "PH7:FMC_SDCKE1" : 12,
  740. "PH7:I2C3_SCL" : 4,
  741. "PH7:SPI5_MISO" : 5,
  742. "PH8:DCMI_HSYNC" : 13,
  743. "PH8:EVENTOUT" : 15,
  744. "PH8:FMC_D16" : 12,
  745. "PH8:I2C3_SDA" : 4,
  746. "PH8:LCD_R2" : 14,
  747. "PH9:DCMI_D0" : 13,
  748. "PH9:EVENTOUT" : 15,
  749. "PH9:FMC_D17" : 12,
  750. "PH9:I2C3_SMBA" : 4,
  751. "PH9:LCD_R3" : 14,
  752. "PH9:TIM12_CH2" : 9,
  753. }
  754. ADC1_map = {
  755. # format is PIN : ADC1_CHAN
  756. # extracted from tabula-addfunc-F427.csv
  757. "PA0" : 0,
  758. "PA1" : 1,
  759. "PA2" : 2,
  760. "PA3" : 3,
  761. "PA4" : 4,
  762. "PA5" : 5,
  763. "PA6" : 6,
  764. "PA7" : 7,
  765. "PB0" : 8,
  766. "PB1" : 9,
  767. "PC0" : 10,
  768. "PC1" : 11,
  769. "PC2" : 12,
  770. "PC3" : 13,
  771. "PC4" : 14,
  772. "PC5" : 15,
  773. }