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,
* 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?
Thanks to use our TMS570 Forum.
We are taking care of your question and we will be back to you shortly.
If my reply answers your question please click on the green button "Verify Answer".
I've an option to be tested in your application.
- Disable Chnl (ensure events don’t occur from this point)
- Write to any 1 word of the CP of the erroneous chnl. That way the DMA clears the Dirty and Pend bit. DMA loses all memory of this channel.
- Re-enable chnl (events can occur again from this point)
Please can you try and let me know if this help with your problem.
thank you for you reply.
I will try your suggestion.
One question, however:
The word that is written to the CP; should that be a re-write of the original data or a write of some new value, followed by a write of the original data?
I've received an update on your question.
You can write to offset 0x0c of the CP. It is a reserved field. With this method, you don't have to re-write to the CP any more before re-enabling the chnl.
thanks for the reply I will give it ago.
I can confirm; that writing to the reserved register you mentioned, has the desired effect of reseting the DMA for the particular channel.
Thank you for your help, consider the thread closed.
All content and materials on this site are provided "as is". TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with regard to these materials, including but not limited to all implied warranties and conditions of merchantability, fitness for a particular purpose, title and non-infringement of any third party intellectual property right. TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with respect to these materials. No license, either express or implied, by estoppel or otherwise, is granted by TI. Use of the information on this site may require a license from a third party, or a license from TI.
TI is a global semiconductor design and manufacturing company. Innovate with 100,000+ analog ICs andembedded processors, along with software, tools and the industry’s largest sales/support staff.