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.

processor id in ipc communication program

hello,

i am trying to work with ipc to establish a communication between two cores. the program compiled correctly.

when i run the program no events are sent ( i am using the function Notify_sendEvent()  ). While trying to solve the problem, i wanted to make sure the IDs are correct.

So i used the following code:

    int i;
    i = MultiProc_self();
    System_printf("slave started, id %d\n",i);

 

the issue is i get always 0  whatever core i am loading the program on. I set the MultiProc module option numProcessors to 2 .

someone can help me on this?

thanx.

  • Mohammed,

    Which device are you using and what is your IPC version?  In most recent versions of IPC (1.2x), you aren't supposed configure the MultiProc module using MultiProc.numProcessors.  You need to call MultiProc.setConfig() to configure MultiProc.

    Regards,

    Shreyas

  • thank you Shreyas,

    sorry i forgot to mention that i am using EVM6474 and IPC 1.21 with CCS 4.2.

    I did what you told me (  used MultiProc.setConfig(null, ["CORE0", "CORE1", "CORE2"]);   ), and i get now correct IDs for all cores. But there is now another problem, i get the following error:

    ti.sdo.ipc.Notify: line 326: assertion failure: A_notRegistered: Notify instance not yet registered for the processor/line xdc.runtime.Error.raise: terminating execution

    this error occurs because of the line : Notify_registerEvent( MultiProc_getId("CORE1"), lineID, eventID, (Notify_FnNotifyCbck)cbkMaster, NULL);

    can you help plz ?

    regards.

     


  • That assertion is typically raised when there is no IPC connection to the remote core.

    1) Have you called Ipc_start yet?

    2) Have you configured Ipc with ProcSync_ALL or ProcSync_PAIR? If ProcSync_PAIR, is used, have you called Ipc_attach to CORE1 yet? 

    Please refer to the IPC User's Guide and multicore examples to learn more about this configuration/API.

    Regards,

    Shreyas

  • * YES i called Ipc_start()

    * I am using ProcSync_ALL so there is no need to call Ipc_attach()

     

    The error does not show anymore when i used a shared memory region, is using a shared memory region obligatory even if there is no data transmitted between cores?

    regards

  • Do you know whether Ipc_start succeeded before you added the shared region?  I.e. do you check the status code returned from this API?  It probably returned an error code if you didn't set up any SharedRegion region.

    Yes, all inter-processor communication with IPC requires at least 1 shared region (#0) because this is where shared state is stored.

    Regards,

    Shreyas