提交 956fdc60 编写于 作者: zhangzhen7758's avatar zhangzhen7758 提交者: guo

接收错误中断未触发的问题

/* Enable error interrupt */
NVIC_EnableIRQ(uart->config->rxerr_irq.irq_config.irq_num);
上述代码使能错误接收中断后需要使能串口的接收中断`USART_INT_RX`才可以正常触发中断
上级 5774dcac
......@@ -264,7 +264,7 @@ static rt_err_t hc32_configure(struct rt_serial_device *serial, struct serial_co
/* Enable error interrupt */
NVIC_EnableIRQ(uart->config->rxerr_irq.irq_config.irq_num);
USART_FuncCmd(uart->config->Instance, USART_TX | USART_RX, ENABLE);
USART_FuncCmd(uart->config->Instance, USART_TX | USART_RX | USART_INT_RX, ENABLE);
return RT_EOK;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册