This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TM4C 串口+DMA 接受数据,当一组数进来且没有填满buff时该如何知晓?

Other Parts Discussed in Thread: EK-TM4C123GXL

板子:tm4c123gxl

参考例程:ti\TivaWare_C_Series-2.1.4.178\examples\boards\ek-tm4c123gxl\udma_demo

使用 pc 端发送数据,tm4c端用 uart0 接收,采用 ping-pong 模式,配置的 buffA 和 buffB 的数组大小为64。

问题:

1. 如果PC端发送的数据长度小于64,则 buffA 填不满,所以不触发 uart0 的中断。现在看板子上的结果是这样的,请问,原理上也确实是这样的么?

2. 如果上面的结论是正确的,即 uart0 中断不能帮我告诉我有数据来,那我如何第一时间获知这组长度小于64的数据的到来?

谢谢!