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.
请问:我把c2000ware 的cla例程(cla_ex2_adc_fir32.c ,cla_ex2_adc_fir32.h, cla_ex2_adc_fir32.asm)放到工程里面,配上头文件、源文件,两个cmd文件(28004x_cla_flash_lnk.cmd, f28004x_headers_nonbios.cmd),编译通过,但是在线调试发现,cla没有相应。请问是哪里出了问题呢?非常非常感谢!
我用launchpad试了下该例程,确实无法到cla文件里面,我会在确认后给您回复
您可以使用 C:\ti\c2000\C2000Ware_3_01_00_00\driverlib\f28004x\examples\cla 下的cla_ex1_adc_fir例程,我测试了一下是可以的
请注意选择launchxl_flash来测试flash
//! \b External \b Connections for Control Card\n //! - connect A0 to EPWM4A //! //! \b External \b Connections for Launch Pad\n //! - connect ADCINA0 to PWM4A
示例中的内存配置与链接器.cmd文件不匹配。链接器将CLA程序分配给LS0,将数据分配给LS1,但是该示例将LS4和LS5配置为进行编程。这就是遇到ITRAP的原因-C28x代码从此块运行,并且所有权更改为CLA时,C28x无法获取代码。
在下面显示的函数中,我对内存配置进行了更改以匹配链接器.cmd文件。
void CLA_configClaMemory(void) { ...... // // 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_LS0 = 1; MemCfgRegs.LSxCLAPGM.bit.CLAPGM_LS0 = 1; MemCfgRegs.LSxMSEL.bit.MSEL_LS1 = 1; // // These 4 lines do not match the .cmd file! // //MemCfgRegs.LSxMSEL.bit.MSEL_LS4 = 1; //MemCfgRegs.LSxCLAPGM.bit.CLAPGM_LS4 = 1; //MemCfgRegs.LSxMSEL.bit.MSEL_LS5 = 1; //MemCfgRegs.LSxCLAPGM.bit.CLAPGM_LS5 = 1;