關于CH32X035F8U6 uart4的問題

CH32X035F8U6 4個uart口吧,uart4的PB0和PB1腳可以使用吧。

? ?/* USART4 TX-->B.0 ?RX-->B.1 */

GPIO_InitStructure.GPIO_Pin = GPIO_Pin_0; ?//PB0 TX

GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;

GPIO_InitStructure.GPIO_Mode = GPIO_Mode_AF_PP;

GPIO_Init(GPIOB, &GPIO_InitStructure);

GPIO_InitStructure.GPIO_Pin = GPIO_Pin_1; ?//PB1 TX

GPIO_InitStructure.GPIO_Mode = GPIO_Mode_IN_FLOATING;

GPIO_Init(GPIOB, &GPIO_InitStructure);


USART_InitStructure.USART_BaudRate = 115200;

USART_InitStructure.USART_WordLength = USART_WordLength_8b;

USART_InitStructure.USART_StopBits = USART_StopBits_1;

USART_InitStructure.USART_Parity = USART_Parity_No;

USART_InitStructure.USART_HardwareFlowControl = USART_HardwareFlowControl_None;

USART_InitStructure.USART_Mode = USART_Mode_Tx | USART_Mode_Rx;


USART_Init(USART4, &USART_InitStructure);

USART_Cmd(USART4, ENABLE);

這樣初始化正確吧

您好,CH32X035F8U6只有3個串口,沒有串口4,參考下圖。具體可看CH32X035數(shù)據(jù)手冊,手冊下載鏈接如下:

http://m.findthetime.net/downloads/CH32X035DS0_PDF.html?

image.png


只有登錄才能回復,可以選擇微信賬號登錄

国产91精品新入口,国产成人综合网在线播放,九热这里只有精品,本道在线观看,美女视频a美女视频,韩国美女激情视频,日本美女pvp视频