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.

IPCMToCBootControlSystem



Hi,

I found lot of topic about this issue but never got the right answer...

My project is based on the Blinky dual core project (for the 28M36P63C2) and i'm running it in Flash.

-----------------------------------------------------------------------------------------------------------

If I try with the following code in the main(), it works (I have both LED blinking to be sure) but it never goes into IPCMToCBootControlSystem if I debug :

#ifdef _FLASH
// Copy time critical code and Flash setup code to RAM
// This includes the following functions: InitFlash();
// The RamfuncsLoadStart, RamfuncsLoadSize, and RamfuncsRunStart
// symbols are created by the linker. Refer to the device .cmd file.
memcpy(&RamfuncsRunStart, &RamfuncsLoadStart, (size_t)&RamfuncsLoadSize);

// Call Flash Initialization to setup flash waitstates
// This function must reside in RAM
FlashInit();
#endif

#ifdef _STANDALONE
#ifdef _FLASH
// Send boot command to allow the C28 application to begin execution
IPCMtoCBootControlSystem(CBROM_MTOC_BOOTMODE_BOOT_FROM_FLASH);
#else
// Send boot command to allow the C28 application to begin execution
IPCMtoCBootControlSystem(CBROM_MTOC_BOOTMODE_BOOT_FROM_RAM);
#endif
#endif

-----------------------------------------------------------------------------------------------------------

So I tried this and now it is stuck into the while of  the IPCMtoCBootControlSystem(CBROM_MTOC_BOOTMODE_BOOT_FROM_FLASH) function :

#ifdef _FLASH
// Copy time critical code and Flash setup code to RAM
// This includes the following functions: InitFlash();
// The RamfuncsLoadStart, RamfuncsLoadSize, and RamfuncsRunStart
// symbols are created by the linker. Refer to the device .cmd file.
memcpy(&RamfuncsRunStart, &RamfuncsLoadStart, (size_t)&RamfuncsLoadSize);

// Call Flash Initialization to setup flash waitstates
// This function must reside in RAM
FlashInit();

// Send boot command to allow the C28 application to begin execution
IPCMtoCBootControlSystem(CBROM_MTOC_BOOTMODE_BOOT_FROM_FLASH);
#endif

What can I do to go out of this "while" and make it working ?

Thank you,

Marc

  • Marc,

    when debugger is connected, I would suggest not to use the IPCMtoCBootControlSystem function. You can comment it out. The reaon is that when you program the application on C28x flash using CCS the program control is already at the C28x applicaiton entry point which is effectively what the IPC function from M3 is trying to do. Once you are done with the debug of applicaiton and ready to run stand-alone you can re-enable the IPC funcion on M3 and reprogram the flash on M3.

    If you still want to keep the MtoCBoot IPC function on M3 with debugger connected to both cores, then you should be aware of the below.

    > what is this IPCMtoCBootControlSystem function doing exactly?

        This function is sending bunch of IPC commands to C-BootROM from M3 application, to get control subsystem ready to start the applicaiton in its flash. For this to work you need to have C-BootROM running properly. you can check if C-BootROM was running properly by doing a debug reset on C28x and a RUN. Now PAUSE and check the dis-assmebly window, if PC is at an IDLE instruction then C-Boot ROM is in good shape. Other thing to check would be C-Boot ROM bootstatus or health status to see what is going on with C-Boot ROM.

    on REV0 of F28M35x there is an errata for C-BootROM  where it might not run properly with debugger connected if flash is already activated before C-bootROM starts. The C-flash (control subsytem flash memory) can be  activated either by GEL scripts which read something from flash space or write something ot flash registers, or etiher by a memory window to any C28x flash address or watch/expressions window reading flash locations.

    if you make sure none of the above happens and then run the C-Boot ROM, then the IPC function on M3 will not hang. The memory window and watch/expressions windows part is easy and can be made sure neither of them are already active by the time you connect to target core on CCS. Regarding GEL script, it can be removed from the target config as well, but you have to remember to put it back when programming flash or debugging some application and when you are not running C-Boot ROM.

    This is fixed in device REVA, so life is a lot easier to debug with REVA. The errata doesn't exist for F28M36x device.

    Please let us know if you have any questions. Hope it helps.

     

    Best Regards

    Santosh

     

  • Join a question. I have same situation.

    I try to disconnect debugger, but the result still the same - C28 did not boot, M3 stuck in IPCMtoCBootControlSystem function on power up.

    What could be the reason of it?