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.

"Notify_sendEvent " doesn't able to notify the remote core when the running the Application with Hello World NDK Project.

Other Parts Discussed in Thread: SYSBIOS

Hi All,

I am using CCS v5.0.1,

I am using multicore DSP EVM 6670.

BIOS version is 6.32.4.49.

XDC tools is 3.22.01.21.

On DSP EVM 6670(which consists of 4 cores), I am currently using or running  the 3 core Application . Let us suppose that 1st core be core1, 2nd  core be Core2 and 3rd Core be Core3.

In the core3 , I am registering the Notify event by Notify_registerEvent ( ) and in one of the Function call , I am using Notify_sendEvent() to notify the core2 , here is code snippet for that  in Core3 :-

main()

{

 status = Notify_registerEvent(Core2, INTERRUPT_LINE, EVENTID, (Notify_FnNotifyCbck)Core3_notifyEventISR, NULL);

 BIOS_Start();

}

In this function call i am using the Notify_sendEvent() on Core3 :

void  Core3_CTRL_Init(int * x)
{

 

status = Notify_sendEvent(Core2, INTERRUPT_LINE, EVENTID, (uint32_t)payload,
TRUE);

}

void  Core3_notifyEventISR(uint16_t procId,
uint16_t lineId,
uint32_t eventId,
uint32_t arg,
uint32_t payload)
{
 memReg  = payload;
Semaphore_post(SysInit);
}

On Similar terms, In the core2 , I am registering the Notify event by Notify_registerEvent ( ) and in one of the Function call , I am using Notify_sendEvent() , here is code snippet for that for Core2 :-

main()

{

 status = Notify_registerEvent(Core3, INTERRUPT_LINE, EVENTID, (Notify_FnNotifyCbck)Core2_notifyEventISR, NULL);

 BIOS_Start();

}

void  Core2_CTRL_Init(int * x)
{

 

status = Notify_sendEvent(Core3, INTERRUPT_LINE, EVENTID, (uint32_t)payload,
TRUE);

}

void  Core2_notifyEventISR(uint16_t procId,
uint16_t lineId,
uint32_t eventId,
uint32_t arg,
uint32_t payload)
{
 memReq = payload;
Semaphore_post(SysInit);
}

the  values for   EventID =10 and Interrupt Line = 0(for Core 2 as well as for Core3)

On Core1 there is some application running.

So, on EVM 6670 when i ran this three core's i.e Core1,Core2,Core3 . the application works fine . There is no problem in that .

When I try to integrate  this 3 core application with Hello World NDK Project which is running on Core0 with  :

BIOS version is 6.32.5.54.

XDC tools is 3.22.01.21.

Although the Hello World NDK project works fine.

So, Now comes the problem for me while running 3 core application with Hello World NDK Project on Core0, 

 The problem is in Notify_sendEvent() on Core3, the status returned by the Notify_sendevent() is 0 stating "Success" but it doesn't able to notify the remote core i.e core2 to execute the  void  Core2_notifyEventISR(uint16_t procId, uint16_t lineId,uint32_t eventId,uint32_t arg,uint32_t payload).leading to that Semaphore_post(SysInit) doesn't wrk and the Task  on Core2 itself which is pending to that Semaphore doesn't execute.) .

On the other side, when I didn't ran the Hello World NDK project on Core0, the 3 cores(Core1,Core2,Core3) works fine, the Notify_sendevent () from Core 3 able to notify the remote core2 and then the following process happens.

One more point while viewing the ROV table in the field NotifyDrivershm , i could see that for both cores i.e core2 and Core3 the Event Id 10 has been registered for corresponding ProcId :2 and procId:3 respectively for Core3 and Core2 on both times i.e when running 3 core application and running 3 core application with Hello World NDK Project on Core0.

One more Important point, I hav to integrate the Hello World NDK project with our 3 core application(that is the requirement). Upto now the conclusion is that problem is somewhere in the Hello World NDK project.

Can Anyone help me to resolve this problem?

Thanks in Advance.

Regards,

