Hi,
I have successfully built and run the ex44_compute example from the IPC product install tree, showing MessageQ communication
between ARM (Linux) and DSP.
As a first step in expanding/modifying the behaviour of the example i create a named queue on the ARM side and after the original
communication with the DSPs I make a call to MessageQ_get on the new queue. Since no other code has been added I expect this
call to hang, which it correctly does if the timeout is set to MessageQ_FOREVER. However, specifying a shorter timeout, eg. 5s,
causes the call to return with a return code of 0 (zero), indicating successful reception of a message. This was not quite what I
expected - I did expect a timeout i.e. -6.
I include a code snippet showing my added code (from // Brief wait... to printMsg):
printf("App_exec: message sent to Compute queue: qid=0x%08x\n", qid);
/* close queue */
MessageQ_close(&qid);
}
// Brief wait for inbound traffic (none expected yet...)
// First look up our own queue:
MessageQ_QueueId q;
status = MessageQ_open("sync", &q);
printf("Looked up own sync queue id, q=%d - now try a ..._get:\n", q);
status = MessageQ_get(App_module.sync, &mqMsg, 5000000); // 5 seconds
// status = MessageQ_get(App_module.sync, &mqMsg, MessageQ_FOREVER);
if (status < 0) {
printf("Error in MessageQ_get, status=%d\n", status);
// status = -3;
goto leave;
} else {
printf("Incoming data on sync, status=%d\n", status);
printMsg(mqMsg);
/* TODO validate message content? */
/* return the message to the pool */
MessageQ_free(mqMsg);
}
leave:
printf("App_exec: <-- status=%d\n", status);
Using IPC 3_35_01_07 and CCS 6.1, running on a EVMK2H rev 3.0 eval board.
Any help in finding out what is happening here would be appreciated.
Regards,
/Anders