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.

TMS320F280049C: How to set CLA Task1 interrupt source

Part Number: TMS320F280049C
Other Parts Discussed in Thread: SYSCONFIG, C2000WARE

Hi, I have a project that uses F280049 ePWM1 to trigger CLA1 Task1, but ClaTask1() is not executed (the project 1_ph_Pwm_with_DC_input is uploaded).
I moved PWM interrupt to CPU1 side, Timer1 interrupt to CLA1 side, the new project is 1_ph_Pwm_with_DC_input_diff.
In the new project, both PWM interrupt routine and TIMER1 interrupt routine are executed normally.

I don't know if there are anything wrong in my code. CLA related code is as follows.

Thanks,

Jiakai1-ph Pwm with DC input (C code).zip 1-ph Pwm with DC input_diff (C code).zip 

void PS_ClaSetIntr(TClaTaskNo taskNo, TClaTrig trigNo)
{
    EALLOW;
    switch (taskNo) {
    case CLA_TASK_1:
		DmaClaSrcSelRegs.CLA1TASKSRCSEL1.bit.TASK1 = trigNo;
		Cla1Regs.MVECT1 = (Uint16)&Cla1Task1;
		Cla1Regs.MIER.bit.INT1 = 1;
		break;
	default:
		break;
	}
    EDIS;
}

void PS_PwmSetClaIntr(int16 pwmNo, TClaTaskNo taskNo)
{
    volatile struct EPWM_REGS *EPwmRegs;

    PS_ClaSetIntr(taskNo, (TClaTrig)((int)CLA_TRIGGER_EPWM1INT + (pwmNo - 1)));

    EPwmRegs = &EPwm1Regs + (--pwmNo);
    EALLOW;
    EPwmRegs->ETCLR.bit.INT = 1;
    EPwmRegs->ETSEL.bit.INTEN = 1;
    EDIS;
}

void PS_ClaInit(int16 claDataBlock, int16 claProgBlock, Uint32 softTaskBit)
{
    int i;
    EALLOW;
    CpuSysRegs.PCLKCR0.bit.CLA1 = 1;

    MemCfgRegs.MSGxINIT.bit.INIT_CLA1TOCPU = 1;     // Initialize and wait for CLA1ToCPUMsgRAM
    MemCfgRegs.LSxMSEL.all = 0x5555UL & (((Uint32)1 << (2 * (claDataBlock + claProgBlock))) - 1);
    MemCfgRegs.LSxCLAPGM.all = ((1 << claProgBlock) - 1) << claDataBlock;
    EDIS;

    while(MemCfgRegs.MSGxINITDONE.bit.INITDONE_CLA1TOCPU != 1);
}