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.

6657 核0 发IPC中断不能启动核1



核0启动后把核1的程序搬移到内存位置,但是核0 发IPC中断,核1没有反映,pc指针还是在BOOTROM里,且一直不变。经过测试,核0 的IPC中断是发给了核1的,请问是什么原因,怎样才能启动核1???

  • https://e2echina.ti.com/cfs-file/__key/communityserver-discussions-components-files/53/3223.IPC_5F00_example_5F00_on_5F00_6678_5F00_CCSv51.7z怎么测试核0的中断已经发给了核1的?

    另外建议可以参考一下6678的例程,只是IPCRegister address以及IPC中断事件号不一致,配置流程可以先参考一下。

  • 看到有客户分享了6657的例程,也可以看一下。

    3666.IPC_example_on_6657.rar

  • jata 调试,第一个核 下载我们的IBL程序,第二个核下载IPC_example_on_6657.rar程序,看见第二核进入了中断的所以确认了IPC中断没问题,但是就是断电后,核1下载IBL程序,然后给核2 发IPC 中断,核2 没反映
  • void RunAppCoreX(Uint8 ui8AppIndex)
    {
    Uint32 *pui32App_Buffer_Addr;
    Uint32 *pui32CoreX_Boot_Magic_Addr;
    Uint32 *pui32CoreX_App_Addr;

    Uint32 ui32ByteLen;

    PRINTF("\r\n");
    PRINTF("运行Core%d程序\r\n",ui8AppIndex);
    PRINTF("\r\n");

    memcpy((void *)(DDR3_BASE_ADDR),
    (void *)(FLASH_APP_BASE_ADDR + ui8AppIndex * APP_SIZE),
    APP_SIZE);// flash 里的 boottable 搬移到 DDR 里

    // Swap_Endian_32((Uint32 *)(DDR3_BASE_ADDR),APP_SIZE);

    // 在DDR里解析boottable
    pui32App_Buffer_Addr = (Uint32 *)(DDR3_BASE_ADDR);// 第一个数据为头地址,程序搬移完成后,跳到头地址运行
    pui32CoreX_Boot_Magic_Addr = (Uint32*)(CORE0_BOOT_MAGIC_ADDR + ui8AppIndex * CORE_OFFSET);// 计算CoreX_Boot_Magic_Addr

    *pui32CoreX_Boot_Magic_Addr = *pui32App_Buffer_Addr;// 把头地址放进CoreX_Boot_Magic_Addr
    //*pui32CoreX_Boot_Magic_Addr=0x11800000;
    pui32App_Buffer_Addr++;
    while (1)
    {
    ui32ByteLen = *pui32App_Buffer_Addr;// 这个数据为 要搬移的 程序段长度,

    if(ui32ByteLen > APP_SIZE)
    {
    PRINTF("\r\n程序段长度超限\r\n");
    return;
    }

    if(ui32ByteLen == 0)// 如果程序段长度为0,代表程序段搬移完成
    break;

    if(ui32ByteLen & 0x03)
    ui32ByteLen += (0x04 - ui32ByteLen & 0x03);// 补齐数据长度为 4个字节倍数

    pui32App_Buffer_Addr++;

    pui32CoreX_App_Addr = (Uint32 *)(*pui32App_Buffer_Addr);// 这个数据为 要搬移的 程序段目的首地址

    pui32App_Buffer_Addr++;

    memcpy(pui32CoreX_App_Addr,pui32App_Buffer_Addr,ui32ByteLen);// 搬移程序段

    pui32App_Buffer_Addr += ui32ByteLen / 4;// 指针指向下一个程序段,继续解析
    }

    if(ui8AppIndex == 0)
    {
    void(*CoreX_CodeStart)(void) = (void(*)(void))(*pui32CoreX_Boot_Magic_Addr);

    (*CoreX_CodeStart)();
    }
    else
    {
    CSL_BootCfgUnlockKicker();
    CSL_IPC_genGEMInterrupt(ui8AppIndex,0); //IPC generation from Core0 to CoreX
    *((unsigned int *)0x02620244)=16;
    *((unsigned int *)0x02620244)|=1;
    CSL_BootCfgUnlockKicker();
    //*((unsigned int *)0x02620240)=*((unsigned int *)0x02620240)|1;
    PRINTF("\r\n ipc core1 \r\n");
    while(1);
    }