<?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 Stack, bare metal, v4.03, CDC sending FIFO length data to host? in Kinetis Microcontrollers</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/USB-Stack-bare-metal-v4-03-CDC-sending-FIFO-length-data-to-host/m-p/276210#M9922</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When sending data to host a full FIFO from event USB_APP_DATA_RECEIVED&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;DataLength=16;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // RX size from host&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;...&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;if (USB_Class_CDC_Interface_DIC_Send_Data(USB_COMPOSITE_CONTROLLER_ID,(uint8_t*)&amp;amp;Data[0],DataLength)!=USB_OK) {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; for(;;);&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // catch in debugger&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;else {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Sent=1;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ZLP=0;&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The IN transaction is not complete without sending a zero length packet (ZLP).&amp;nbsp; This is as I understand it normal behaviour.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So in my transmit completion event I have:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;else if (event_type==USB_APP_SEND_COMPLETE) {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (Sent) {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (!ZLP) {&lt;/P&gt;&lt;P&gt;&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; // ZLP on TX fifo, completion of last IN transaction&lt;/P&gt;&lt;P&gt;&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; if (USB_Class_CDC_Interface_DIC_Send_Data(USB_COMPOSITE_CONTROLLER_ID,NULL,0)!=USB_OK) {&lt;/P&gt;&lt;P&gt;&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; for(;;);&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // catch in debugger&lt;/P&gt;&lt;P&gt;&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; }&lt;/P&gt;&lt;P&gt;&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; ZLP=1;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }else {&lt;/P&gt;&lt;P&gt;&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; // ZLP on RX fifo, completion of last OUT transaction, allowing host to begin again sending&lt;/P&gt;&lt;P&gt;&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; USB_Class_CDC_Interface_DIC_Recv_Data(USB_COMPOSITE_CONTROLLER_ID,NULL,0);&lt;/P&gt;&lt;P&gt;&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; Sent=0;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here when we get completion of full FIFO sent, we check if we have to ZLP send.&amp;nbsp; Do it and only then do we free up the receiver.&amp;nbsp; Like the demo code, it's half duplex because by not sending ZLP on RX FIFO no more data comes in from host.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thing is, it's flaky, sometimes works, sometimes does not and hangs.&amp;nbsp; I have not checking status of sending USB_Class_CDC_Interface_DIC_Recv_Data, should I?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also it is not clear, do we get USB_APP_SEND_COMPLETE events on ZLP sending on both IN and OUT transactions since both are in a send, albeit of zero data in the data stage of transaction or in the receive the ack - I think?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying to make the USB interface completely interrupt driven, but the biggest issue I have is that the callback to receive data is from the USB ISR as:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;static CLASS_APP_CALLBACK_STRUCT callback = {&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .composite_class_callback =CDCApp_Class_Callback,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .vendor_req_callback =NULL,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .param_callback = CDCApp_PSTN_Notify_Callback,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .param_specific_callback =NULL,&lt;/P&gt;&lt;P&gt;};&lt;/P&gt;&lt;P&gt;&lt;SPAN class="mce_paste_marker"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if we get a completion event, we send some more data but ... If one of the USB_Send... function calls come back as BUSY, I can't do anything, that results in no completion event because we could not initiate a send and the thing hangs.&amp;nbsp; I think also that is why you are doing things in half duplex mode, trying to ensure resources are free to use.&amp;nbsp; That is fine for a demo but not representative of any real world application.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I cannot use MQX because it does not support composite devices, I cannot block because of legacy code in our application connecting to hardware on PCB so calling it from main loop is not possible.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have to say, I've used Atmel's free stack which is also what you could call bare metal for a number of years and have never had the amount of trouble I'm having with Freescale's implementation.&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;dc&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 27 Feb 2013 12:02:23 GMT</pubDate>
    <dc:creator>gigglerg</dc:creator>
    <dc:date>2013-02-27T12:02:23Z</dc:date>
    <item>
      <title>USB Stack, bare metal, v4.03, CDC sending FIFO length data to host?</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/USB-Stack-bare-metal-v4-03-CDC-sending-FIFO-length-data-to-host/m-p/276210#M9922</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When sending data to host a full FIFO from event USB_APP_DATA_RECEIVED&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;DataLength=16;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // RX size from host&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;...&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;if (USB_Class_CDC_Interface_DIC_Send_Data(USB_COMPOSITE_CONTROLLER_ID,(uint8_t*)&amp;amp;Data[0],DataLength)!=USB_OK) {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; for(;;);&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // catch in debugger&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;else {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Sent=1;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ZLP=0;&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The IN transaction is not complete without sending a zero length packet (ZLP).&amp;nbsp; This is as I understand it normal behaviour.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So in my transmit completion event I have:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;else if (event_type==USB_APP_SEND_COMPLETE) {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (Sent) {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (!ZLP) {&lt;/P&gt;&lt;P&gt;&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; // ZLP on TX fifo, completion of last IN transaction&lt;/P&gt;&lt;P&gt;&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; if (USB_Class_CDC_Interface_DIC_Send_Data(USB_COMPOSITE_CONTROLLER_ID,NULL,0)!=USB_OK) {&lt;/P&gt;&lt;P&gt;&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; for(;;);&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // catch in debugger&lt;/P&gt;&lt;P&gt;&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; }&lt;/P&gt;&lt;P&gt;&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; ZLP=1;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }else {&lt;/P&gt;&lt;P&gt;&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; // ZLP on RX fifo, completion of last OUT transaction, allowing host to begin again sending&lt;/P&gt;&lt;P&gt;&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; USB_Class_CDC_Interface_DIC_Recv_Data(USB_COMPOSITE_CONTROLLER_ID,NULL,0);&lt;/P&gt;&lt;P&gt;&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; Sent=0;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here when we get completion of full FIFO sent, we check if we have to ZLP send.&amp;nbsp; Do it and only then do we free up the receiver.&amp;nbsp; Like the demo code, it's half duplex because by not sending ZLP on RX FIFO no more data comes in from host.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thing is, it's flaky, sometimes works, sometimes does not and hangs.&amp;nbsp; I have not checking status of sending USB_Class_CDC_Interface_DIC_Recv_Data, should I?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also it is not clear, do we get USB_APP_SEND_COMPLETE events on ZLP sending on both IN and OUT transactions since both are in a send, albeit of zero data in the data stage of transaction or in the receive the ack - I think?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying to make the USB interface completely interrupt driven, but the biggest issue I have is that the callback to receive data is from the USB ISR as:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;static CLASS_APP_CALLBACK_STRUCT callback = {&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .composite_class_callback =CDCApp_Class_Callback,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .vendor_req_callback =NULL,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .param_callback = CDCApp_PSTN_Notify_Callback,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .param_specific_callback =NULL,&lt;/P&gt;&lt;P&gt;};&lt;/P&gt;&lt;P&gt;&lt;SPAN class="mce_paste_marker"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if we get a completion event, we send some more data but ... If one of the USB_Send... function calls come back as BUSY, I can't do anything, that results in no completion event because we could not initiate a send and the thing hangs.&amp;nbsp; I think also that is why you are doing things in half duplex mode, trying to ensure resources are free to use.&amp;nbsp; That is fine for a demo but not representative of any real world application.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I cannot use MQX because it does not support composite devices, I cannot block because of legacy code in our application connecting to hardware on PCB so calling it from main loop is not possible.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have to say, I've used Atmel's free stack which is also what you could call bare metal for a number of years and have never had the amount of trouble I'm having with Freescale's implementation.&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;dc&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Feb 2013 12:02:23 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/USB-Stack-bare-metal-v4-03-CDC-sending-FIFO-length-data-to-host/m-p/276210#M9922</guid>
      <dc:creator>gigglerg</dc:creator>
      <dc:date>2013-02-27T12:02:23Z</dc:date>
    </item>
    <item>
      <title>Re: USB Stack, bare metal, v4.03, CDC sending FIFO length data to host?</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/USB-Stack-bare-metal-v4-03-CDC-sending-FIFO-length-data-to-host/m-p/276211#M9923</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can you confirm v403 of bare metal stack now handles ZLP on data transfers.&amp;nbsp; I have removed my code to explicitly handle them that were used with 402 and it now seems to function sending full length FIFO's on the CDC data pipe.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Diffing usb_dci_kinetis.c, the driver for the device I am using, I notice its got significant changes to 402.&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;dc&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Feb 2013 12:40:33 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/USB-Stack-bare-metal-v4-03-CDC-sending-FIFO-length-data-to-host/m-p/276211#M9923</guid>
      <dc:creator>gigglerg</dc:creator>
      <dc:date>2013-02-27T12:40:33Z</dc:date>
    </item>
    <item>
      <title>Re: USB Stack, bare metal, v4.03, CDC sending FIFO length data to host?</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/USB-Stack-bare-metal-v4-03-CDC-sending-FIFO-length-data-to-host/m-p/276212#M9924</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I've written a PC program to repeatedly connect and dump variable length data ranging from 256 to 4096bytes, reading them back like the echo demo.&amp;nbsp; If the port opens OK without error, sometimes it does error, covered in another post I made today.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What I've found is that most of the time when sending from firmware so responding to host IN transactions complete, however 1 in 50 or there about's (read as random) finish in firmware but the host is missing data.&amp;nbsp; If you look at the firmware in the debugger, my buffer rx/tx counts are equal yet still some data is missing at PC host.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So I've changed the firmware code to *always* send data less than 1 FIFO and so far it's working.&amp;nbsp; I'd say the fixes from 402 to 403 for ZLP by the driver code in &lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;usb_dci_kinetis.c&lt;/SPAN&gt; are not working correctly for K60.&amp;nbsp; It is certainly better than 402 but still very buggy.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;dc&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Feb 2013 16:38:47 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/USB-Stack-bare-metal-v4-03-CDC-sending-FIFO-length-data-to-host/m-p/276212#M9924</guid>
      <dc:creator>gigglerg</dc:creator>
      <dc:date>2013-02-27T16:38:47Z</dc:date>
    </item>
    <item>
      <title>Re: USB Stack, bare metal, v4.03, CDC sending FIFO length data to host?</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/USB-Stack-bare-metal-v4-03-CDC-sending-FIFO-length-data-to-host/m-p/276213#M9925</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for sharing solution with us, Giggler.&lt;/P&gt;&lt;P&gt;Awesome job!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Mar 2013 21:15:48 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/USB-Stack-bare-metal-v4-03-CDC-sending-FIFO-length-data-to-host/m-p/276213#M9925</guid>
      <dc:creator>Monica</dc:creator>
      <dc:date>2013-03-05T21:15:48Z</dc:date>
    </item>
  </channel>
</rss>

