stm32 usart3串口问题

2024-11-01 15:24:40
推荐回答(1个)
回答1:

USART_ClockInitStructure.USART_Clock = USART_Clock_Disable;
USART_ClockInitStructure.USART_CPOL = USART_CPOL_Low;
USART_ClockInitStructure.USART_CPHA = USART_CPHA_2Edge;
USART_ClockInitStructure.USART_LastBit = USART_LastBit_Disable;
USART_ClockInit(USART3,&USART_ClockInitStructure);
USART_ITConfig(USART3,USART_IT_RXNE,ENABLE);
加上这段应该就可以了