Part Number: TMS320F28379D
Other Parts Discussed in Thread: C2000WARE
Hello,
I'm trying to create an array on core1 that is r/w and r/o for core2. Another array for the other direction. It runs, and I can modify the memory with the debugger, but the two cores won't modify the memory while running.
In both linker scripts I have:
CPU1TOCPU2_GS : > RAMGS8, ALIGN(4)
CPU2TOCPU1_GS : > RAMGS9, ALIGN(4)
In core 1 I have:
uint32_t CPU1_TO_CPU2_Array[128] = { 0U };
#pragma DATA_SECTION(CPU1_TO_CPU2_Array,"CPU1TOCPU2_GS");
uint32_t CPU2_TO_CPU1_Array[128] = { 0U };
#pragma DATA_SECTION(CPU2_TO_CPU1_Array,"CPU2TOCPU1_GS");
then in a timer interrupt:
CPU1_TO_CPU2_Array[0]++;
Something similar in core2 to increment CPU2_TO_CPU1_Array[0]
In core 1, I also try to init and configure the memory:
MemCfg_initSections(MEMCFG_SECT_GS8 | MEMCFG_SECT_GS8);
while(MemCfg_getInitStatus(MEMCFG_SECT_GS8) != 1);
MemCfg_setGSRAMMasterSel(MEMCFG_SECT_GS9, MEMCFG_GSRAMMASTER_CPU2);
/* tried it this was as well,
EALLOW;
MemCfgRegs.GSxMSEL.bit.MSEL_GS8 = 0; // CPU1 can Read/Write; CPU2 only Read
MemCfgRegs.GSxMSEL.bit.MSEL_GS9 = 1; // CPU2 can Read/Write; CPU1 only Read
EDIS;
while(!(MemCfgRegs.GSxMSEL.bit.MSEL_GS9 == 1 && MemCfgRegs.GSxMSEL.bit.MSEL_GS8 == 0));
*/
Same result with many permutations. The debugger works ok, the program doesn't modify memory. Any ideas what I'm missing?
thanks