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.

TMS320F28388D: How to achieve dual core offline operation with F28388 chip

Part Number: TMS320F28388D

Hello:

      I use the F28388D chip (using a self-developed circuit board) to achieve different functions (operating different LED lights) on CPU1 and CPU2, respectively. When using the emulator, CPU1 and CPU2 functions operate normally. But burning the program to the chip, removing the emulator, and re powering on, CPU1 and CPU2 cannot operate normally. 

The CPU1 and CPU2 programs are as follows. Could you please help to see what the problem is?

CPU1:

void main(void)
{
   //
// Step 1. Initialize System Control:
// PLL, WatchDog, enable Peripheral Clocks
// This example function is found in the f2838x_sysctrl.c file.
//
    InitSysCtrl();
    EALLOW;
    ClkCfgRegs.PERCLKDIVSEL.bit.EPWMCLKDIV = 0; // PWM时钟为200M
    EDIS;

    while( !(  MemCfgRegs.GSxMSEL.bit.MSEL_GS8 &
               MemCfgRegs.GSxMSEL.bit.MSEL_GS9 & \
               MemCfgRegs.GSxMSEL.bit.MSEL_GS10 & \
               MemCfgRegs.GSxMSEL.bit.MSEL_GS11 & \
               MemCfgRegs.GSxMSEL.bit.MSEL_GS12 & \
               MemCfgRegs.GSxMSEL.bit.MSEL_GS13 & \
               MemCfgRegs.GSxMSEL.bit.MSEL_GS14 & \
               MemCfgRegs.GSxMSEL.bit.MSEL_GS15 )  )
   {
          EALLOW;
          MemCfgRegs.GSxMSEL.bit.MSEL_GS8 = 1;
          MemCfgRegs.GSxMSEL.bit.MSEL_GS9 = 1;
          MemCfgRegs.GSxMSEL.bit.MSEL_GS10 = 1;
          MemCfgRegs.GSxMSEL.bit.MSEL_GS11 = 1;
          MemCfgRegs.GSxMSEL.bit.MSEL_GS12 = 1;
          MemCfgRegs.GSxMSEL.bit.MSEL_GS13 = 1;
          MemCfgRegs.GSxMSEL.bit.MSEL_GS14 = 1;
          MemCfgRegs.GSxMSEL.bit.MSEL_GS15 = 1;
          EDIS;
   }

    InitGpio();
    DINT;
    InitPieCtrl();

//
// Disable CPU interrupts and clear all CPU interrupt flags:
//
    IER = 0x0000;
    IFR = 0x0000;

    InitPieVectTable();

       CM_Device_Init();     //CM外设初始化
       CPU2_Device_Init();    //CPU2外设初始化

       GPIO_SetupPinMux(32, 0, 0);
       GPIO_SetupPinOptions(32, 1, 0);
       GPIO_WritePin(32, 0);

       GPIO_SetupPinMux(17, 0, 0);
       GPIO_SetupPinOptions(17, 1, 0);
       GPIO_WritePin(17, 0);

       GpioDataRegs.GPBSET.bit.GPIO32=1;     //

#ifdef _FLASH
    uint32_t cnt=0;
    while(cnt<5)
    {
        DELAY_US(1000000);
        GPIO_WritePin(17, 1);
        DELAY_US(1000000);
        GPIO_WritePin(17, 0);
        cnt++;
    }
    //  Device_bootCM(BOOTMODE_BOOT_TO_FLASH_SECTOR0);
    Device_bootCPU2(BOOTMODE_BOOT_TO_FLASH_SECTOR0);
#else
   //Device_bootCM(BOOTMODE_BOOT_TO_S0RAM);
#endif

   EINT;
   ERTM;

   while(1)
   {
       DELAY_US(3000000);
       GPIO_WritePin(17, 1);
       DELAY_US(3000000);
       GPIO_WritePin(17, 0);
       cnt++;
   }

}

CPU2:

void main(void)
{
    g_softRunerrNo = 0;
    g_ipcCpu21Isr0Cnt = 0;
    g_ipcCpu2CmIsr0Cnt = 0;
    //
    // Initialize device clock and peripherals
    //
    Device_init();



    for(;;)
        {
            //
            // Turn on LED
            //
            GPIO_writePin(16U, 0);

            //
            // Delay for a bit.
            //
            DEVICE_DELAY_US(500000);

            //
            // Turn off LED
            //
            GPIO_writePin(16U, 1);

            //
            // Delay for a bit.
            //
            DEVICE_DELAY_US(500000);
        }
}

I found that

1、when running without the emulator, CPU1 runs to Device_ At the position of bootCPU2 (BOOTMODE_BOOT.TO-FLASH_SECTOR0), CPU1 is restarted.

2、If I delete Device_ The bootCPU2 (BOOTMODE_BOOT_TO_FLASH_SECTOR0) function,Let CPU1 works along,then CPU1 can work offline successfully。