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.

Unexpected return from MessageQ_get in modified ex44_compute

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

  • Hi Anders,

    For keystone II devices, as far as I know, we can build the examples of IPC only through commandline. No defined steps for building the IPC examples (Message_Q) using CCS environment.

    Please let me know the steps you carried out for building the Message_Q in CCS


    ----
  • Hi Shankari,

    I got help from other parts of Ti in the form of a pair of working CCS projects (ARM and DSP) for the ex44_compute project.
    I will check what of that I can share, as I assume it may be of interest to others.

    Now, about the question at hand, i.e. the unexpected answer...?

    Regards,
    /Anders

  • Hi Anders,

    Anders said:
    Using IPC 3_35_01_07 and CCS 6.1, running on a EVMK2H rev 3.0 eval board.


    I am surprised that how you would have got the "ex44_compute" example for K2H EVM??

    I could see that example only for K2K boards....i.e. for TCIC6638 devices. ( i.e, located at "..\ti\ipc_3_35_01_07\examples\TCI6638_linux_elf" )

    Please make us understand clearly otherwise it is difficult to follow up with the factory team.

    -----
  • Hi,

    As fas as I have been informed TCI6636 and TCI6638 are identical except for some accelerators on the -38 which we don't use and which are not used in the ex44_compute example.

    Hope this helps,

    /Anders