<?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 USB CDC Virtual Com TX lockup in Kinetis Microcontrollers</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/USB-CDC-Virtual-Com-TX-lockup/m-p/765600#M46589</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have an MCUExpresso project and a FRDM K22 board. I have the virtual comm demo running. I edited the virtual_com app to send a full 32 byte packet as fast as possible.&amp;nbsp;&lt;/P&gt;&lt;P style="min- padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried to edit the demo as little as possible and all changes are in the virtual_com.c file. Once the character 'g' is received from the PC, the sending starts. It sends a packet, then waits for a transmit complete flag to be set in the "kUSB_DeviceCdcEventSendResponse" send complete interrupt callback. Once the flag is set, it send another packet and repeats. RealTerm&amp;nbsp; gets around 679000 characters before all comms stop.&lt;/P&gt;&lt;P style="min- padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The "kUSB_DeviceCdcEventSendResponse" callback is never called again. The g_txComplete flag is false and the callback is never called to set it true again. It's like the USB stack missed something.&amp;nbsp;&lt;/P&gt;&lt;P style="min- padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am using RealTerm to capture the serial data. Why is this locking up? I have the project attached.&lt;/P&gt;&lt;P style="min- padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 05 Jan 2018 03:04:44 GMT</pubDate>
    <dc:creator>guitardenver1</dc:creator>
    <dc:date>2018-01-05T03:04:44Z</dc:date>
    <item>
      <title>USB CDC Virtual Com TX lockup</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/USB-CDC-Virtual-Com-TX-lockup/m-p/765600#M46589</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have an MCUExpresso project and a FRDM K22 board. I have the virtual comm demo running. I edited the virtual_com app to send a full 32 byte packet as fast as possible.&amp;nbsp;&lt;/P&gt;&lt;P style="min- padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried to edit the demo as little as possible and all changes are in the virtual_com.c file. Once the character 'g' is received from the PC, the sending starts. It sends a packet, then waits for a transmit complete flag to be set in the "kUSB_DeviceCdcEventSendResponse" send complete interrupt callback. Once the flag is set, it send another packet and repeats. RealTerm&amp;nbsp; gets around 679000 characters before all comms stop.&lt;/P&gt;&lt;P style="min- padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The "kUSB_DeviceCdcEventSendResponse" callback is never called again. The g_txComplete flag is false and the callback is never called to set it true again. It's like the USB stack missed something.&amp;nbsp;&lt;/P&gt;&lt;P style="min- padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am using RealTerm to capture the serial data. Why is this locking up? I have the project attached.&lt;/P&gt;&lt;P style="min- padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Jan 2018 03:04:44 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/USB-CDC-Virtual-Com-TX-lockup/m-p/765600#M46589</guid>
      <dc:creator>guitardenver1</dc:creator>
      <dc:date>2018-01-05T03:04:44Z</dc:date>
    </item>
    <item>
      <title>Re: USB CDC Virtual Com TX lockup</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/USB-CDC-Virtual-Com-TX-lockup/m-p/765601#M46590</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Matthew&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I can't help with the example project in the MCUXpresso package but if you continue having problems you can consider the uTasker USB stack which works on all Kinetis parts. I have attached a binary that you can check on your FRDM-K22F board where I have enabled 3 x CDC interfaces. This means that if you load it to your board it will enumerate as 3 virtual COMs whereby you can connect any of them (one, two or three) to three TeraTerm/RealTerm etc. instances. On the first VCOM interface there is a command line interface (if you hit the enter key) or else it is on the OpenSDA's VCOM port too.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Go into the USB menu (menu 6) and it will show some options:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new, courier, monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; USB menu&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new, courier, monospace;"&gt;===================&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new, courier, monospace;"&gt;up&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; go to main menu&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new, courier, monospace;"&gt;usb_errors&amp;nbsp;&amp;nbsp; Show USB errors&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new, courier, monospace;"&gt;usb_cnt_rst&amp;nbsp; Reset USB counters&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new, courier, monospace;"&gt;usb-serial&amp;nbsp;&amp;nbsp; RS232&amp;lt;-&amp;gt;USB mode (disconnect to quit)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new, courier, monospace;"&gt;usb-load&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; USB-SW download&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new, courier, monospace;"&gt;usb-tx&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Test tx speed (send 10MByte data)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new, courier, monospace;"&gt;help&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Display menu specific help&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new, courier, monospace;"&gt;quit&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Leave command mode&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you choose "usb-tx" it will send 10MBytes of data to &lt;SPAN style="text-decoration: underline;"&gt;all&lt;/SPAN&gt; of the attached USB-CDC interfaces in parallel (one can attach 1, 2 or 3 VCOMs)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have also attached an Ellisys analyser recording (the viewer can be downloaded freely on the Ellisys web site) which shows that it achieves maximum throughput (that is, zero NAK operation) on all bulk IN endpoints (showing a case where it is transmitting to 3 VCOM interfaces).&lt;BR /&gt;You will also see that it is bullet-proof - it is an industrially proven stack which is used in many products with no issues since 2012 - and also in Coldfire devices (almost identical USB controller) since 2008.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can also use the "usb-serial" mode if you want to experiment too since it will then do bidirectional USB-UART bridges on up to three VCOM-UARTs; the first USB-CDC interface is paired with the OpenSDA interface VCOM UART. It includes end-to-end flow control and Baud rate control so is also a complete solution for such things.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Don't get worried if you are only allowed to use free firmware because this functionality is also included in the free open source version, as is complete Kinetis USB controller simulation in Visual Studio for making and testing your own modifications in a highly efficient environment. One can configure for 1 to 6 USB-CDC composite interfaces and/or mix with various other classes (HID, MSD, Audio etc.) and also with RNDIS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mark&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Kinetis: &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.nxp.com/external-link.jspa?url=http%3A%2F%2Fwww.utasker.com%2Fkinetis.html" rel="nofollow" target="_blank"&gt;http://www.utasker.com/kinetis.html&lt;/A&gt;&lt;BR /&gt;Kinetis K22:&lt;BR /&gt;&lt;SPAN&gt;- &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.nxp.com/external-link.jspa?url=http%3A%2F%2Fwww.utasker.com%2Fkinetis%2FFRDM-K22F.html" rel="nofollow" target="_blank"&gt;http://www.utasker.com/kinetis/FRDM-K22F.html&lt;/A&gt;&lt;BR /&gt;&lt;SPAN&gt;- &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.nxp.com/external-link.jspa?url=http%3A%2F%2Fwww.utasker.com%2Fkinetis%2FTWR-K22F120M.html" rel="nofollow" target="_blank"&gt;http://www.utasker.com/kinetis/TWR-K22F120M.html&lt;/A&gt;&lt;BR /&gt;&lt;SPAN&gt;- &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.nxp.com/external-link.jspa?url=http%3A%2F%2Fwww.utasker.com%2Fkinetis%2FBLAZE_K22.html" rel="nofollow" target="_blank"&gt;http://www.utasker.com/kinetis/BLAZE_K22.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;USB User's Guide: &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.nxp.com/external-link.jspa?url=http%3A%2F%2Fwww.utasker.com%2Fdocs%2FuTasker%2FUSB_User_Guide.PDF" rel="nofollow" target="_blank"&gt;http://www.utasker.com/docs/uTasker/USB_User_Guide.PDF&lt;/A&gt;&lt;BR /&gt;&lt;SPAN&gt;Demos and simulation Guide: &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.nxp.com/external-link.jspa?url=http%3A%2F%2Fwww.utasker.com%2Fdocs%2FuTasker%2FuTaskerV1.3_USB_Demo.PDF" rel="nofollow" target="_blank"&gt;http://www.utasker.com/docs/uTasker/uTaskerV1.3_USB_Demo.PDF&lt;/A&gt;&lt;BR /&gt;&lt;SPAN&gt;USB composites: &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.nxp.com/external-link.jspa?url=http%3A%2F%2Fwww.utasker.com%2Fkinetis%2FUSB_Device.html" rel="nofollow" target="_blank"&gt;http://www.utasker.com/kinetis/USB_Device.html&lt;/A&gt;&lt;BR /&gt;&lt;SPAN&gt;USB-CDC host&amp;lt;-&amp;gt;device video: &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.nxp.com/external-link.jspa?url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DXhISV1czIo4%26list%3DPLWKlVb_MqDQFZAulrUywU30v869JBYi9Q%26index%3D16" rel="nofollow" target="_blank"&gt;https://www.youtube.com/watch?v=XhISV1czIo4&amp;amp;list=PLWKlVb_MqDQFZAulrUywU30v869JBYi9Q&amp;amp;index=16&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Free Open Source solution: &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.nxp.com/external-link.jspa?url=https%3A%2F%2Fgithub.com%2FuTasker%2FuTasker-Kinetis" rel="nofollow" target="_blank"&gt;https://github.com/uTasker/uTasker-Kinetis&lt;/A&gt;&lt;BR /&gt;&lt;SPAN&gt;Working project in 15 minutes video: &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.nxp.com/external-link.jspa?url=https%3A%2F%2Fyoutu.be%2FK8ScSgpgQ6M" rel="nofollow" target="_blank"&gt;https://youtu.be/K8ScSgpgQ6M&lt;/A&gt;&lt;BR /&gt;Build with: CW10.x, KDS, MCUXpresso, IAR, Keil, Greenhills, Crossworks, CooCox, Atollic, S32 Design Studio, GNU Make and Visual Studio&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Professional Kinetis support, one-on-one training and complete fast-track project solutions: &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.nxp.com/external-link.jspa?url=http%3A%2F%2Fwww.utasker.com%2Fsupport.html" rel="nofollow" target="_blank"&gt;http://www.utasker.com/support.html&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 06 Jan 2018 23:53:51 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/USB-CDC-Virtual-Com-TX-lockup/m-p/765601#M46590</guid>
      <dc:creator>mjbcswitzerland</dc:creator>
      <dc:date>2018-01-06T23:53:51Z</dc:date>
    </item>
  </channel>
</rss>

