Hi 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);