你好!
串口使用udma接收数据时,只有收到uDMAChannelTransferSet 设置中的ulTransferSize数量的数据才进中断。如何能收到不定长度的数据呢?
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.
你需要用DMA的话,肯定就要设置一个长度的,这是它的意思: Items to be transfered in DMA Transfer(should not exceed 1024)。
如果要不定长的话,你就用中断或轮询好了。
我是想用DMA接受变长度,然后利用time out 中断来截取一下。
但是先发现,DMA接受的时候总是收不到最后一个字节,后来把MAP_uDMAChannelAttributeEnable(ulChannel,UDMA_ATTR_USEBURST);去掉就好了,但是这样就没办法进time out 中断了,请问有什么好办法