Other Parts Discussed in Thread: C2000WARE
Hi,
I have an input voltage measurement that I am planning to use in two different control algorithms, on two different CLA cores.
Would the below code be suitable to initalise the variables, or is there something more appropriate? I am essentially defining a single variable, then defining sections in memory for it to be available to both CLA cores. I am unsure if this is excessive, because I do not fully understand the purpose of the DATA_SECTION statement.
#pragma DATA_SECTION(inputVolts,"Cla1ToCpuMsgRAM")
uint32_t inputVolts=0;
#pragma DATA_SECTION(inputVolts,"Cpu1ToCpu2MsgRAM")
And then in the second CPU:
#pragma DATA_SECTION(inputVolts,"Cpu2ToCla2MsgRAM")
Is there a way that CLA2 and CPU2 can access the shared variable without all these extra data_section statements? it seems a waste to define spaces in memory that contains a variable that already exists in another section, but this seems to be the way that TI defines memory that is accessible across the cores?
Thanks,
Joel