写作缘由:
之前电机控制板主控IC采用的是F103系列的RCT6,只有一路CAN,满足不了需求,转战F4系列的F405RGT6(有两路CAN),想着偷懒直接百度查引脚定义,结果不尽人意。于是自己做了一份引脚定义,并总结一下相关经验。
STM32F405RGT6引脚定义(未包含重定义):
图1.STM32F405RGT6引脚图
PIN | PIN Description |
PA0_WKUP | USART2_CTS/ UART4_TX/ ETH_MII_CRS / TIM2_CH1_ETR/ TIM5_CH1 / TIM8_ETR/ EVENTOUT |
PA1 | USART2_RTS / UART4_RX/ ETH_RMII_REF_CLK / ETH_MII_RX_CLK / TIM5_CH2 / TIM2_CH2/ EVENTOUT |
PA2 | USART2_TX/TIM5_CH3 / TIM9_CH1 / TIM2_CH3 / ETH_MDIO/ EVENTOUT |
PA3 | USART2_RX/TIM5_CH4 / TIM9_CH2 / TIM2_CH4 / OTG_HS_ULPI_D0 / ETH_MII_COL/ EVENTOUT |
PA4 | SPI1_NSS / SPI3_NSS / USART2_CK / DCMI_HSYNC / OTG_HS_SOF/ I2S3_WS/ EVENTOUT |
PA5 | SPI1_SCK/ OTG_HS_ULPI_CK / TIM2_CH1_ETR/ TIM8_CH1N/ EVENTOUT |
PA6 | SPI1_MISO / TIM8_BKIN/TIM13_CH1 / DCMI_PIXCLK / TIM3_CH1 / TIM1_BKIN/ EVENTOUT |
PA7 | SPI1_MOSI/ TIM8_CH1N / TIM14_CH1/TIM3_CH2/ ETH_MII_RX_DV / TIM1_CH1N / ETH_RMII_CRS_DV/ EVENTOUT |
PA8 | MCO1 / USART1_CK/ TIM1_CH1/ I2C3_SCL/ OTG_FS_SOF/ EVENTOUT |
PA9 | USART1_TX/ TIM1_CH2 / I2C3_SMBA / DCMI_D0/ EVENTOUT |
PA10 | USART1_RX/ TIM1_CH3/ OTG_FS_ID/DCMI_D1/ EVENTOUT |
PA11 | USART1_CTS / CAN1_RX / TIM1_CH4 / OTG_FS_DM/ EVENTOUT |
PA12 | USART1_RTS / CAN1_TX/ TIM1_ETR/ OTG_FS_DP/ EVENTOUT |
PA13 | JTMS-SWDIO/ EVENTOUT |
PA14 | JTCK-SWCLK/ EVENTOUT |
PA15 | JTDI/ SPI3_NSS/ I2S3_WS/TIM2_CH1_ET R / SPI1_NSS / EVENTOUT |
PB0 | TIM3_CH3 / TIM8_CH2N/ OTG_HS_ULPI_D1/ ETH_MII_RXD2 / TIM1_CH2N/ EVENTOUT |
PB1 | TIM3_CH4 / TIM8_CH3N/ OTG_HS_ULPI_D2/ ETH_MII_RXD3 / TIM1_CH3N/ EVENTOUT |
PB2/BOOT1 | |
PB3(JTDO/TRACESWO) | JTDO/ TRACESWO/ SPI3_SCK / I2S3_CK / TIM2_CH2 / SPI1_SCK/ EVENTOUT |
PB4(NJTRST) | NJTRST/ SPI3_MISO / TIM3_CH1 / SPI1_MISO / I2S3ext_SD/ EVENTOUT |
PB5 | I2C1_SMBA/ CAN2_RX / OTG_HS_ULPI_D7 / ETH_PPS_OUT/TIM3_CH 2 / SPI1_MOSI/ SPI3_MOSI / DCMI_D10 / I2S3_SD/ EVENTOUT |
PB6 | I2C1_SCL/ TIM4_CH1 / CAN2_TX / DCMI_D5/USART1_TX/ EVENTOUT |
PB7 | I2C1_SDA / FSMC_NL / DCMI_VSYNC / USART1_RX/ TIM4_CH2/ EVENTOUT |
PB8 | TIM4_CH3/SDIO_D4/ TIM10_CH1 / DCMI_D6 / ETH_MII_TXD3 / I2C1_SCL/ CAN1_RX/ EVENTOUT |
PB9 | SPI2_NSS/ I2S2_WS / |
PB10 | SPI2_SCK / I2S2_CK / I2C2_SCL/ USART3_TX / OTG_HS_ULPI_D3 / ETH_MII_RX_ER / TIM2_CH3/ EVENTOUT |
PB11 | I2C2_SDA/USART3_RX/ OTG_HS_ULPI_D4 / ETH_RMII_TX_EN/ ETH_MII_TX_EN / TIM2_CH4/ EVENTOUT |
PB12 | SPI2_NSS / I2S2_WS / I2C2_SMBA/ USART3_CK/ TIM1_BKIN / CAN2_RX / OTG_HS_ULPI_D5/ ETH_RMII_TXD0 / ETH_MII_TXD0/ OTG_HS_ID/ EVENTOUT |
PB13 | SPI2_SCK / I2S2_CK / USART3_CTS/ TIM1_CH1N /CAN2_TX / OTG_HS_ULPI_D6 / ETH_RMII_TXD1 / ETH_MII_TXD1/ EVENTOUT |
PB14 | SPI2_MISO/ TIM1_CH2N / TIM12_CH1 / OTG_HS_DM/ USART3_RTS / TIM8_CH2N/I2S2ext_SD/ EVENTOUT |
PB15 | SPI2_MOSI / I2S2_SD/ TIM1_CH3N / TIM8_CH3N / TIM12_CH2 / OTG_HS_DP/ EVENTOUT |
PC0 | OTG_HS_ULPI_STP/ EVENTOUT |
PC1 | ETH_MDC/ EVENTOUT |
PC2 | SPI2_MISO / OTG_HS_ULPI_DIR / ETH_MII_TXD2 /I2S2ext_SD/ EVENTOUT |
PC3 | SPI2_MOSI / I2S2_SD / OTG_HS_ULPI_NXT / ETH_MII_TX_CLK/ EVENTOUT |
PC4 | ETH_RMII_RX_D0 / ETH_MII_RX_D0/ EVENTOUT |
PC5 | ETH_RMII_RX_D1 / ETH_MII_RX_D1/ EVENTOUT |
PC6 | I2S2_MCK / TIM8_CH1/SDIO_D6 / USART6_TX / DCMI_D0/TIM3_CH1/ EVENTOUT |
PC7 | I2S3_MCK / TIM8_CH2/SDIO_D7 / USART6_RX / DCMI_D1/TIM3_CH2/ EVENTOUT |
PC8 | TIM8_CH3/SDIO_D0 /TIM3_CH3/ USART6_CK / DCMI_D2/ EVENTOUT |
PC9 | I2S_CKIN/ MCO2 / TIM8_CH4/SDIO_D1 / /I2C3_SDA / DCMI_D3 / TIM3_CH4/ EVENTOUT |
PC10 | SPI3_SCK / I2S3_CK/ UART4_TX/SDIO_D2 / DCMI_D8 / USART3_TX/ EVENTOUT |
PC11 | UART4_RX/ SPI3_MISO / SDIO_D3 / DCMI_D4/USART3_RX / I2S3ext_SD/ EVENTOUT |
PC12 | UART5_TX/SDIO_CK / DCMI_D9 / SPI3_MOSI /I2S3_SD / USART3_CK/ EVENTOUT |
PC13 | EVENTOUT |
PC14 | EVENTOUT |
PC15 | EVENTOUT |
PD2 | TIM3_ETR/UART5_RX/ |
PH0/OSC_IN | EVENTOUT |
PH1/OSC_OUT | EVENTOUT |
NRST | // |
BOOT0 | // |
VBAT | // |
VSSA | // |
VDDA | // |
VSS *2 | // |
VDD *4 | // |
VCAP_1 | // |
VCAP_2 | // |
(资料来源:STM32F405/415 - 意法半导体STMicroelectronics )
(请以官方文件为准)
部分引脚说明:
本人的目的是绘制STM32F405RGT6的最小系统原理图,关于部分引脚的说明也是从此出发。
VBAT,VDD,VDDA接3V3
VSSA,VSS接地;
VCAP_1,VCAP_2各接一个2.2uF电容然后接地;
NRST接复位电路;
PH0,PH1外接晶振电路;
PA13,PA14外接烧录口;
BOOT0,BOOT1各外接10K电阻然后接地;
有关VCAP_1外接电容的原因:(我是从这学的,讲的很清楚)STM32的Vcap的问题及解决---原来经验也害人_vcap_1-CSDN博客
图2.STM32F405RGT6最小系统原理图
经验总结:
经验部分集中在如何查找数据手册,以及数据手册的一个阅读。
关于STM32的芯片,我们可以直接去意法半导体的官网:
本人常用的渠道,一是半导小芯,二是立创商城,两个都挺好使的。
半导小芯-芯片查询工具_芯片替代查询_数据手册查询_规格书查询_datasheet查询_IC查询 (semiee.com)立创商城_一站式电子元器件采购自营商城-嘉立创电子商城 (szlcsc.com)
数据手册其实又臭又长,还都是英文,阅读多少有点困难,挑重点就好。比如我们要看引脚定义,先翻目录,找到Pinouts and pin description,点击跳转即可进行浏览。
图3.数据手册部分目录
声明:
如若存在错误,请大伙多多包涵,人家也是第一次(害羞脸);
如若想提建议,强烈欢迎;
如若存在侵权,请私聊,会处理;
感谢阅读;