Forum Discussion
111 Replies
- Altera_Forum
Honored Contributor
--- Quote Start --- My DMA work ok... I'm be able to copy from SDRAM to OnChip... I guess it could be a bug... Sean --- Quote End --- Using HAL functions for mem-to-mem is easier i guess. but for per-to-mem, it is difficult - Altera_Forum
Honored Contributor
--- Quote Start --- Yes, I had the DMA drivers work in one direction, but not the other. Whatever I tried, no luck. Look in the Quartus Handbook DMA chapter (google for altera nios dma). The registers are explained there. You have a status register, read and write address, length and some control bits. you program them like you did with your periereal: IOWR(AVALON_0_BASE,reg,val); Adresses and length should be obvious. You only need to select the correct control bits. --- Quote End --- Ok. thanks! I will try it now. I am trying to transfer from peripheral to sdram. if this works, then i think it should be enough. your code is transferring from peripheral to mem or mem to peripheral? - Altera_Forum
Honored Contributor
my code does both, with double DMA and interrupts.
But I don't have it here, because i'm already in the weekend ;-))) - Altera_Forum
Honored Contributor
--- Quote Start --- my code does both, with double DMA and interrupts. But I don't have it here, because i'm already in the weekend ;-))) --- Quote End --- ok. thanks! i will try the dma register now - Altera_Forum
Honored Contributor
Dont forget to disable the DMA drivers in the BSP settings, or it won't work.
The HAL DMA init does something weird to the DMA... - Altera_Forum
Honored Contributor
how to disable it? I cant find it. where is the BSP setting?
- Altera_Forum
Honored Contributor
IIRC: Right-click on the BSP project, ->Nios II->Edit BSP settings
Under drivers, all periphereals should be listed. - Altera_Forum
Honored Contributor
I dont see the BSP project. I am using Nios II IDE.
- Altera_Forum
Honored Contributor
You should consider switching to the SBT (software build tools) flow. It has been the default for a number of Altera software releases now....soon the "classic/IDE" flow will go away.
Cheers, slacker - Altera_Forum
Honored Contributor
huh? where to get SBT?