Other Parts Discussed in Thread: CONTROLSUITE, C2000WARE
Hello everyone.
I'm developing SW for F28379D. I have two projects - one project for CPU1 and the other is for CPU2. Both projects are to reside in Flash memory. CPU2 must be started by command from CPU1, just like it is in Concerto MCU. So program flow for CPU2 is supposed to be like this: BOOTROM -> IDLE (Waiting for START command from CPU1) -> START (void main (void)). CPU1 in its turn has such flow: BOOTROM -> void main (void) -> Preparations -> Command to CPU2 to start.
As i have understood, CPU2 must be started in WAIT_BOOT mode to hit such program flow. During emulation (I use F28379D launchpad for debug) i set the register at memory address of CPU2 0x0D00 to "0x025A". This means that CPU2 must enter IDLE mode after bootrom is done. That's ok.
But when CPU1 performs "IPCBootCPU2(C1C2_BROM_BOOTMODE_BOOT_FROM_FLASH);" function, it returns STATUS_FAIL. The reason why this funciton breaks down is in IPCBOOTSTS register. After CPU2 completes its bootrom it sets IPCBOOTSTS to 0x0D03. IPCBootCPU2 checks it like this:
//
// If CPU2 has already booted, return a fail to let the application
// know that something is out of the ordinary.
//
bootStatus = IPCGetBootStatus() & 0x0000000F;
if(bootStatus == C2_BOOTROM_BOOTSTS_C2TOC1_BOOT_CMD_ACK)
{
returnStatus = STATUS_FAIL;
return returnStatus;
}
The macro C2_BOOTROM_BOOTSTS_C2TOC1_BOOT_CMD_ACK is set to 3 in "F2837xD_Ipc_drivers.h", so i get STATUS_FAIL.
Could you please help me? What am i doing wrong?