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.
When the DMA channel is manually stopped before all transfers have completed (ie XFER_SIZE > 0), will the associated DMA interrupt be triggered? I'm specifically using this for a UART RX channel but, I'd like to know more generally too. I expected that it would but, my testing shows that the DMA interrupt isn't being triggered after disabling the channel.
I tried disabling by setting the DMA channel mode to STOP - pu32_dma_control_table[UART2_DMA_PRI_CTL_OFFSET] &= ((~UDMA_CHCTL_XFERMODE_M) | UDMA_CHCTL_XFERMODE_STOP);
I also tried disabling by setting the ENACLR bit of the channel - HWREG(UDMA_ENACLR) = 1 << UDMA_SEC_CHANNEL_UART2RX_0;
These lines of code do infact disabled the channel but, neither of them trigger the interrupt with the DMARX flag set.
Hello Patrick,
Patrick Emerick said:When the DMA channel is manually stopped before all transfers have completed (ie XFER_SIZE > 0), will the associated DMA interrupt be triggered?
No. If a data transfer by the µDMA from the Rx FIFO completes, the DMARXRIS bit is set. If you turn off the channel before the completion, then the interrupt is not triggered.
The behavior you describe is what is expected.