Altera_Forum
Honored Contributor
21 years agoDMA transfert inside interrupt routine
Hi,
with a NIOSII and uCosII system, I'm trying to implement a DMA memory to memory transfert inside a interrupt routine (as described below). However the DMA transfert never finishs, due to the fact that the IRQ related to DMA controller never rises. Question: Do all the interrupts be disable when entering in a interrupt routine ? If yes, how to manage such a DMA transfert very quickly (I have to transfert the data before to acknoledge the IT) ? If no, what's wrong with my code ? Thanks in advance for your help. Gaël =================================== static void DmaDoneCallBack(void *handle, void *data) { DmaDone = 1; } /* alt_avalon_my_irq: The Interrupt handler */ static void alt_avalon_my_irq(void* context, alt_u32 interrupt) { /* set up and kick the DMA */ DmaDone = 0; alt_dma_txchan_send (dev->dma_tx, (void *)src, len, NULL, NULL); alt_dma_rxchan_prepare (dev->dma_rx, (void *)dest, len, DmaDoneCallBack, NULL); while( !DmaDone ) ; }