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/TMS320F28388D: CPU2 BOOT from CPU1

Part Number: TMS320F28388D
Other Parts Discussed in Thread: C2000WARE

Tool/software: Code Composer Studio

hello, 

I am using TMS320F28388D controller.

I am able to boot from CPU1 from flash and CPU2 also from FLASH independently, but i want to debug the flow in a sequence using CCS debugger what is the procedure to do it. 

I am calling this function from CPU1 to boot CPU2 from flash 

"Device_bootCPU2(BOOTMODE_BOOT_TO_FLASH_SECTOR0);"

thanks

Nagesh

  • Nagesh,

    If you want to sync both cores, you can use IPC_sync() from driverlib (C2000Ware_3_02_00_00\driverlib\f2838x\driverlib\ipc.h).  This allows the cores to synchronize and neither core will return from this function call before the other core enters it.  

    The IPC command that you shared is to convey CPU2 that it has to boot from flash.  

    Do you have any particular question in syncing between the two cores? Do you want to emulate standalone with debugger?

    Thanks and regards,
    Vamsi

  • Vamsi, 

    Yes thank you .

    My requirement is as follows:

    1. Bootloader is loaded on CPU1 and CPU2 which will allow us to load our software in s2 format.

    2. First i load the software in CPU1 through SCI A, once the loading of software is complete in CPU1 i am calling "Device_bootCPU2(BOOTMODE_BOOT_TO_FLASH_SECTOR0);" to boot CPU2 from flash sector 0 as my bootloader software is loaded in sector 0.

    3. I am not getting the control of CPU2 when this is done, how can i debug this, is there anyway i can introduce a flag in cpu2 to wait until the flag is set by cpu1.

    Question:

    Is it possible for CPU2 to boot from flash before this function call "Device_bootCPU2(BOOTMODE_BOOT_TO_FLASH_SECTOR0);".

    thanks,

    Nagesh 

  • Nagesh,

    Yes, you can use the IPC sync to achieve this.

    Regarding your question:  Is your custom CPU2 bootloader mapped correctly to the flash entry address?  Please check.  If not, CPU2 may start fetching invalid opcodes at the entry address when it is asked to boot from flash.  This can cause ITRAP.

    Thanks and regards,

    Vamsi