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.

TMS320F28388D: How to Sync 3 core at the same time?

Part Number: TMS320F28388D


Tool/software:

Hello,

I want to make multi core project that uses cpu1, cpu2 and CM cores. I looked at the sample codes but I couldn't see a project that used all 3 cores at the same time.

How can I sync all of the three cores?

I tried to synchronize 3 cores as follows, but I wasn't sure. because if I add delay between to lines there is a delay between cores. This suggested that there was a time delay, albeit small, between the cpu2 and cm.

    IPC_sync(IPC_CPU1_L_CPU2_R, IPC_SYNC_CPU2);
    IPC_sync(IPC_CPU1_L_CM_R, IPC_FLAG30);

I will appreciated for any resources that I can learn IPC and multi core usage.,,

Thanks.

  • Hi,

    All the sync function does is send flags in each direction between CPUs, then it waits until all flags have been acknowledged.

    You could create your own sync function that works for 3 CPUs.

    Each CPU would send flags to the other 2 CPUS, then wait until these flags have been acknowledged. It won't be able to see communication between the two other CPUs, but it is probably ok to assume this has worked correctly. 

    Please read the IPC section of the TRM, the flag diagram in that chapter is very helpful.

    Best Regards,

    Ben Collier

  • Hello Ben,

    Thank you for your reply.

    I read the IPC section that you mentioned.

    Yes, it says I can set, ack or clear multiple flags. But I understood that it can be happen between two cores. I also checked the "IPC_ackFlagLtoR()" function for ack flags.

    The "IPC_ackFlagLtoR()" function can get multiple flags like "IPC_FLAG31 | IPC_FLAG30" for flag parameter. Because of the ipcType enum parameter I can not write multiple ipcType.

    For exmaple:

    IPC_ackFlagLtoR(IPC_CPU1_L_CPU2_R, IPC_FLAG31|IPC_FLAG30) //possible
    IPC_ackFlagLtoR(IPC_CPU1_L_CPU2_R |IPC_CPU1_L_CM_R, IPC_FLAG31|IPC_FLAG30) //not possible

    I understand that I can only sync two cores eachothers at the sametime.

    I am missing something or trying to find something in wrong section?

    Best regards.

  • Hi,

    There is nothing in hardware to sync all three cores. 

    You will need to write something in software that will 'emulate' this.

    For example, if each core syncs with the other two cores, that should roughly sync the three cores. 

    Thanks,

    Ben Collier

  • Hello Ben,

    Thank you for the helps and informations. I will try to emulate with software.

    Best Regards.