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.

MSGQ_put fails

Hi all

I'm using dsplink 1.63 on a OMAP L137.

My application implements a MSGQ located on the DSP side which is used to send messages from the GPP to the DSP. When I do a MSGQ_put on the GPP side it returns with status 0x80008008 (EFAIL) which doesn't tell me _anything_ ... (since it only states that it's a general failure...)

Here's the sequence of dsplink APIs that I'm calling:

GPP side DSP side
PROC_setup
PROC_attach
POOL_open
PROC_load
PROC_start
SEM_new
MSGQ_open
MSGQ_setErrorHandler
MSGQ_transportOpen
MSGQ_locate
MSGQ_alloc
MSGQ_put

Everything seems to run fine (all commands return DSP_OK / SYS_OK) except for the MSGQ_put. I've read that a put() can fail if the MSGQ is already closed but I'm pretty sure that's not the case, since the DSP ends up in a while(1) loop (inside the task function) which does MSGQ_get / TSK_sleep. I'd guess that something (i.e the MSGQ handlers) is not properly setup. But since all the APIs return "OK" I got no clue what could be wrong...

Any  tips what could make the MSGQ_put failing are appreciated!

Thx,

Dominique

  • I know managed to enable traces for dsplink. Here's what I get when MSGQ_put is called:

    Entered MSGQ_put ()
     msgqQueue [0x0]
     msg [0x42710d80]
    Entered DRV_Invoke ()
     drvObj [0x3a2e8]
     cmdId [0x6f0a]
     arg1 [0x42710d4c]
     arg2 [0x0]
    Entered _POOL_xltBuf ()
     poolId [0x3]
     bufPtr [0x42710d54]
     xltFlag [0x200]

    Failure: Status:[0x80008008] File:[0x20b] Line:[198]
    Leaving _POOL_xltBuf ()  status [0x80008008]
    Status: 402ed028
    Leaving DRV_Invoke ()  status [0x80008008]

    Failure: Status:[0x80008008] File:[0x202] Line:[612]
    Leaving MSGQ_put ()  status [0x80008008]
    Entered MSGQ_free ()
     msg [0x42710d80]
    Entered DRV_Invoke ()
     drvObj [0x3a2e8]
     cmdId [0x6f09]
     arg1 [0x42710d4c]
     arg2 [0x0]
    Entered _POOL_xltBuf ()
     poolId [0x3]
     bufPtr [0x42710d50]
     xltFlag [0x200]

    Failure: Status:[0x80008008] File:[0x20b] Line:[198]
    Leaving _POOL_xltBuf ()  status [0x80008008]
    Status: 402ed028
    Leaving DRV_Invoke ()  status [0x80008008]

    Failure: Status:[0x80008008] File:[0x202] Line:[572]
    Leaving MSGQ_free ()  status [0x80008008]
    MSGQ_put () failed. Status = [0x80008008]

  • Dominique,

    From your post, I see POOL_open is being called once i.e. only one POOL is configured. Is my understanding correct or have you configured 3 POOLs?

    From this trace log, I see that Pool Id is becoming 3 in the MSGQ_put call.3 seems to be an invalid Pool number causing the _POOL_xltBuf call is failing.
    Entered _POOL_xltBuf ()
     poolId [0x3]
     bufPtr [0x42710d54]
     xltFlag [0x200]

    Some questions to enable further debugging?

    Has POOL_open call passed? How has the pool id become 3? Is any API call in your application which takes the pool number passing an invalid pool number?

    Deepali

  • I have only 1 POOL configured and I have no clue why the _POOL_xltBuf() function is seeing poolId=3. The MSGQ_put() call doesn't even use a pool idea (at least it's not exposed to the user).

    POOL_open() returns successful. And so does MSGQ_alloc which gets the pool id by the makePoolId macro (which is used for all functions which need a pool ID).

    For now I've made a workaround with NOTIFY and QUE but it's kind of disappointing that the MSGQ won't work... I still guess it's some configuration error. But I really can't find it. For me, all looks pretty much the same as in the examples... :-/

  • Dominque,

    I can have a look at the sample application that you have written .

    Deepali