STM32F469xx.py 21 KB

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