From 18bcd2b2c6d1554f2bd7ec8de90ccd36d943626b Mon Sep 17 00:00:00 2001 From: BalanceTWK Date: Thu, 6 Dec 2018 09:07:55 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E4=BF=AE=E5=A4=8D=E3=80=91=20?= =?UTF-8?q?=E5=A4=8D=E4=BD=8D=E5=90=8E=E4=B8=B2=E5=8F=A3=E6=89=93=E5=8D=B0?= =?UTF-8?q?=E7=AC=AC=E4=B8=80=E4=B8=AA=E5=AD=97=E8=8A=82=E4=B8=A2=E5=A4=B1?= =?UTF-8?q?=E7=9A=84=E9=97=AE=E9=A2=98=20|=20The=20loss=20of=20the=20first?= =?UTF-8?q?=20byte=20of=20serial=20port=20printing=20after=20reset.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bsp/stm32f10x/drivers/usart.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/bsp/stm32f10x/drivers/usart.c b/bsp/stm32f10x/drivers/usart.c index 3841a5c9f1..18059bf1dc 100644 --- a/bsp/stm32f10x/drivers/usart.c +++ b/bsp/stm32f10x/drivers/usart.c @@ -100,6 +100,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; }