【修复】 复位后串口打印第一个字节丢失的问题 | The loss of the first byte of serial port printing after reset.

This commit is contained in:
BalanceTWK 2018-12-06 09:07:55 +08:00
parent 27cd03d454
commit 18bcd2b2c6
1 changed files with 2 additions and 0 deletions

View File

@ -101,6 +101,8 @@ static rt_err_t stm32_configure(struct rt_serial_device *serial, struct serial_c
/* Enable USART */
USART_Cmd(uart->uart_device, ENABLE);
USART_ClearFlag(uart->uart_device,USART_FLAG_TC);
return RT_EOK;
}