I need help to interface my MSP430 with an SD-card using DMA. Started out with the code from slaa281B, worked well without DMA. I get the DMA writing working with some tweaking, but I don’t feel confident with the code. Is there any good code example that someone could share? I also looked at http://alumni.cs.ucr.edu/~amitra/sdcard/Additional/sdcard_appnote_foust.pdf.
No example, sorry. I got it working with DMA too, but my code belongs to my company.
However, DMA for SD-card only makes sense in a few cases, specifically during the 512byte read/write operation.In all other cases, a busy-waiting approach or an interrupt-based state-machine is much more suitable.Or the transfer can be done by carefully designed assembly code that exactly does one write every 8 SPI clock pulses.On SPICLK=MCLK, the saved time by DMA won't make up for the overhead for programming the DMA. (and for a command sending and checking the answer, you cannot do anything in the meantime anyway). On slower SPICLK, an interrupt-based approach is much simpler.Just during the data burst, it makes some sense, giving you 2048 MCLK cycles (on fastest SPI clock) during which you can do something else.
_____________________________________Before posting bug reports or ask for help, do at least quick scan over this article. It applies to any kind of problem reporting. On any forum. And/or look here.If you cannot discuss your problem in the public, feel free to start a private conversation: click on my name and then 'start conversation'. But please do so only if you really cannot do it in a public thread, as I usually read all threads. And I prefer to answer where others can profit from it (or contribute to it) too.
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.