<?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>topic Re: Apparent bug in virtual com port example... in i.MX RT Crossover MCUs</title>
    <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/Apparent-bug-in-virtual-com-port-example/m-p/1163183#M10389</link>
    <description>&lt;P&gt;Hi Edsutter:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you very much for your feedback. Let me try to reproduce this issue on my side.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards&lt;/P&gt;
&lt;P&gt;Daniel&lt;/P&gt;</description>
    <pubDate>Tue, 06 Oct 2020 02:25:51 GMT</pubDate>
    <dc:creator>danielchen</dc:creator>
    <dc:date>2020-10-06T02:25:51Z</dc:date>
    <item>
      <title>Apparent bug in virtual com port example...</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/Apparent-bug-in-virtual-com-port-example/m-p/1161889#M10355</link>
      <description>&lt;P&gt;Note that this is a rewrite of &lt;A href="https://community.nxp.com/t5/i-MX-RT/ESC-character-in-virtual-com-port-example/m-p/1154247" target="_self"&gt;this&lt;/A&gt; topic.&amp;nbsp; Now that I understand the problem and have confirmation from another developer that its a valid issue, it seemed appropriate to repost with correct subject line and only the essential details...&lt;/P&gt;&lt;P&gt;Referring to the&amp;nbsp;&lt;SPAN&gt;&lt;EM&gt;&lt;STRONG&gt;usb_device_cdc_vcom_lite&lt;/STRONG&gt; &lt;/EM&gt;example from the SDK.&amp;nbsp; This example just echoes whatever character is sent.&amp;nbsp; Here's a --slightly modified-- snippet taken directly from the example...&lt;/SPAN&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;void APP_task(void)
{
    usb_status_t error = kStatus_USB_Error;
    if ((1 == s_cdcVcom.attach) &amp;amp;&amp;amp; (1 == s_cdcVcom.startTransactions))
    {
        /* User Code */
        if ((0 != s_recvSize) &amp;amp;&amp;amp; (0xFFFFFFFFU != s_recvSize))
        {
            int32_t i;

            /* Copy Buffer to Send Buff */
            for (i = 0; i &amp;lt; s_recvSize; i++)
            {
#ifdef DEMONSTRATE_THE_ERROR
                if (s_currRecvBuf[i] != 'Z')
#endif
                    s_currSendBuf[s_sendSize++] = s_currRecvBuf[i];
            }
            s_recvSize = 0;
        }
        if (s_sendSize)
        {
            uint32_t size = s_sendSize;
            s_sendSize    = 0;
            error = USB_DeviceSendRequest(s_cdcVcom.deviceHandle, USB_CDC_VCOM_BULK_IN_ENDPOINT, s_currSendBuf, size);
            if (error != kStatus_USB_Success)
            {
                /* Failure to send Data Handling code here */
            }
        }
    }
}&lt;/LI-CODE&gt;&lt;P&gt;With DEMONSTRATE_THE_ERROR undefined,&amp;nbsp;&lt;SPAN&gt;the above code works... It simply echoes each character received from the host back to the host.&amp;nbsp; If DEMONSTRATE_THE_ERROR is defined and the host sends&amp;nbsp; 'Z', all echoes stop, and the connection is essentially dead as best I can tell.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;One additional note...&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;If I call USB_DeviceSendRequest() with buffer and size set to 0 when I receive the 'Z', the 'Z' is not echoed, but after that characters are echoed.&amp;nbsp; So it appears that for each incoming (from the host) character there needs to be a corresponding call to USB_DeviceSendRequest() even if the length is zero.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;It appears to me that this is an issue in the SDK, can someone from NXP take a look and offer some suggestions?&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 01 Oct 2020 14:45:04 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/Apparent-bug-in-virtual-com-port-example/m-p/1161889#M10355</guid>
      <dc:creator>EdSutter</dc:creator>
      <dc:date>2020-10-01T14:45:04Z</dc:date>
    </item>
    <item>
      <title>Re: Apparent bug in virtual com port example...</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/Apparent-bug-in-virtual-com-port-example/m-p/1163183#M10389</link>
      <description>&lt;P&gt;Hi Edsutter:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you very much for your feedback. Let me try to reproduce this issue on my side.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards&lt;/P&gt;
