Forum Discussion

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

dma transfers between peripherals

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!

1 Reply

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

    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.