Forum Discussion
Altera_Forum
Honored Contributor
19 years agoDMA receive channel
Hi Nios community, I'm building a system that uses a DMA device in a NiosII core. It is set up as a DMA receive channel to stream data from a fixed address peripheral to SRAM memory. T...
Altera_Forum
Honored Contributor
19 years agoHi Nios users,
For DMA receive transfers, using the MACRO access to DMA registers instead of the API is the way to go in my opinion. You get much better control and understanding of the DMA behavior. Using the API is fine for memory to memory transfers. My design is working nicely now. Some things to watch out for: It may be helpful to use IOWR_ALTERA_AVALON_DMA_STATUS(DMA_BASE,0); to reset before a new transfer. Also, if the size of the data reads is not always correct (in hardware) a reset of the write address between transfers sorts things out: IOWR_ALTERA_AVALON_DMA_WADDRESS(DMA_BASE, (int)buff_ptr);