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/TMS320F28377D: CPU2 Boot From Flash

Part Number: TMS320F28377D
Other Parts Discussed in Thread: C2000WARE

Tool/software: Code Composer Studio

Hello, I need help booting CPU2 from the Delfino Control Card

I have my programs both written for CPU1 and CPU2. When I apply power to the card, I would like both programs to start running, but currently only CPU1 does.


I have tried using the IPC_Boot command from CPU1 to try to start CPU2, but this doesn't seem to work, it just hangs waiting for the response which never comes.

What is the proper way to make CPU2 start running code from Flash as soon as it is powered?

  • Hello

    Make sure you're using at least F2837xD device support v3.04.00.00 or newer. There was a bug that may be the cause.
    I recommend, if not already, download the latest C2000Ware. Additionally, this includes examples.

    In order to emulate standalone if debugger is connected, the following steps should be followed:
    (With each CPU flash programmed already)
    1. Reset CPU1 (CPU reset, not restart)
    2. Set EMUBOOT to flash CPU1
    3. Reset(CPU reset, not restart) CPU2
    4. Run CPU2 (Don't set bootmode to flash, for this type of scenario don't use the gel scripts, you want it to go to wait boot)
    5. Run CPU1
    6. CPU1 will then boot to flash, while CPU2 is waiting for BOOT IPC command
    7. CPU1 app will send IPC to boot CPU2 to flash
    8. CPU2 will boot to flash and run

    Best regards
    Chris
  • Is there a way I can set up the processor CPU2 to just run without needing to use IPCBOOT? Like, just configure it to boot from flash on it's own whenever it gets power?

  • Hello

    Yes, you can configure the CPU2 EMUBOOT or program the CPU2 OTP.
    During CPU1 boot, it will release CPU2 to boot and then CPU2 will boot to flash (if configured for it).
    Read more in the technical reference manual: www.ti.com/.../spruhm8f.pdf

    Best regards
    Chris
  • Hi Chris,

    So according to table 3-3, there are two GPIOs that determine the Boot mode, which I believe go to SW1 on the control card. I have those both set to the '1' position, which puts the boot mode to Get/Flash, meaning it should default to loading code from Flash if I don't do something else like load code from a debugger.

    In my projects for CPU1 and CPU2, I am using a Flash linker file from the example projects, which should store the compiled output into Flash memory, making it available at Boot.

    In CPU1, I initialize the system and allocate the GPIO for LED3 to CPU2. Then it turns off LED2. Then it issues an IPCSync to CPU2.

    In CPU2, I have the "memcpy(&RamfuncsRunStart, &RamfuncsLoadStart, (size_t)&RamfuncsLoadSize);" function present as the first thing the program does, as is done in the examples. Then I have an IPCSync to wait until CPU1 allocates the GPIO.

    Then the remainder of the program for both cores is blinking either LED2 or LED3 on the respective core.

    After this, I tried loading both programs using the debugger, and running them. When I manually start both cores with the debugger, the program functions properly and the LEDs blink.

    My understanding is that at this point, since code was loaded into flash for both cores and the GPIOs for boot mode are set to default to flash, if I remove power from the card and reapply power then both programs should start on both cores, and therefore proceed normally.

    What happens instead is that LED2 turns off, indicating that the program in CPU1 has started, but LED3 does not, and neither one blinks. I take this to mean that CPU1 issued its IPCSync, but never received a response because CPU2 did not start it's program.

    I received similar results when I tried including the IPCBoot command in CPU1, and when I tried removing the memcpy command from CPU2. I also tried removing the IPCSync commands and trying to just let both CPUs run freely.
     
    Please let me know if my understanding of how the CPUs boot is incorrect, or if you know why CPU2 does not seem to be starting up.

  • Hello

    The GPIOs only set the boot mode for CPU1. It doesn't sound like CPU2 is booting to application. As I mentioned, you either need to configure the EMUBOOT for CPU2 and emulate the standalone mode with debugger connected or program the OTP for CPU2 to boot to flash upon boot.
    I can't say why IPCBoot isn't working. With no boot programmed, CPU2 will go to wait boot in which it waits for the IPC command to boot to flash or RAM. I suggest trying the examples in C2000Ware.

    Best regards
    Chris
  • So how would I program the OTP?

    And how would I verify if it is properly programmed?

  • I would test with emulation values first since you can only set OTP once. Once confident, follow the below wiki

    processors.wiki.ti.com/.../C2000_Programming_OTP

    Best regards
    Chris