Hi All,
I am trying to send notify event to ARM from DSP. I did the following
ARM
---------
/* Create semaphore for application synchronization */
semSyncHandle =
OsalSemaphore_create(OsalSemaphore_Type_Counting);
if (semSyncHandle == NULL) {
Osal_printf ( "Error: Failed OsalSemaphore_create \n");
status = -1;
}
if(status > 0)
{
status = Notify_registerEvent (rProcId,
0,
APPNOTIFY_EVENT_NO_SYNC,
(Notify_FnNotifyCbck) rtosInfocallback,
(Ptr)semSyncHandle);
}
....
Osal_printf("Waiting for notification from processor %d\n", rProcId);
OsalSemaphore_pend (semSyncHandle,
OSALSEMAPHORE_WAIT_FOREVER);
DSP
-------
Task_sleep(3000000);
System_printf("Sending a Notify to ARM\n");
do {
status = Notify_sendEvent (rProcId,
0,
(APPNOTIFY_EVENT_NO_SYNC),
0x1234,
TRUE);
System_printf("Sendt a Notify to ARM status = %d\n",status);
} while (status < 0);
ARM side everything is successful and ARM is waiting for event on semaphore, but I am getting -14 (Notify_E_EVTNOTREGISTERED) on DSP side.
But when I add
status = Notify_eventAvailable (rProcId, 0, APPNOTIFY_EVENT_NO_SYNC);
before registering event in ARM side everything works as expected, ARM is getting event after 3s delay.
Can anybody explain this behaviour? Am I doing any thing wrong in the Notify register/sent sequence?
I am working in 8148evm with ezsdk. Doing this experiment inside messageQ sample in syslink
Thanks
Jibin