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.

TMS320F28379D: How to make dual CPU run from Flash

Part Number: TMS320F28379D
Other Parts Discussed in Thread: LAUNCHXL-F28379D, C2000WARE

Dear TI experts,

I want to dual CPUs run from Flash after Power reset but I couldn't succeed it yet.

I'm working with Launchxl-F28379D.

I imported sample projects from <C2000Ware_Folder>/driverlib/f2837xd/example/dual/led

One is led_ex1_blinky_cpu1 and the other is led_ex1_blinky_cpu2.

As those configuration is for RAM, I changed Build configuration 'CPU1_FLASH_STANDALONE' for CPU1 and 'CPU2_FLASH' for CPU2.

Build was succeeded and I loaded .out into CPU1 core and CPU2 core respectively using CCS debug.

When I run, it didn't work properly.

I traced and found CPU1 is blocking in the below section in Device_bootCPU2

    //
    // Wait until CPU02 control system boot ROM is ready to receive
    // CPU01 to CPU02 INT1 interrupts.
    //
    do
    {
        bootStatus = HWREG(IPC_BASE + IPC_O_BOOTSTS) &
                     C2_BOOTROM_BOOTSTS_SYSTEM_READY;
    } while ((bootStatus != C2_BOOTROM_BOOTSTS_SYSTEM_READY));

So I commented below code,

#ifdef _STANDALONE
#ifdef _FLASH
    //
    // Send boot command to allow the CPU2 application to begin execution
    //
    Device_bootCPU2(C1C2_BROM_BOOTMODE_BOOT_FROM_FLASH);
#else
    //
    // Send boot command to allow the CPU2 application to begin execution
    //
    Device_bootCPU2(C1C2_BROM_BOOTMODE_BOOT_FROM_RAM);

#endif // _FLASH
#endif // _STANDALONE

Then, it works well.

But another problem happened.

After I pressed 'S3' Reset button, CPU1 is working well but CPU2 didn't run its code.

I think it's because CPU1 didn't make CPU2 boot using Device_bootCPU2.

I didn't make any change except changing Build Configuration ..._RAM to ..._FLASH or ..._FLASH_STANDALONE.

Is there anything left that I should do?

Looking forward to get any guide from TI Experts.

Thank you in advance.

James Kim

  • Hi,

    Device_bootCPU2 function cannot be run with debugger connected. That is why you see Device_bootCPU2 is called only in STANDALONE config.

    So, while debugger connected, please use the CPU_FLASH config, The debugger will take care of booting CPU2. During standalone run, switch to CPU1_FLASH_STANDALONE config. You can still load the .out through CCS. After loading you can do a power on reset for standalone execution

    Regards,

    Veena

  • Hi Veena,

    Thank you for your quick answer.

    I succeeded in running dual CPUs at the same time.

    Thank you.

    Best regards,

    James.