Tool/software: Code Composer Studio
Hello
I am working on a program using memory scatter gather DMA. The data seems to be correctly copied from one RAM location to the other but the DMA_INTx is not fired. Could you please help me in solving the issue. My code is based on the example dma_array_transfer_software trigger. Thanks in advance for your valuable help.
Regards, Jeremy
Please find the parts of the code below:
*Task List
DMA_ControlTable TaskList[] =
{
// 1. Transfer the 8 samples
DMA_TaskStructEntry(8, UDMA_SIZE_8,
UDMA_SRC_INC_8, (void *)&SourceArray[0],
UDMA_DST_INC_8, (void *)&destinationArray[0],
UDMA_ARB_4, UDMA_CHCTL_XFERMODE_MEM_SGA
),
// 2. Transfer last 8 samples
DMA_TaskStructEntry(8, UDMA_SIZE_8,
UDMA_SRC_INC_8, (void *)&SourceArray[16],
UDMA_DST_INC_8, (void *)&destinationArray[16],
UDMA_ARB_4, UDMA_MODE_BASIC
),
};
* DMA setup
MAP_DMA_enableModule();
MAP_DMA_setControlBase(controlTable);
/* Assigning Channel 0 to Reserved 0 and enabling channel 0*/
MAP_DMA_assignChannel(DMA_CH0_RESERVED0);
/* Disabling channel attributes */
MAP_DMA_disableChannelAttribute(DMA_CH0_RESERVED0, UDMA_ATTR_ALTSELECT | UDMA_ATTR_USEBURST | UDMA_ATTR_HIGH_PRIORITY | UDMA_ATTR_REQMASK);
/* Set the DMAs primary channel for memory scatter gather mode */
uint32_t TaskCount = 2;
MAP_DMA_setChannelScatterGather(DMA_CH0_RESERVED0, TaskCount, &TaskList[0], false);
MAP_DMA_assignInterrupt(DMA_INT1, 0);
MAP_Interrupt_enableInterrupt(INT_DMA_INT1);
MAP_DMA_enableChannel(0);
MAP_Interrupt_enableMaster();
MAP_DMA_requestSoftwareTransfer(0);
*Interrupt Routine
/* Completion interrupt for DMA */
void DMA_INT1_IRQHandler(void)
{
MAP_DMA_disableChannel(0);
isFinished = true;
}