<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>MQX Software Solutions中的主题 Question about lightweight message queue:</title>
    <link>https://community.nxp.com/t5/MQX-Software-Solutions/Question-about-lightweight-message-queue/m-p/468639#M15562</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am trying to use _lwmsgq_init(location, num_messages, msg_size) to setup a message queue.&lt;/P&gt;&lt;P&gt;In this case I only need the queue to hold one message at a time and the messages may be a 100+ bytes.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am using the following to setup the queue:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;#define UARTQ_NUM_MESSAGES&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1&lt;/P&gt;&lt;P&gt;#define UARTQ_MSG_SIZE&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 50&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //In uint32s, allow for 200 byte messages&lt;/P&gt;&lt;P&gt;#define UARTQ_SIZE&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ((sizeof(LWMSGQ_STRUCT)/sizeof(_mqx_max_type)) + (UARTQ_NUM_MESSAGES * UARTQ_MSG_SIZE)) &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;uint32_t g_uart_tx_msgq[UARTQ_SIZE];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;result = _lwmsgq_init((void*)g_uart_tx_msgq, UARTQ_NUM_MESSAGES, UARTQ_MSG_SIZE);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I seem to have some confusion around the msg_size parameter.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I use the code above code, it does not work.&amp;nbsp; After receiving a message from the queue the code ends up in the __boot_exception() while(1).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I set UARTQ_MSG_SIZE to some smaller number (&amp;lt;= 25) and simply allocate the message queue as uint32_t g_uart_tx_msgq[1000], the code runs as expected for messages much larger than 8 bytes.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there a limit on the message size for lightweight message queues, or does anyone have other insight into what I am seeing.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;David&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 06 Jan 2016 22:53:34 GMT</pubDate>
    <dc:creator>dcooper</dc:creator>
    <dc:date>2016-01-06T22:53:34Z</dc:date>
    <item>
      <title>Question about lightweight message queue:</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/Question-about-lightweight-message-queue/m-p/468639#M15562</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am trying to use _lwmsgq_init(location, num_messages, msg_size) to setup a message queue.&lt;/P&gt;&lt;P&gt;In this case I only need the queue to hold one message at a time and the messages may be a 100+ bytes.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am using the following to setup the queue:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;#define UARTQ_NUM_MESSAGES&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1&lt;/P&gt;&lt;P&gt;#define UARTQ_MSG_SIZE&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 50&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //In uint32s, allow for 200 byte messages&lt;/P&gt;&lt;P&gt;#define UARTQ_SIZE&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ((sizeof(LWMSGQ_STRUCT)/sizeof(_mqx_max_type)) + (UARTQ_NUM_MESSAGES * UARTQ_MSG_SIZE)) &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;uint32_t g_uart_tx_msgq[UARTQ_SIZE];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;result = _lwmsgq_init((void*)g_uart_tx_msgq, UARTQ_NUM_MESSAGES, UARTQ_MSG_SIZE);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I seem to have some confusion around the msg_size parameter.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I use the code above code, it does not work.&amp;nbsp; After receiving a message from the queue the code ends up in the __boot_exception() while(1).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I set UARTQ_MSG_SIZE to some smaller number (&amp;lt;= 25) and simply allocate the message queue as uint32_t g_uart_tx_msgq[1000], the code runs as expected for messages much larger than 8 bytes.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there a limit on the message size for lightweight message queues, or does anyone have other insight into what I am seeing.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;David&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Jan 2016 22:53:34 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/Question-about-lightweight-message-queue/m-p/468639#M15562</guid>
      <dc:creator>dcooper</dc:creator>
      <dc:date>2016-01-06T22:53:34Z</dc:date>
    </item>
    <item>
      <title>Re: Question about lightweight message queue:</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/Question-about-lightweight-message-queue/m-p/468640#M15563</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello David, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Which MQX version are you using?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards &lt;/P&gt;&lt;P&gt;Soledad&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Jan 2016 20:26:38 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/Question-about-lightweight-message-queue/m-p/468640#M15563</guid>
      <dc:creator>soledad</dc:creator>
      <dc:date>2016-01-22T20:26:38Z</dc:date>
    </item>
    <item>
      <title>Re: Question about lightweight message queue:</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/Question-about-lightweight-message-queue/m-p/468641#M15564</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The Release Notes in the  MQX/doc folder indicate 4.1.0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Jan 2016 16:28:18 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/Question-about-lightweight-message-queue/m-p/468641#M15564</guid>
      <dc:creator>dcooper</dc:creator>
      <dc:date>2016-01-25T16:28:18Z</dc:date>
    </item>
    <item>
      <title>Re: Question about lightweight message queue:</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/Question-about-lightweight-message-queue/m-p/468642#M15565</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Soledad&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you provide any insight on this issue?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;David&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Feb 2016 23:47:53 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/Question-about-lightweight-message-queue/m-p/468642#M15565</guid>
      <dc:creator>dcooper</dc:creator>
      <dc:date>2016-02-05T23:47:53Z</dc:date>
    </item>
  </channel>
</rss>

