提交 ae66e67d 编写于 作者: W winfenggao 提交者: mysterywolf

bug:

UART_FLAG_TC 不能在中断里CLEAR;
因为函数 static int stm32_putc(struct rt_serial_device *serial, char c)里发送完成后
while 循环等这个标志退出,中断服务函数CLEAR后,此处进入死循环
上级 c67cbdb3
......@@ -457,10 +457,6 @@ static void uart_isr(struct rt_serial_device *serial)
{
UART_INSTANCE_CLEAR_FUNCTION(&(uart->handle), UART_FLAG_TXE);
}
if (__HAL_UART_GET_FLAG(&(uart->handle), UART_FLAG_TC) != RESET)
{
UART_INSTANCE_CLEAR_FUNCTION(&(uart->handle), UART_FLAG_TC);
}
if (__HAL_UART_GET_FLAG(&(uart->handle), UART_FLAG_RXNE) != RESET)
{
UART_INSTANCE_CLEAR_FUNCTION(&(uart->handle), UART_FLAG_RXNE);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册