Other Parts Discussed in Thread: C2000WARE
Tool/software:
Today I have a dual core delfino. On CPU2 I'm using CLAmath (e.g.CLAsinPU and CLAcosPU) on the CLA of the second core. This works great in RAM but seems to fail when running from FLASH even though the rest of the CLA & CPU programs run fine on that core. I have debug code to isolate it to these two function calls from CLAmath. What do you think I'm missing or appears wrong? Here are a few of the critical pieces in the code that I've been trying to adjust. Thanks in advance!!
The linker file includes the following:
CPU_CLA_LS_DATA : origin = 0x00A000 length = 0x001000 //CLA data space CLA1mathTables : > CPU_CLA_LS_DATA, PAGE = 1//was page=1 CLA1mathTables : LOAD = FLASHL, RUN = CPU_CLA_LS_DATA, RUN_START(CLA1mathTablesRunStart), LOAD_START(CLA1mathTablesLoadStart), LOAD_SIZE(CLA1mathTablesLoadSize), PAGE = 1, ALIGN(8)
Memory configuration
//local shared RAM master sel register: value 0==CPU, 1==shared between CPU and CLA
MemCfgRegs.LSxMSEL.bit.MSEL_LS0 = 0;
MemCfgRegs.LSxMSEL.bit.MSEL_LS1 = 0;
MemCfgRegs.LSxMSEL.bit.MSEL_LS2 = 1;
MemCfgRegs.LSxMSEL.bit.MSEL_LS3 = 1;
MemCfgRegs.LSxMSEL.bit.MSEL_LS4 = 1;
MemCfgRegs.LSxMSEL.bit.MSEL_LS5 = 1;
//local shared memory data/prog control register: value 0==CLA data memory, 1==CLA program memory
MemCfgRegs.LSxCLAPGM.bit.CLAPGM_LS0 = 0;
MemCfgRegs.LSxCLAPGM.bit.CLAPGM_LS1 = 0;
MemCfgRegs.LSxCLAPGM.bit.CLAPGM_LS2 = 1;
MemCfgRegs.LSxCLAPGM.bit.CLAPGM_LS3 = 1;
MemCfgRegs.LSxCLAPGM.bit.CLAPGM_LS4 = 0;
MemCfgRegs.LSxCLAPGM.bit.CLAPGM_LS5 = 0;
Variables defined before main()
extern uint16_t CLA1mathTablesLoadStart; extern uint16_t CLA1mathTablesRunStart; extern uint16_t CLA1mathTablesLoadSize;
Memory allocation

