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.

l138 串口 dma 可以发用dma,收用普通中断吗?



我看例子里uart的串口模式是dma传输完成后都需要清零一次,可以不清零,然串口一直在dma模式吗?

我试了在初始化时配置成dma+fifo,后面不清零,然后,收到的数据就不能再发送了?

  • 需要清。

    The UART’s FIFO/THR is emptied before the UART DMA mode or eDMA event has been disabled.  The UART has sent a DMA request and is waiting for data from the eDMA.  The eDMA has processed this DMA request.  However, the next paramSet is a Dummy Transfer.  Therefore, the eDMA does not transfer any data to the UART.  When the UART DMA mode is disabled and re-enabled, there has not been any change in the status of the UART FIFO/THR.  As such, the UART does not re-issue a DMA request.  This is how the UART IP was designed.  Unfortunately, there are no bits in the UART that indicate whether a DMA request is still outstanding.