USART2
USART3
RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOB, ENABLE );
GPIO设置 TX配置为 复用推挽 RX配置为 开漏输入
USART配置
发送数据
引脚定义
IO |
USART |
重定义 |
重定义 |
|
|
|
PA8 |
USART1_CK |
|
|
|
|
|
PA9 |
USART1_TX |
|
PB6 |
|
|
|
PA10 |
USART1_RX |
|
PB7 |
|
|
|
PA11 |
USART1_CTS |
|
|
|
|
|
PA12 |
USART1_RTS |
|
|
|
|
|
|
|
|
|
|
|
|
PA0 |
USART2_CTS |
PD3 |
|
|
|
|
PA1 |
USART2_RTS |
PD4 |
|
|
|
|
PA2 |
USART2_TX |
PD5 |
|
|
|
|
PA3 |
USART2_RX |
PD6 |
|
|
|
|
PA4 |
USART2_CK |
PD7 |
|
|
|
|
|
|
|
|
|
|
|
PB10 |
USART3_TX |
PD8 |
PC10 |
|
|
|
PB11 |
USART3_RX |
PD9 |
PC11 |
|
|
|
PB12 |
USART3_CK |
PD10 |
PC12 |
|
|
|
PB13 |
USART3_CTS |
PD11 |
|
|
|
|
PB14 |
USART3_RTS |
PD12 |
|
|
|
|
|
|
|
|
|
|
|
上一篇:stm32 printf输出到USART1
下一篇:对stm32启动代码DCD sfe(CSTACK)的理解
推荐阅读最新更新时间:2024-03-16 14:00