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.

Resetting of DMA



Hi,

I have DMA transfers set up which are driven from HW interrupts generated by an SPI module.  They are set up so as the data to send is DMA'd in to the SPI Tx buffer each time the SPI Tx buffer becomes full, and the other is set to DMA'd received data out of the SPI Rx buffer each time it is full.

I have it configured correctly since all is working as expected.

However, for the purposes of error recovery I would like to be able to reset one of the DMA channels.  That is to reset the channel's DMA state machine so as the working registers are reset to the values held in the control registers.  So as the DMA channel is back in its original state prior to any DMA having occurred.  Is this possible?

I do not want to complexly reconfigure the DMA since this would upset the other channels, or reconfigure the channel necessarily.

I cannot find in the TRM a suitable way of doing what I want.  Is it possible?

I have, as an experiment, re-written some of the control information* to the control packet for the channel I want to reset but this appears to stop the DMA permanently for the particular channel.

Any help or leads would be appreciated.

Thanks in advance,

Steve

* The note on p1471 section 20.3.4 TRM Aug 2011 implies that this should cause a reset.  May be only if the DMA is pending?