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.

BIOS6 (CCSv4) MessageQ - Calling context for an HWI

Other Parts Discussed in Thread: SYSBIOS

Hi

I'm trying to find the limitations of MessageQ (IPC) w.r.t. a hardware interrupt routine.

Can you point me to context calling info similar to the "Calling Context" table in the CCSv4 Help -> BIOS 6.21.03.21 -> API Reference (cdoc) -> ti -> sysbios -> ipc -> Mailbox

I'd like to know if MessageQ_alloc and MessageQ_put can be run from an HWI

Normal 0 false false false EN-US X-NONE X-NONE MicrosoftInternetExplorer4

This was found in the IPC Users Guide http://focus.ti.com/lit/ug/sprugo6a/sprugo6a.pdf

It stated “ MessageQ supports reads and writes of different thread models. It can work with threading models that include SYS/BIOS’s Hwi, Swi, and Task threads.”

But I get the error below which is telling me its not possible

ti.sysbios.gates.GateSwi: line 37: assertion failure: A_badContext: bad calling context. May not be entered from a hardware interrupt thread.
xdc.runtime.Error.raise: terminating execution

Cheers

 

  • Hi Eddie,

    MessageQ_alloc and MessageQ_put should not be called within a Hwi context in IPC.  You should defer these MessageQ operations to a Swi from your Hwi.  The statement in the IPC User's guide "It can work with threading models that include SYS/BIOS’s Hwi, Swi, and Task threads" refers to the capabilities of MessageQ itself but needs to be updated to reflect limitations of the remote IPC transports that are used by MessageQ.

    Note that MessageQ_get can still work in a Hwi context if configured with an appropriate Sync. (i.e. ti.sysbios.syncs.SyncSwi).

    IPC currently doesn't have "calling context" tables like the ones in the BIOS cdoc.  Calling context information for IPC runtime APIs can generally be found in the IPC doxygen (not cdoc).  However,  I've filed a bug against adding the calling context tables to IPC.

    Regards,

    Shreyas

  • Hi Shreyas,

    I'd like to know the status of adding the calling context tables to IPC.
    So, could you please let me know the status, if you have any updates.

    Thanks in advance for your cooperation.

    Best regards,
    j-breeze

  • J-Breeze,

    I looked up the bug filed by Shreyas (back in Nov 2010) and it has not been fixed. The IPC 1.x product stream is no longer in active development. It seems unlikely that this bug will ever be fixed.

    Sorry.

    ~Ramsey

  • Hi Ramsey,

    Thank you for your e-mail.

    I understood the status. And I looked for the related info in IPC v3, but I could not find.

    Regards,
    j-breeze