Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
20 years ago

DMA 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's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    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.

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Thank you Mike.

    Now, I can use DMA with IOWR.

    And I use your FIFO interface now.

    Thank you again.