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++
12745 ディスカッション

dma transfers between peripherals

Altera_Forum
名誉コントリビューター II
1,286件の閲覧回数

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 件の賞賛
1 返信
Altera_Forum
名誉コントリビューター II
533件の閲覧回数

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.

返信