Hi.
I'm using DM6437 with SYS/BIOS as OS. On the current stage of my project I need to activate EDMA for the data transfer. I made small routine, that copies one array to another. Both of the arrays are in the DDR memory. For the copying QDMA is used. When I wait for the transfer completion by polling interrupt bit - program works just fine, I can see, that data in the source and destination arrays are the same. But for now I need to connect hwi handler.
I wrote function routine, that just post message into System Analyzer logger, and setup SYS/BIOS for using of this routine as interrupt handler. After starting the transfer I launch my main algorithms (they are using data, that completely independent from data, used by EDMA), after some time delay I pause execution - and see in the log all message, that were posted before and after DMA starting, but not the message, that should be added by EDMA handler. I've tried to set breakpoint in handler - program doesn't stops here at all.
Here my code with EDMA initialization:
void test_dma()
{
int i;
for (i = 0; i < 752*480; i++)
{
srcBuff[i] = 0xAB;
dstBuff[i] = 0x00;
}
Cache_wbInvAll();
// Clear errors
EMCR = 0xFFFFFFFF;
CCERRCLR = 0xFFFFFFFF;
QEMCR = 0xFFFFFFFF;
// EDMA initialization
QWMTHRA = (1 << 4u); // Maximum threshold level (16) for the queue 0
QCHMAP0=0x0000001Cu;
QEESR = 0x01u; // Enable channel
// Programming DMA Channel (and Param set)
P0_OPT = (1 << 20)|(1 << 3)|(1 << 2);
P0_SRC = (unsigned int)srcBuff;
P0_A_B_CNT = ((B_COUNT << 16u) | (A_COUNT & 0xFFFFu));
P0_DST = (unsigned int)dstBuff;
P0_SRC_DST_BIDX = (A_COUNT << 16u) | (A_COUNT & 0xFFFFu);
P0_LINK_BCNTRLD = 0xFFFFu;
P0_SRC_DST_CIDX = 0;
//Trigger
P0_CCNT = 1;
}
Here my EDMA handler:
void EDMA_Interrupt( UArg arg )
{
Log_info0("I'm here!\n");
}
Here screenshot with hwi SYS/BIOS configuration:
And data from RTA:
And this is part of .cfg file, that corresponds to hwi handler initialization:
var hwi0Params = new Hwi.Params();
hwi0Params.instance.name = "EDMA_HWI";
hwi0Params.priority = 5;
hwi0Params.eventId = 34;
Program.global.EDMA_HWI = Hwi.create(5, "&EDMA_Interrupt", hwi0Params);
I've tried to use platform independent and platform specific HWI blocks of SYS/BIOS, but results are the same. I've tried this on CCS 5.1 and CCS 5.2. Steps for connecting of the interrupt handler, that I did, are completely the same with the steps, that I saw in the TI workshop videos. Also, SYS/BIOS scheduler are started before EDMA test function execution.
Please, help me to deal with this problem.
Best regards,
Kirill