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++
12600 Discussions

dma transfers between peripherals

Altera_Forum
Honored Contributor II
1,028 Views

Hello everybody! 

 

In a NiosII system with a DMA and two custom peripherals, I need to transfer data between these two peripherals with DMA. My problem is that I don't know how to configure DMA to read and write to a fixed address (i.e. without address incrementing in both read and write ports). I'm able to configure it to perform memory to peripheral, peripheral to memory and memo to memo transfers using the HAL, but I can't imagine how to do it for peripheral to peripheral transfers. Any idea? 

 

Looking to DMA documentation I've found that it must be much easier to do this kind of transfers accessing directly to registers, but I've read that I can't access registers directly if I'm using HAL system drivers. Does it mean that if I access directly to registers I can't use HAL drivers for DMA only, or for any component of my system? 

 

 

Thank you for your time!
0 Kudos
1 Reply
Altera_Forum
Honored Contributor II
275 Views

Use the alt_dma_txchan_ioctl() and alt_dma_rxchan_ioctl() to set the ALT_DMA_RX_ONLY_XXX and ALT_DMA_TX_ONLY_XXX settings. This should set the DMA controllers to read/write to a single location only instead of incrementing from the base address you give it.

0 Kudos
Reply