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: Best practice for switching peripheral ownership on-the-fly among multiple cores

Part Number: TMS320F28388D


Hi expert,

My customer is developing secondary bootloader for three cores in F28388D device. Three cores here need to share DCAN peripheral for transfering data.

1. Is CPU1 the only core who can assignor change a peripheral ownership? (For example: Calling GPIO_setMasterCore)

2. CPU1 finied using DCAN and would like to pass it to CPU2, could CPU1 just simply call GPIO_setMasterCore to do the assignment to let CPU2 send data?

3. Do we need to reset peripheral or re-do the initialization here on the new core when peripheral is re-assigned?

4. Any close related example demonstrating re-assign some peripheral on-the-fly?

Thanks

Sheldon 

  • Hi Sheldon,

    I am looking into this but I have a question regarding the motivation in sharing DCAN among the three cores of F28388D.  Does data need to be shared by all 3 cores?  The IPC (Inter Processor Communication) block may be an option to consider too as it has the ability to share message ram and flags to all the three cores and implementation may be more straight-forward than transferring ownership of the module from CPU1 to CPU2 or CM everytime data needs to be sent by the respective core.

    Only CPU1 can assign peripheral ownership so customer's secondary bootloader has to manage this transfer too.  I have looked at the available examples but have not yet seen one where ownership and control of peripheral gets transferred between CPU2 and CM.

    Regards,

    Joseph

  • Hi Joseph,

    Data is no need to share among these three cores. They are actually downloading firmware and receive some CAN instructions. Since firmware used almost all Flash memeory on this chip, each core recevice its own firmware could be more flexible here (my customer think so). Hope you can help us investigate in these questions here then we can have a try.

    If simply calling GPIO_setMasterCore without any initialization or reset can smoothly switch the peripheral, everything will be much easier.

    Thanks

    Sheldon

  • Hi Sheldon,

    Just to add on below items -

    3. Do we need to reset peripheral or re-do the initialization here on the new core when peripheral is re-assigned?

    Yes, recommendation is to reset the peripheral and re-do the initialization from CPU2 after ownership change. Other option is to disable the clock to DCAN from CPU1 (and CPU2 if it was enabled) and then switch the ownership and enable the clock again from CPU2.

    Regards,

    Vivek Singh

  • Hi Sheldon,

    As Vivek has confirmed, peripheral has to be reset and re initialized and clock disabled/enabled.  CPU1 has to manage this peripheral configuration for DCAN on CPU2 and CM so the challenge would be how to let CPU1 know when to allocate the DCAN to CPU2 or CM when each core is ready to receive its firmware.

    Regards,

    Joseph

  • Hi Joseph,

    We will use IPC just to signaling this. Thanks for your answer.

    Sheldon