Nios® V/II Embedded Design Suite (EDS)
Support for Embedded Development Tools, Processors (SoCs and Nios® V/II processor), Embedded Development Suites (EDSs), Boot and Configuration, Operating Systems, C and C++
12606 Discussions

DMA transfer from SDRAM to PIO

Altera_Forum
Honored Contributor II
985 Views

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.
0 Kudos
2 Replies
Altera_Forum
Honored Contributor II
267 Views

To simplify life, I wouldn&#39;t use any eCos DMA stuff; I&#39;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.

0 Kudos
Altera_Forum
Honored Contributor II
267 Views

Thank you Mike. 

 

Now, I can use DMA with IOWR. 

And I use your FIFO interface now. 

 

Thank you again.
0 Kudos
Reply