Forum Discussion
Altera_Forum
Honored Contributor
14 years agoDMA Transfer problem
Hi, I am trying to do a simple DMA mem to mem transfer as per the "Chap24: DMA controller core " example. I have been at this for almost a week now and it is still not working for me. Can you p...
Altera_Forum
Honored Contributor
14 years agoAfter you write the control register I would expect the status register bits [1:0] to be non-zero (either busy transferring or done). As a result you have while (!(non_zero_value == 0)); .... or in other words an infinite loop. You should mask the busy bit and keep looping until it is set:
while ( ((IORD_ALTERA_AVALON_DMA_STATUS(DMA_0_BASE) & ALTERA_AVALON_DMA_STATUS_DONE_MSK) != ALTERA_AVALON_DMA_STATUS_DONE_MSK ) { // spin } If that software change still doesn't work run it in the simulation since it'll be easier to debug with the driver out of the way.