概述
stm32f407主要通信外设的io分配和复用预览。之前做工创赛整理的,又用AI处理了一下,方便查看。
引脚复用一览
串口 (USART)
USART |
TX 引脚 |
RX 引脚 |
复用功能 (AF) |
USART1 |
PA9, PB6 |
PA10, PB7 |
AF7 |
USART2 |
PA2, PD5 |
PA3, PD6 |
AF7 |
USART3 |
PB10, PD8 |
PB11, PD9 |
AF7 |
UART4 |
PA0, PC10 |
PA1, PC11 |
AF8 |
UART5 |
PC12 |
PD2 |
AF8 |
USART6 |
PC6, PG14 |
PC7, PG9 |
AF8 |
定时器 (TIM)
定时器 |
通道 |
引脚 |
复用功能 (AF) |
TIM1 |
CH1 |
PA8 |
AF1 |
TIM1 |
CH2 |
PA9 |
AF1 |
TIM1 |
CH3 |
PA10 |
AF1 |
TIM1 |
CH4 |
PA11 |
AF1 |
TIM2 |
CH1 |
PA0, PA5 |
AF1 |
TIM2 |
CH2 |
PA1 |
AF1 |
TIM2 |
CH3 |
PA2 |
AF1 |
TIM2 |
CH4 |
PA3 |
AF1 |
TIM3 |
CH1 |
PA6, PB4 |
AF2 |
TIM3 |
CH2 |
PA7, PB5 |
AF2 |
TIM3 |
CH3 |
PB0, PC8 |
AF2 |
TIM3 |
CH4 |
PB1, PC9 |
AF2 |
TIM4 |
CH1 |
PB6, PD12 |
AF2 |
TIM4 |
CH2 |
PB7, PD13 |
AF2 |
TIM4 |
CH3 |
PB8, PD14 |
AF2 |
TIM4 |
CH4 |
PB9, PD15 |
AF2 |
I2C
I2C |
SCL 引脚 |
SDA 引脚 |
复用功能 (AF) |
I2C1 |
PB6, PB8 |
PB7, PB9 |
AF4 |
I2C2 |
PB10, PF1 |
PB11, PF0 |
AF4 |
I2C3 |
PA8 |
PC9 |
AF4 |
SPI
SPI |
SCK 引脚 |
MISO 引脚 |
MOSI 引脚 |
NSS 引脚 |
复用功能 (AF) |
SPI1 |
PA5, PB3 |
PA6, PB4 |
PA7, PB5 |
PA4, PA15 |
AF5 |
SPI2 |
PB10, PB13 |
PC2, PB14 |
PC3, PB15 |
PB9, PB12 |
AF5 |
SPI3 |
PC10, PB3 |
PC11, PB4 |
PC12, PB5 |
PA4, PA15 |
AF6 |
CAN
CAN |
TX 引脚 |
RX 引脚 |
复用功能 (AF) |
CAN1 |
PA12, PB9 |
PA11, PB8 |
AF9 |
CAN2 |
PB13 |
PB12 |
AF9 |
USB
USB |
引脚 |
复用功能 (AF) |
USB_FS |
PA11 (DM), PA12 (DP) |
AF10 |
USB_HS |
PA11 (DM), PA12 (DP) |
AF10 |
SDIO
SDIO |
引脚 |
复用功能 (AF) |
SDIO |
PC8 (D0), PC9 (D1), PC10 (D2), PC11 (D3), PC12 (CLK), PD2 (CMD) |
AF12 |
单片机引脚调用
引脚 |
功能 |
引脚 |
功能 |
引脚 |
功能 |
引脚 |
功能 |
引脚 |
功能 |
引脚 |
功能 |
PA0 |
编码器4-A |
PB0 |
|
PC0 |
|
PD0 |
|
PE0 |
|
PF0 |
|
PA1 |
编码器4-B |
PB1 |
|
PC1 |
|
PD1 |
|
PE1 |
|
PF1 |
|
PA2 |
2-TX |
PB2 |
|
PC2 |
|
PD2 |
5-RX |
PE2 |
|
PF2 |
|
PA3 |
2-RX |
PB3 |
编码器1-B |
PC3 |
|
PD3 |
|
PE3 |
|
PF3 |
|
PA4 |
|
PB4 |
编码器2-A |
PC4 |
|
PD4 |
|
PE4 |
|
PF4 |
|
PA5 |
编码器1-A |
PB5 |
编码器2-B |
PC5 |
|
PD5 |
|
PE5 |
PWM7 |
PF5 |
|
PA6 |
PWM1 |
PB6 |
编码器3-A |
PC6 |
6-TX |
PD6 |
|
PE6 |
PWM8 |
PF6 |
|
PA7 |
PWM2 |
PB7 |
编码器3-B |
PC7 |
6-RX |
PD7 |
|
PE7 |
|
PF7 |
|
PA8 |
|
PB8 |
PWM3 |
PC8 |
|
PD8 |
MOTOR1-A |
PE8 |
|
PF8 |
|
PA9 |
1-TX |
PB9 |
PWM4 |
PC9 |
|
PD9 |
MOTOR1-B |
PE9 |
PWM9_M1 |
PF9 |
|
PA10 |
1-RX |
PB10 |
3-TX |
PC10 |
4-TX |
PD10 |
MOTOR2-A |
PE10 |
|
PF10 |
|
PA11 |
|
PB11 |
3-RX |
PC11 |
4-RX |
PD11 |
MOTOR2-B |
PE11 |
PWM10_M2 |
PF11 |
|
PA12 |
|
PB12 |
|
PC12 |
5-TX |
PD12 |
MOTOR3-A |
PE12 |
|
PF12 |
|
PA13 |
|
PB13 |
|
PC13 |
|
PD13 |
MOTOR3-B |
PE13 |
PWM11_M3 |
PF13 |
|
PA14 |
|
PB14 |
PWM5 |
PC14 |
|
PD14 |
MOTOR4-A |
PE14 |
PWM12_M4 |
PF14 |
|
PA15 |
|
PB15 |
PWM6 |
PC15 |
|
PD15 |
MOTOR4-B |
PE15 |
|
PF15 |
|