<?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>Kinetis MicrocontrollersのトピックRe: Cancelling USB Transfers</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Cancelling-USB-Transfers/m-p/256593#M7609</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I've found that this works.&amp;nbsp; Any reason not to do this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; //Use this to cancel any outgoing USB transfers on a given pipe&lt;/P&gt;&lt;P&gt; uint8_t WinUsbClearSendPipe( uint_8 controller_ID, uint_8 ep_num)&lt;/P&gt;&lt;P&gt; {&lt;/P&gt;&lt;P&gt;&amp;nbsp; uint8_t status = USB_DCI_Cancel_Transfer(controller_ID, ep_num, USB_SEND);&lt;/P&gt;&lt;P&gt;&amp;nbsp; //Attempt to cancel transfer and update the consumer pointer&lt;/P&gt;&lt;P&gt;&amp;nbsp; if(status == USB_OK)&lt;/P&gt;&lt;P&gt;&amp;nbsp; {&lt;/P&gt;&lt;P&gt;&amp;nbsp; uint8_t index = USB_Map_Ep_To_Struct_Index(controller_ID, ep_num);&lt;/P&gt;&lt;P&gt;&amp;nbsp; g_winusb_endpoint_data.ep[index].bin_consumer++;&lt;/P&gt;&lt;P&gt;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;&amp;nbsp; return status;&lt;/P&gt;&lt;P&gt; }&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 25 Feb 2014 00:33:55 GMT</pubDate>
    <dc:creator>chuckh</dc:creator>
    <dc:date>2014-02-25T00:33:55Z</dc:date>
    <item>
      <title>Cancelling USB Transfers</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Cancelling-USB-Transfers/m-p/256592#M7608</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have added a timeout in my code to make sure that my data being sent out on the BULK_IN pipe finishes in a certain time.&amp;nbsp; If it doesn't, I want to abort the transfer (aka flush it from the pipe).&amp;nbsp; I've tried using the USB_DCI_Cancel_Transfer/_usb_device_cancel_transfer() function, but that ooesn't seem to work properly.&amp;nbsp; I would expect that once I call that function, the g_winusb_endpoint_data.ep[index].bin_consumer and g_winusb_endpoint_data.ep[index].bin_producer would once again be equal.&amp;nbsp; I don't think that is the case.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What is the proper way to flush my pipe from my device?&amp;nbsp; Do I need to reset the endpoint somehow?&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Feb 2014 23:48:03 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Cancelling-USB-Transfers/m-p/256592#M7608</guid>
      <dc:creator>chuckh</dc:creator>
      <dc:date>2014-02-24T23:48:03Z</dc:date>
    </item>
    <item>
      <title>Re: Cancelling USB Transfers</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Cancelling-USB-Transfers/m-p/256593#M7609</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I've found that this works.&amp;nbsp; Any reason not to do this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; //Use this to cancel any outgoing USB transfers on a given pipe&lt;/P&gt;&lt;P&gt; uint8_t WinUsbClearSendPipe( uint_8 controller_ID, uint_8 ep_num)&lt;/P&gt;&lt;P&gt; {&lt;/P&gt;&lt;P&gt;&amp;nbsp; uint8_t status = USB_DCI_Cancel_Transfer(controller_ID, ep_num, USB_SEND);&lt;/P&gt;&lt;P&gt;&amp;nbsp; //Attempt to cancel transfer and update the consumer pointer&lt;/P&gt;&lt;P&gt;&amp;nbsp; if(status == USB_OK)&lt;/P&gt;&lt;P&gt;&amp;nbsp; {&lt;/P&gt;&lt;P&gt;&amp;nbsp; uint8_t index = USB_Map_Ep_To_Struct_Index(controller_ID, ep_num);&lt;/P&gt;&lt;P&gt;&amp;nbsp; g_winusb_endpoint_data.ep[index].bin_consumer++;&lt;/P&gt;&lt;P&gt;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;&amp;nbsp; return status;&lt;/P&gt;&lt;P&gt; }&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Feb 2014 00:33:55 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Cancelling-USB-Transfers/m-p/256593#M7609</guid>
      <dc:creator>chuckh</dc:creator>
      <dc:date>2014-02-25T00:33:55Z</dc:date>
    </item>
    <item>
      <title>Re: Cancelling USB Transfers</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Cancelling-USB-Transfers/m-p/256594#M7610</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="padding: 0 0 1.0pt 0;"&gt;Hello Chuck,&lt;/P&gt;&lt;P style="padding: 0 0 1.0pt 0;"&gt;&lt;/P&gt;&lt;P style="padding: 0 0 1.0pt 0;"&gt;If the implementation is based on a consumer-producer scheme, it seems to be a valid procedure, just considering that the data that was previously stored on the buffer will not be deleted until overwriting it with a new transaction.&lt;/P&gt;&lt;P style="padding: 0 0 1.0pt 0;"&gt;&lt;/P&gt;&lt;P style="padding: 0 0 1.0pt 0;"&gt;Anyway, if you are implementing a custom application, you could refer to the precompiled examples included on the installation folder, and compare how the transfers are managed.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Hope this will be useful for you.&lt;BR /&gt;Best regards!&lt;BR /&gt;/Carlos&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-----------------------------------------------------------------------------------------------------------------------&lt;BR /&gt;Note: If this post answers your question, please click the Correct Answer button. Thank you!&lt;BR /&gt;-----------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Mar 2014 22:13:49 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Cancelling-USB-Transfers/m-p/256594#M7610</guid>
      <dc:creator>CarlosCasillas</dc:creator>
      <dc:date>2014-03-03T22:13:49Z</dc:date>
    </item>
  </channel>
</rss>

