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.

TMS320F28377D: Save way to boot (restart) CPU2

Part Number: TMS320F28377D
Other Parts Discussed in Thread: C2000WARE

I have problems restarting CPU2 with the following code (running on CPU1 of course):

EALLOW;
// Reset pulse to CPU2
DevCfgRegs.CPU2RESCTL.all = 0xA5A50001;
DELAY_US(100);
DevCfgRegs.CPU2RESCTL.all = 0xA5A50000;
EDIS;
// And restart CPU2
IPCBootCPU2(C1C2_BROM_BOOTMODE_BOOT_FROM_FLASH);

This code works fine after power up but can fail for restart later on.

Debugging the boot code of CPU2 I noted that the variable c2brom_status in the file c2brom_boot.c is not being initialized after reset or at least at the start of the function c2brom_system_init().

In the function c2brom_system_init() the progress of the boot is shown setting one bit after the other. CPU1 waits for a special pattern (0x2) on the lower 4 bits of the boot status to see that CPU2 has booted succesfully.

As c2brom_status is not initialized and often starts with the LSB set, the pattern 0x2 can't be reached but instead 0x3. So the boot fails.

The resulting question is:
How can I restart CPU2 in a save way from flash?

Best regards
Stefan

  • I used the latest control suite driver (2.10) for IPCBootCPU2. Now I have seen that in the c2000 driver (C2000Ware_1_00_01_00) there was a fix, to check only for the bit C2_BOOTROM_BOOTSTS_SYSTEM_READY. That helps in case that the LSB was set but does not help if the C2_BOOTROM_BOOTSTS_SYSTEM_READY was set after reset.
  • Hi Stefan,
    Does that solve your problem or are you waiting for clarification on some aspects ?

    Regards
    Baskaran
  • I think the lack of initialization of c2brom_status is a bug in the CPU2 boot code.
    The workaround in the new driver helps in a way that the process does not stuck, but it can result in not waiting until CPU2 is ready. So I thought there should be a better workaround for a really save way to restart CPU2.
  • Stefan,

    the CPU2 application as soon as it boots up, can reset the c2brom_status word. We left that to the user applications, to read the status and clear the status. If boot ROM clears the status then it might leave applications in a state where it doesn't know what happened.

    the boot ROM MAP file provided with the ROM sources should have the address of c2brom_status word.

    Hope this helps.

    Best Regards
    Santosh Athuru