Other Parts Discussed in Thread: C2000WARE
I tried to trigger the CLA task via software trigger feature but it is not working.
1. I used .cmd file given in the c2000 folder named as "2837xD_RAM_CLA_Ink_cpu1.cmd"
2. I enabled the clock for CLA.
3. In main function I used Pragma for using a variable .cla file
#pragma DATA_SECTION (CLAMEMORY,"Cla1ToCpuMsgRAM");
4. I Created a .cla file in which I assigned a value to the variable as follows
__interrupt void Cla1Task1(void)
{
__mdebugstop();
CLAMEMORY=2;
}
5. I initialized the following registers for CLA
asm(" EALLOW");
MemCfgRegs.LSxMSEL.bit.MSEL_LS0 = 1; // 0=CPU 1=CPU and CLA
MemCfgRegs.LSxMSEL.bit.MSEL_LS1 = 1; // 0=CPU 1=CPU and CLA
MemCfgRegs.LSxMSEL.bit.MSEL_LS2 = 1; // 0=CPU 1=CPU and CLA
MemCfgRegs.LSxMSEL.bit.MSEL_LS3 = 0; // 0=CPU 1=CPU and CLA
MemCfgRegs.LSxMSEL.bit.MSEL_LS4 = 1; // 0=CPU 1=CPU and CLA
MemCfgRegs.LSxMSEL.bit.MSEL_LS5 = 0; // 0=CPU 1=CPU and CLA
MemCfgRegs.LSxCLAPGM.bit.CLAPGM_LS0 = 0; // 0=CLA data memory 1=CLA program memory
MemCfgRegs.LSxCLAPGM.bit.CLAPGM_LS1 = 0; // 0=CLA data memory 1=CLA program memory
MemCfgRegs.LSxCLAPGM.bit.CLAPGM_LS2 = 0; // 0=CLA data memory 1=CLA program memory
MemCfgRegs.LSxCLAPGM.bit.CLAPGM_LS3 = 0; // 0=CLA data memory 1=CLA program memory
MemCfgRegs.LSxCLAPGM.bit.CLAPGM_LS4 = 1; // 0=CLA data memory 1=CLA program memory
MemCfgRegs.LSxCLAPGM.bit.CLAPGM_LS5 = 0; // 0=CLA data memory 1=CLA program memory
Cla1Regs.MVECT1 = (uint16_t)(&Cla1Task1);
DmaClaSrcSelRegs.CLA1TASKSRCSEL1.bit.TASK1 = 0; // 0=none/software
DmaClaSrcSelRegs.CLA1TASKSRCSELLOCK.bit.CLA1TASKSRCSEL1 = 0; // Write a 1 to lock (cannot be cleared once set)
DmaClaSrcSelRegs.CLA1TASKSRCSELLOCK.bit.CLA1TASKSRCSEL2 = 0; // Write a 1 to lock (cannot be cleared once set)
asm(" EDIS");
6. I used the following registers for triggering "Cla1Task1" via software trigger
Cla1Regs.MIER.all = 0x0001; // Enable CLA interrupt 1 Cla1Regs.MCTL.bit.IACKE = 0x0001; // Enable IACKE to start task using software (0x0001---> for task 1)
7. I am not enabling any CLA interrupt to be enabled after processing the CLA task Hence I didn't use the PieCtrlRegs.
8. I ran the code and did the following during debugging,
- In debug window I selected CPU1_CLA1 and connected the target
- then I loaded the symbols
- but it showed "0x00000000 (No symbols are defined)"
9. Now my Question is
- Am I missing anything else?
- The variable CLAMEMORY=2 is not updating in the expression window.
Thank you waiting for your reply