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.

CCS/TMS320F28377D: How to get the variable memory address information assigned by a different CPU project?

Part Number: TMS320F28377D

Tool/software: Code Composer Studio

I am using F28377D for motion control.

CPU1 does the control loops, and CPU2 does house keeping and communication. There are parameters and variables shared in GSRAM between the CPUs.

My question is: When CPU1 project assigns the memory location, how to  get/use CPU1 assigned memory addresses from CPU2 project? 

Thanks!

Lily.

  • Hi,

    There are two ways to do this.

    1) Use #pragma to allocate the variables or parameters at same address on both the CPU.
    2) Share the address of variables/parameters via IPC method (during run time) so that other CPU can access them.

    Regards,

    Vivek Singh
  • Thanks Vivek,

    I was using method 1, and it worked. But I was hoping not have to allocate the memory on both CPUs, somehow I could have access to the allocated memory address from the other CPU.

    I am not familiar with Method 2. Would you please provide some more details or references?

    Thanks again for your prompt response!

    Lily.
  • Hi Lily,

    In IInd method you basically send the address of variables to other CPU via IPC (Inter Processor Communication) method. There are IPC register on CPU1 and CPU2 via which messages/info can be exchanged between two CPU. Please refer device TRM for more detail about IPC.

    Regards,

    Vivek Singh
  • Hi Vivek,

    Thanks for the reply!

    Which method will you recommend? Since I've known how to use the 1st method, is there any advantage I should use the 2nd method?

    Best Regards,

    Lily.
  • Hi Lily,

    I would suggest to continue with the method you are currently using.

    Vivek Singh
  • Hi Vivek,

    That's great! Thank you very much!

    Best Regards,

    Lily.