&lt;P&gt;Daniel&lt;/P&gt;</description>
      <pubDate>Tue, 06 Oct 2020 02:25:51 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/Apparent-bug-in-virtual-com-port-example/m-p/1163183#M10389</guid>
      <dc:creator>danielchen</dc:creator>
      <dc:date>2020-10-06T02:25:51Z</dc:date>
    </item>
    <item>
      <title>Re: Apparent bug in virtual com port example...</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/Apparent-bug-in-virtual-com-port-example/m-p/1164490#M10427</link>
      <description>&lt;P&gt;Hi Daniel,&lt;/P&gt;&lt;P&gt;Thanks for taking a look at this...&lt;/P&gt;&lt;P&gt;Any idea what is going on?&lt;/P&gt;&lt;P&gt;Ed&lt;/P&gt;</description>
      <pubDate>Thu, 08 Oct 2020 11:59:53 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/Apparent-bug-in-virtual-com-port-example/m-p/1164490#M10427</guid>
      <dc:creator>EdSutter</dc:creator>
      <dc:date>2020-10-08T11:59:53Z</dc:date>
    </item>
    <item>
      <title>Re: Apparent bug in virtual com port example...</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/Apparent-bug-in-virtual-com-port-example/m-p/1166806#M10536</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/28770"&gt;@EdSutter&lt;/a&gt;&lt;/P&gt;
&lt;P&gt;The demo's default behavior is: Send back the data that is received from host, then start to receive the next data from host. If host doesn't the receive the data from the device, the device will not receive next data.&lt;/P&gt;
&lt;P&gt;You can modify the demo according to your requirement.&lt;/P&gt;
&lt;P&gt;We can change the demo's behavior to receive the data continuously.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards&lt;/P&gt;
&lt;P&gt;Daniel&lt;/P&gt;</description>
      <pubDate>Tue, 13 Oct 2020 14:38:25 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/Apparent-bug-in-virtual-com-port-example/m-p/1166806#M10536</guid>
      <dc:creator>danielchen</dc:creator>
      <dc:date>2020-10-13T14:38:25Z</dc:date>
    </item>
    <item>
      <title>Re: Apparent bug in virtual com port example...</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/Apparent-bug-in-virtual-com-port-example/m-p/1166812#M10537</link>
      <description>&lt;P&gt;Daniel,&lt;/P&gt;&lt;P&gt;I know what the default behavior is.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Ultimately I want to hook this up to a terminal on a host, and the terminal interface won't always want to have every character echoed back.&amp;nbsp; The modification (that I figured was a hack) I made to get around this is to call&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;USB_DeviceSendRequest(s_cdcVcom.deviceHandle,USB_CDC_VCOM_BULK_IN_ENDPOINT,0,0);&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;in APP_task() for each character received.&amp;nbsp; I just assumed there would be a better way to resolve this.&lt;/P&gt;&lt;P&gt;Is that really the way to do this?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 13 Oct 2020 14:53:37 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/Apparent-bug-in-virtual-com-port-example/m-p/1166812#M10537</guid>
      <dc:creator>EdSutter</dc:creator>
      <dc:date>2020-10-13T14:53:37Z</dc:date>
    </item>
    <item>
      <title>Re: Apparent bug in virtual com port example...</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/Apparent-bug-in-virtual-com-port-example/m-p/1167445#M10564</link>
      <description>&lt;P&gt;it seems ok to me.&lt;/P&gt;</description>
      <pubDate>Wed, 14 Oct 2020 12:03:42 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/Apparent-bug-in-virtual-com-port-example/m-p/1167445#M10564</guid>
      <dc:creator>danielchen</dc:creator>
      <dc:date>2020-10-14T12:03:42Z</dc:date>
    </item>
    <item>
      <title>Re: Apparent bug in virtual com port example...</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/Apparent-bug-in-virtual-com-port-example/m-p/1618929#M24189</link>
      <description>&lt;P&gt;Is this really the best solution? You wrote&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;We can change the demo's behavior to receive the data continuously.&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The demo has not changed since 2020. This example is not very practical&lt;/P&gt;&lt;DIV class=""&gt;&lt;DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;P class=""&gt;&amp;nbsp;&lt;/P&gt;&lt;P class=""&gt;&amp;nbsp;&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;P class=""&gt;&amp;nbsp;&lt;/P&gt;&lt;P class=""&gt;&amp;nbsp;&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Tue, 21 Mar 2023 06:43:58 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/Apparent-bug-in-virtual-com-port-example/m-p/1618929#M24189</guid>
      <dc:creator>R3to</dc:creator>
      <dc:date>2023-03-21T06:43:58Z</dc:date>
    </item>
    <item>
      <title>Re: Apparent bug in virtual com port example...</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/Apparent-bug-in-virtual-com-port-example/m-p/1715012#M26634</link>
      <description>&lt;P&gt;While googling for my own issue i ran into this thread. We are currently experiencing this issue as well and it has costs of quite some debugging time to even identify this was the cause of our issues. Unfortunately our fix of just calling USB_DeviceCdcAcmRecv while handling kUSB_DeviceCdcEventRecvResponse seems to result in missing usb responses back to the host.&lt;/P&gt;</description>
      <pubDate>Thu, 31 Aug 2023 11:19:02 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/Apparent-bug-in-virtual-com-port-example/m-p/1715012#M26634</guid>
      <dc:creator>maartenm</dc:creator>
      <dc:date>2023-08-31T11:19:02Z</dc:date>
    </item>
  </channel>
</rss>

