This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

DSK6713 EDMA with HWI problem

Hello,

I am learning programming the DSK6713 using C6000 Integration Workshop Student Guide.

I have a problem with EDMA using hardware interrupts. The program doen't seem to enter interrupt function (edmaHwi). 

As in excercise from laboratory from Student Guide, I' ve got the following code:

main.c

/*
* ======== Include files ========
*/
#include<csl.h>
#include<csl_edma.h>
#include<csl_irq.h>

#include "sine.h"
#include "edma.h"

/*
* ======== Declarations ========
*/
#define BUFFSIZE 32

/*
* ======== Prototypes ========
*/
void initHwi(void);

/*
* ======== Global Variables ========
*/
short gBufXmt[BUFFSIZE];
short gBufRcv[BUFFSIZE];

SINE_Obj sineObj;

/*
* ======== main ========
*/
void main()
{
SINE_init(&sineObj, 256, 8 * 1000);
initEdma();
initHwi();
SINE_blockFill(&sineObj, gBufXmt, BUFFSIZE); // Fill the buffer with sine data
EDMA_setChannel(hEdmaXmt);
while (1) { // Loop Forever
}
}
void initHwi()
{
IRQ_enable(IRQ_EVT_EDMAINT);
IRQ_globalEnable();
}

edma.c

* ======== Include files ========
*/
#include<csl.h>
#include<csl_edma.h>
#include "sine.h"
/*
* ======== Declarations ========
*/
#define BUFFSIZE 32

/*
* ======== Prototypes ========
*/
void initEdma(void);
void edmaHwi(int tcc);
/*
* ======== References ========
*/
extern short gBufXmt[BUFFSIZE];
extern short gBufRcv[BUFFSIZE];
extern SINE_Obj sineObj;
/*
* ======== Global Variables ========
*/


EDMA_Handle hEdmaXmt;
EDMA_Handle hEdmaReloadXmt;
short gXmtTCC;

EDMA_Config gEdmaConfigXmt = {
EDMA_OPT_RMK(
EDMA_OPT_PRI_LOW, // Priority
EDMA_OPT_ESIZE_16BIT, // Element size
EDMA_OPT_2DS_NO, // 2 dimensional source
EDMA_OPT_SUM_INC, // Src update mode
EDMA_OPT_2DD_NO, // 2 dimensional dest
EDMA_OPT_DUM_INC, // Dest update mode
EDMA_OPT_TCINT_YES, // Cause EDMA interrupt
EDMA_OPT_TCC_OF(0), // Transfer Complete Code
// EDMA_OPT_TCCM_???, // Transfer Complete Code Upper Bits (c64x only)
// EDMA_OPT_ATCINT_???, // Alternate TCC Interrupt (c64x only)
// EDMA_OPT_ATCC_???, // Alternate Transfer Complete Code (c64x only)
// EDMA_OPT_PDTS_???, // Peripheral Device Transfer Source (c64x only)
// EDMA_OPT_PDTD_???, // Peripheral Device Transfer Dest (c64x only)
EDMA_OPT_LINK_YES, // Enable link parameters
EDMA_OPT_FS_YES // Use frame sync
),
EDMA_SRC_OF(gBufXmt), // src address
EDMA_CNT_OF(BUFFSIZE), // Count = buffer size
EDMA_DST_OF(gBufRcv), // dest address
EDMA_IDX_OF(0), // frame/element index value
EDMA_RLD_OF(0) // reload
};

/*
* ======== initEdma ========
*/
void initEdma(void)
{
hEdmaXmt=EDMA_open(EDMA_CHA_ANY,EDMA_OPEN_RESET);

gXmtTCC=EDMA_intAlloc(-1);
gEdmaConfigXmt.opt|=EDMA_FMK(OPT,TCC,gXmtTCC);

EDMA_config(hEdmaXmt,&gEdmaConfigXmt);

hEdmaReloadXmt=EDMA_allocTable(-1);
EDMA_config(hEdmaReloadXmt,&gEdmaConfigXmt);

EDMA_link(hEdmaXmt,hEdmaReloadXmt);
EDMA_link(hEdmaReloadXmt,hEdmaReloadXmt);

EDMA_intClear(gXmtTCC);
EDMA_intEnable(gXmtTCC);

EDMA_intHook(gXmtTCC,edmaHwi);
}

void edmaHwi(int tcc)
{
SINE_blockFill(&sineObj, gBufXmt, BUFFSIZE); // Fill the buffer with sine data
EDMA_setChannel(hEdmaXmt);
}

I configured interrupt using Configuration tool:

I set breakpoint in edmaHwi function but program never gets there. What can be source of this problem?

Thanks,

Michał