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.

Mailbox msgSize Access

Other Parts Discussed in Thread: SYSBIOS

Bios 6.31.00.18

28335 chip

 

The graphic editor for the ti.sysbios.knl.Mailbox instantiation allows setting the msgSize parameter .

I need to access the msgSize value in my program for a sanity check. I want to be assured that my buffer size matches the msgSize used by the Bios.

I know I could manually instantiate the Mailboxes in my program, but I would much rather use the graphic editor for this project.

TIA,

Jan

 

  • Hi Jan,

    Unfortunately there is no API that returns the msgSize for a Mailbox (created during runtime or statically via the graphic editor). Manually looking into Mailbox structure is not recommended since the structure might change in the future.

    You could save the msgSize that you use in the Mailbox.create. For example,

    Mailbox.create(128, 3);
    Program.global.mailboxMsgSize = 128;

    Then you can check in your code (note: you need to have #include <xdc/cfg/global.h> to get the global var). More details are here http://rtsc.eclipse.org/cdoc-tip/xdc/cfg/Program.html#global or in the XDC help.

    I could see that this is not an ideal approach. Having a Mailbox_getMsgSize(mbxHandle) API would be easier and a better approach. I'll open a enhancement request to get this into a future version of SYS/BIOS.

    Todd

  • Thanks for the response. I validated your solution, as I believe it is the best workaround that could be done at this time.

    I personally prefer to hard code the msgSize value into my object rather than the .cfg file.

    Most of our team do not look at the raw .cfg file text or understand it's workings. 

    Thanks for the help,

    Jan