Mohit

 

  • Can anyone from TI Community can help me to resolve this issue ?

    Regards,

    Mohit

  • Do you know about the ROV tool in CCS?  Can  you use it to view what interrupts are plugged in your system?

    Also,did you make sure that your ISR and Task stacks are large enough.

    My best guess is that interrupts are being fired but your Notify  callback function is not getting called.

    Can you confirm that when one core does a Notify_sendEvent() that the core which is to receive the event, gets an interrupt.

    Judah

  • Hi Judah,

    Thanks for the prompt response..

    In the first point, I hav verified the peak Task sizes for the task on  all the cores particularly Core2 and Core3 , and the peak Task sizes for the tasks are almost 1/4 of the alloted task sizes and similar is the case with HWI  sizes.

    And your second point is whether the interrupts are being generated when Notify_sendEvent is being sent by core3 to core2.I hav taken the some  snippets on Core2 and Core3  which is being taken before the Notify_sendEvent is sent by core3 and after the Notify_Send Event is being sent by Core3.

    on Core3 - Before Notify Send Event.  

    On Core2 - Before Notify Send Event from Core3.

    On Core3 - Before After Notify Send Event.

    On Core2- After Notify Send Event from Core3.

     

    My observation is that the no interrupt  are being generated by core3 for core2 for Notify_SendEvent . I would like to hear what is ur say in this?

    Thanks once again for response.

    Regards,

    Mohit

  • Hi Judah,

    Thanks for the prompt response..

    In the first point, I hav verified the peak Task sizes for the task on  all the cores particularly Core2 and Core3 , and the peak Task sizes for the tasks are almost 1/4 of the alloted task sizes and similar is the case with HWI  sizes.

    And your second point is whether the interrupts are being generated when Notify_sendEvent is being sent by core3 to core2.I hav taken the some  snippets on Core2 and Core3  which is being taken before the Notify_sendEvent is sent by core3 and after the Notify_Send Event is being sent by Core3.

    on Core3 - Before Notify Send Event.  

    On Core2 - Before Notify Send Event from Core3.

    On Core3 - Before After Notify Send Event.

    On Core2- After Notify Send Event from Core3.

  • My observation is that the no interrupt are being generated by core3 for core2 for Notify_SendEvent . I would like to hear what is ur say in this?

    Thanks once again for response.

    Regards,

    Mohit

  • Mohit,

    1.  You were looking at ROV, did you do an refresh of the screen in the "after" screen shots?  You need to do a refresh so that ROV goes and rereads the info.

    2.  Can you place a breakpoint in the specified ISR function and see if it ever gets triggered?  Better yet, place a breakpoint at the ISR vector table labeled:
         "ti_sysbios_family_c64p_Hwi_int5" and let me know if you ever reach this breakpoint.  IPC used Hwi interrupt 5 by default so if an interrupt is generated it
         would jump to this label.

    3.  Now, lets assume that you do step 1 and step 2 and nothing happens.  You never reach any of those breakpoints.  If this is the case then it could be that
         the KICK registers have been locked and they need to be unlock.  Something like the following:

                       volatile UInt32 *kick0 = (volatile UInt32 *)0x02620038;
                       volatile UInt32 *kick1 = (volatile UInt32 *)0x0262003C;

                       *kick0 = 0x83e70b13;      /* must be written with this value */
                       *kick1 = 0x95a4f1e0;      /* must be written with this value */

           Now, IPC does unlock these registers but I'm guess that so other code which comes after IPC_start goes and relocks these registers.
           You said that Notify_sendEvent works without the Hello NDK so I'm thinking that perhaps something within the Hello NDK program is doing this.
           Does it happen to call some CSL functions?  Because I recall that certain CSL functions were relocking these registers.  This means you need
           to put the code snipet above in a strategic place after all the init functions if possible.

    Let me know if this solves your problem or not.

    Judah

     

     

  • Hi Judah,

    1. I have  refresh ROV of the screen in the "after" screen shots and still the result is the same.

    2. I hav also tried putting the breakpoint in the specified ISR function, but it never gets triggered. Also Judah, I don't know where the ISR vector table labeled "ti_sysbios_family_c64p_Hwi_int5" is defined in the code.Can u please tell me where it is generally defined in the code.

    3. About the Kick registers, these Kick registers are already defined in Core2 after the IPC_start() and also I have tried to run the set up with these kick registers being defined in Hello World NDK project in the IPC_start() in the Task StackTest() but this thing wont work.

    One more Important Observation :

    When I delay the Task StackTest() in Hello World NDK project , everything works fine.Notify_sendEvent() in core 2 is able to notify the remote core 3 and also the Notify Event ISR() is triggered on Core3, but I still don't know why it is actually hapeening?

    Can u able to observe or analyse with above mentioned analysis what is actually happening in the system?

    Thanks for all feedback.

    Mohit

  • Mohit,

    Sorry, I must have missed your response.

    2.  Okay, if you can't find the int5 label then just put the address of ISTB register into disassembly window.  This points to Hwi vector 0 and every 8 instructions or 32 bytes is the next vector so scroll down and if you don't see the labels then you need to count the number of instructions or bytes until Hwi vector 5.

    3.  Can you just check the value of the KICK registers in a memory window right before doing a Notify_sendEvent to make sure it has the unlock values?  Its sounding like its not the KICK registers though.

    Do you know what's going on in the StackTest()?  Sounds like the Task is simply to test the Stack?  If that's the case, can you check ROV to make sure no stack has overflowed?

    Judah

     

  • hi

    I meet the same problem.

    >When I delay the Task StackTest()

    what this mean ? And how to delay Task StackTest()?


    can you help me !

    thanks

  • Are you using the mcsdk?

    Todd

  • yeah I used the MCSDK.

    I use the helloword (NDK) with the base code. And add the IPC interrupt to it .

    Core0 "Notify_sendEvent doesn't" function could't sent a interrupt to core1.but is can sent to core0 a interrupt.

    my code as follows:

    srcProc = MultiProc_self();

    status = Ipc_start();
    if (status < 0)
    {
    System_printf("Ipc_start failed\n");
    return -1;
    }
    //Ipc_attach();
    /*
    * Register call back with Notify. It will be called when the processor
    * with id = srcProc sends event number EVENTID to this processor.
    */
    status = Notify_registerEvent(srcProc, LINE_ID, EVENTID,
    (Notify_FnNotifyCbck)IPC_ISR, NULL);
    if (status < 0)
    {
    System_abort("Notify_registerEvent failed\n");
    }

    send the interrupt

    status = Notify_sendEvent(0, LINE_ID, EVENTID, i,TRUE);

  • Can you start a new thread because it's not clear what your question is? Are you asking about StackTest or are you asking about Notify?

  • Hi dc.jia ,

     I am sorry for the delay to respond. Actually what i meant with delaying the task StackTest() in Hello World NDK project , is put an expression Task_sleep(700 ms) before that task starts.

    By doing this it has solved my problem.

    you can try this out.

    Let me u need any more help? 

    Regards,

    Mohit