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: Time Synchronization between CPU1/2 and CM

Part Number: TMS320F28388D

Hi all,

According to the clock tree showed in below, CPU1/2/CM core could possess the same clock source , e.g. SYSCLK。

However, time synchronization is nessary between CPU1/2 and CM, even though they have common time reference.

For example, CPU1 uses Timer0_CPU1 as its time base of scheduling task of 10ms, and CM also uses Timer0_CM as its time base of scheduling task of 10ms.

Because the start time of Timer0_CPU1 and Timer0_CM maybe not the same(it's difficult to achieve this.), so the time of periodical interrupt of Timer0_CPU1 and Timer0_CM could be not the same.

On the other condition, the clock interval may be inaccuracy and the clock interval maybe different between CPU1/2 and CM,so the time reference could change a bit with the passage of time.

Based on the reasons mentioned above, maybe the time synchronization is needed for time-critical occasions.

So how to do with time synchronization between CPU1/2 and CM?Do you have any recommended scenarios?

Thanks alot!

QL

  • QL,

    You can possibly use IPC_Sync() function in each of the cores which you are trying to synchronize. This function is available in ipc.h driver lib function. 

    //*****************************************************************************
    //
    //! Synchronises the two cores
    //!
    //! \param ipcType is the enum corresponding to the IPC instance used
    //! \param flag is the IPC flag mask with which synchronisation is done
    //!
    //! Allows the local and remote cores to synchronise. Neither core will return
    //! from this function call before the other core enters it.
    //!
    //! \note Must be called with same flag mask on both the cores
    //!
    //! \return None
    //
    //*****************************************************************************
    static inline void
    IPC_sync(IPC_Type_t ipcType, uint32_t flag)
    {
        IPC_setFlagLtoR(ipcType, flag);
        IPC_waitForFlag(ipcType, flag);
        IPC_ackFlagRtoL(ipcType, flag);
        IPC_waitForAck(ipcType, flag);
    }

    Regards,

    Manoj