Altera_Forum
Honored Contributor
14 years agoDMA problem
why when i use my dma, the program stucks here: --- Quote Start --- while (!rx_done); printf ("Transfer successful!\n"); --- Quote End --- pls help! thanks!
all right.
this code may be OK.( this is copied from NiosII example, right?) you know what is going on. after alt_dma_rxchane_pepare(); DMA is started by the function and continues transfer as long as data remain. after then, when transfer is finished the function "done" is called in background of the sequence. value in rx_done is turned into "1" then the while loop will finish due to its logic. so, I'm not sure why dma is not finished. but I wonder can you DMA from SDRAM to Flash?