STM32-如何处理UART中的框架和噪声错误?
我正在使用DMA在UART RX中接收数据,因此我需要将其置于断开连接。现在,有时我可以在断开连接后恢复通信,但是我需要始终恢复。
使用调试器,我意识到Huart1.ErrorCode将其值从0更改为0到2,4或6。我想它们是噪声,帧和噪声+帧(?)错误,并且在此错误之后,UART停止了。
如何通过我的HAL_UART_ERRORCALLBACK和RESUME UART通信处理此错误?
谢谢你!
PD:STM32F407VET6
I'm receiving data in UART Rx with DMA and I need to make it inmunne to disconnections. Now, sometimes I can recover the communication after a disconnection, but I need to recover it always.
Using the debugger I realized that huart1.ErrorCode change its value from 0 to 2,4 or 6. I guess they are noise, frame and noise+frame(?) errors, and after this error the UART stops.
How can I handle this error with my HAL_UART_ErrorCallback and resume UART communication?
Thank you!
PD: STM32F407VET6
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论