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.

IPCGR/IPCAR conflict with Notify_sentvent???

Hi,

recently,I'm doing the bootloader job of C6678. Some problem raised.

I use the function

CSL_IDEF_INLINE void CSL_IPC_genGEMInterrupt (
Uint32 index,
Uint32 srcId
)

to generate  IPC interrupts in core0 to wake up the other cores.

but I find none core can receive any Notify from another core which makes my multi-core program can't work.

Is there any thing I ignored result in such situation?

thanks!

  • Hi Philly,
    I hope, you have installed latest MCSDK/ Processor SDK. Please find SRIO hello world example under bootloader directory on how to wake up secondary cores from core0.

    Thank you.
  • Hi Raja,

    According what you said, I checked SRIO hello world example.I didn't see any difference between my project with that one about boot procedure.

    and here is my application framework, may be you could give me some advice,

    //core0 framework:
    
    void cbfxn(){
    
    Semaphore_post(sem0);}
    
    void tskfxn(){
    
    while(1){
    
    Semaphore_pend(sem0);
    
    /*process code*/
    
    status=Notify_sendEvent(1,0,10,payload,TRUE);
    
    if (status < 0) {
    printf("error code %d\n",status);
    System_abort("sendEvent failed\n");
    
    }
    
    }}
    
    void main(){
    
    CSL_BootCfgUnlockKicker();  //for boot
    
    *(volatile unsigned int *)0x02620244=1;  //for boot
    
    status = Ipc_start();   //set to Ipc.ProcSync_Pair
    if (status < 0) {
    System_abort("Ipc_start failed\n");
    }
    
    while(Ipc_attach(1)!=0);
    
    status = Notify_registerEvent(1, 0, 10, (Notify_FnNotifyCbck)cbfxn,NULL);
    if (status < 0) {
    System_abort("Notify_registerEvent failed\n");
    }
    
    BIOS_start();
    
    }
    
    
    
    //core1 framework
    
    void cbfxn(){
    
    Semaphore_post(sem1);}
    
    void tskfxn(){
    
    while(1){
    
    status=Notify_sendEvent(0,0,10,payload,TRUE);
    
    if (status < 0) {
    printf("error code %d\n",status);
    System_abort("sendEvent failed\n");
    
    }
    
    /*process code*/
    
    Semaphore_pend(sem1);
    
    }}
    
    void main(){
    
    write_boot_magic_address();  //for boot: write core1's _cinit address to its magic address
    
    status = Ipc_start();   //set to Ipc.ProcSync_Pair
    if (status < 0) {
    System_abort("Ipc_start failed\n");
    }
    
    while(Ipc_attach(0)!=0);
    
    status = Notify_registerEvent(0, 0, 10, (Notify_FnNotifyCbck)cbfxn,NULL);
    if (status < 0) {
    System_abort("Notify_registerEvent failed\n");
    }
    
    BIOS_start();
    
    }

    The problem is when I remove those code lines for boot, the application works fine. But when I add them , core0 is stuck at Semaphore_pend(sem0) where seems it never receive any Notification from core1. Hence, core1 would trap in Semaphore_pend(sem1).  You maybe need to know that I test that using online emulation since boot can't work. and there isn't any error or exception happened.

    So, I wander if the IPC interrupt used by the boot procedure interferes the Notify_sendEvent() ?

  • You cannot use Notify event to boot slave cores. The Notify APIs cannot be called until an Ipc_start()/Ipc_attach() has been called which requires the slave cores to be already running (booted up).

    Why don't you use the IPC registers straight to do the syncing. You can use the CSL functions to do that.

    Thank you.

  • Hi Raja,

    But I don't think I used the Notify event to boot slave cores, and I do call Notify APIs after Ipc_start()/ipc_attach() is called. You can see that Notify_registerevent() is just called behind Ipc_tstart() and while(ipc_attach(x)!=0) . while Notify_sendevent() is called in a task which run after the BIOS is charging.

    So, I didn't quite understand your words.  those code line bellow is surely using the IPC registers and CSL functions.

    could you explain me more to figure that out?

    Thank you!

    Best regards! 

  • Hi Raja,
    Yesterday, I checked what you try to tell me. Then I still have questions after went and read that forum which you mentioned. It can't fix my problem. So, could you carry on to help me out!
    Thanks.