Other Parts Discussed in Thread: C2000WARE
Hello,
I need to exchange values between CPU2 and CPU1 (CPU2 write data and CPU1 get it)
To begin, I don't want to use all IPC functions, I just want to write directly in the message RAM (CPU2TOCPU1RAM).
- On CPU2 side, I write directly two values on CPU2TOCPU1RAM.
CPU2 .cmd file : (not full file, just concerned lines) :
CPU2TOCPU1RAM : origin = 0x03F800, length = 0x000400
BufferTest : > CPU2TOCPU1RAM PAGE = 1
CPU Main file (not full Main, just concerned lines) :
#pragma DATA_SECTION(CPU2Values, "BufferTest");
Uint16 CPU2Values[2];
CPU2Values[0] = 0xAAAA;
CPU2Values[1] = 0x5555;
It works, I can find good values in the Memory Browser at the right address ( 0xAAAA at @0x03F800, 0x55555 at @0x03F801)
- On CPU1 side, I did the same thing for the .cmd file :
CPU2TOCPU1RAM : origin = 0x03F800, length = 0x000400
BufferTest : > CPU2TOCPU1RAM PAGE = 1
- For the main :
#pragma DATA_SECTION(CPU2Values, "BufferTest");
Uint16 CPU2Values[2];
unsigned int CPU2Value1 = 0;
unsigned int CPU2Value2 = 0;
CPU2Value1 = CPU2Values[0];
CPU2Value2 = CPU2Values[1];
In the Memory Browser, I can find good values at the right address ( 0xAAAA at @0x03F800, 0x55555 at @0x03F801), but all the four variables are equal to zero (CPU2Values[0],CPU2Values[1], CPU2Value1 and CPU2Value 2).
Do you know why ?
Thank you.
Regards,