Forum Discussion
Altera_Forum
Honored Contributor
20 years agoDMA transfer from SDRAM to PIO
Hello.
I'm now trying to use DMA for transferring data from SDRAM to PIO. But I don't know how to use DMA in eCos. (I searched this forum, but I couldn't find.) Can someone teach me how to use DMA ? If possible, could you show me a simple example. (I'm newbe for embedded system. For me, This is first time to use DMA.) Thank you. Best regards.2 Replies
- Altera_Forum
Honored Contributor
To simplify life, I wouldn't use any eCos DMA stuff; I'd talk right to the DMA hardware with IORD/IOWR (in <cyg/hal/io.h>). Read the Altera documentation on the DMA peripheral and its registers. Starting the DMA should amount to four IOWR()s; one each to set source and destination addresses and word count, and another to set the transfer-type flags and start the DMA.
- Altera_Forum
Honored Contributor
Thank you Mike.
Now, I can use DMA with IOWR. And I use your FIFO interface now. Thank you again.