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.

TMS320F28377D: Inter-processing Communication (IPC)

Part Number: TMS320F28377D
Other Parts Discussed in Thread: CONTROLSUITE

Hello 

I am trying to build motor drive with TMS320F28377D using dual core features so that inverter switching frequence is as fast as possible.

I made code for motor controller side in cpu1 and for ADC data acquisition side in cpu2. With this, I need to transfer measured data from ADC in cpu02 to cpu01 and commanded data from control algorithm in cpu01 to cpu02.  The examples provided in TI's (  C:\ti\controlSUITE\device_support\F2837xD\v210\F2837xD_examples_Dual) is hard for me to understand.

By chance, I found an example for dual core application which works good. When I checked the variables between two cores, address of every variable are same in both cores.

I did the same way. But it did not work and I found addresses of every variables in both cores different. I checked the environments of an example project and mine but found no difference 

What am I missing to let two cores to communicate ?

-----  CPU 01 side -------------

#pragma DATA_SECTION(CPU1toCPU2_variable, "PUTBUFFER");
#pragma DATA_SECTION(CPU2toCPU1_variable, "GETBUFFER");

float32 CPU1toCPU2_variable[7];

float32 CPU2toCPU1_variable[8];

------ CPU 02 side ------------------

#pragma DATA_SECTION(CPU1toCPU2_variable, "GETBUFFER");
#pragma DATA_SECTION(CPU2toCPU1_variable, "PUTBUFFER");

float32 CPU1toCPU2_variable[7];

float32 CPU2toCPU1_variable[8];

Also, is there any good example for IPC which let me understand much easier?

Thank you

Chunki

  • Hi Chunki,

    How have you defined the GETBUFFER and PUTBUFFER locations in linker cmd file?

    Regards,

    Vivek Singh

  • Hi Vivek

    I defiend GETBUFFER and PUTBUFFER as linker cmd file did in the example project of TI's

    For better understanding, I put address of variables for IPC which emulation tells me.

    There is 0x80 defference between address of  variables in CPU01 and CPU02. I don't know where this difference comes from.

                              Expression                            type                 Value

       - CPU01 

                               CPU1toCPU2_variable     float[7]     0x0003FC80@Data

                               CPU2toCPU1_variable     float[8]     0x03F800@Program

       - CPU02 

                               CPU1toCPU2_variable     float[7]     0x03FC00@Program

                               CPU2toCPU1_variable     float[8]     0x0003F880@Data

                            

    For your reply, I put  " linker cmd file for CPU01 and CPU02"  as below

    MEMORY
    {
    PAGE 0 :

    ~~~~~~~~

    PAGE 1 :

                      ~~~~~~

                     CPU2TOCPU1RAM : origin = 0x03F800, length = 0x000400
                     CPU1TOCPU2RAM : origin = 0x03FC00, length = 0x000400

    }

    SECTIONS

    {

        ~~~~~

     

    /* The following section definitions are required when using the IPC API Drivers */

        GROUP : > CPU1TOCPU2RAM, PAGE = 1

        {

            PUTBUFFER

            PUTWRITEIDX

            GETREADIDX

        }

       

        GROUP : > CPU2TOCPU1RAM, PAGE = 1

        {

            GETBUFFER :    TYPE = DSECT

            GETWRITEIDX :  TYPE = DSECT

            PUTREADIDX :   TYPE = DSECT

        } 

       }

    Thank you for your reply

    Chunk Kwon