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.
整个程序运行在RAM中,由于程序段大于原先的.text段,于是在CMD文件中扩展了RAMGS10,并在CPU1初始化阶段将GS10分配给了CPU2。但是程序运行到CLA_configClaMemory();函数时进入非法中断,看了一下生成的MAP该函数在LS5空间内,GS10RAM中存放的是自己写的函数。CPU2的工程用的CMD文件时controlsuit中的2837xD_RAM_CLA_Lnk_CPU1.cmd。
你好,RAMGS10和RAMLS5空间应该不会冲突啊,你试一下用C2000WARE中的cmd文件修改:C:\ti\c2000\C2000Ware_3_04_00_00\device_support\f2837xd\common\cmd
试了也不行,在运行到
MemCfgRegs.LSxMSEL.bit.MSEL_LS0 = 1;
MemCfgRegs.LSxCLAPGM.bit.CLAPGM_LS0 = 0;
MemCfgRegs.LSxMSEL.bit.MSEL_LS1 = 1;
MemCfgRegs.LSxCLAPGM.bit.CLAPGM_LS1 = 0;
//
// Initialize and wait for CLA1ToCPUMsgRAM
//
MemCfgRegs.MSGxINIT.bit.INIT_CLA1TOCPU = 1;
while(MemCfgRegs.MSGxINITDONE.bit.INITDONE_CLA1TOCPU != 1){};
//
// Initialize and wait for CPUToCLA1MsgRAM
//
MemCfgRegs.MSGxINIT.bit.INIT_CPUTOCLA1 = 1;
while(MemCfgRegs.MSGxINITDONE.bit.INITDONE_CPUTOCLA1 != 1){};
//
// Select LS4RAM and LS5RAM to be the programming space for the CLA
// First configure the CLA to be the master for LS4 and LS5 and then
// set the space to be a program block
//
MemCfgRegs.LSxMSEL.bit.MSEL_LS4 = 1;
MemCfgRegs.LSxCLAPGM.bit.CLAPGM_LS4 = 1;
MemCfgRegs.LSxMSEL.bit.MSEL_LS5 = 1;
MemCfgRegs.LSxCLAPGM.bit.CLAPGM_LS5 = 1;
//
// Next configure LS0RAM and LS1RAM as data spaces for the CLA
// First configure the CLA to be the master for LS0(1) and then
// set the spaces to be code blocks
//
EDIS;
运行到当前位置下一次单步运行就跳到非法中断里边去了;
抱歉暂时对这个问题没有其他想法,建议你将问题发布到英文E2E论坛,英文E2E论坛上的Lori Heustess是CLA方面的专家,应该可以帮助你解决问题:https://e2e.ti.com/support/microcontrollers/c2000-microcontrollers-group/c2000/f/c2000-microcontrollers-forum