<?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>LPCXpresso IDE中的主题 Re: USB CDC Clear Endpoint</title>
    <link>https://community.nxp.com/t5/LPCXpresso-IDE/USB-CDC-Clear-Endpoint/m-p/535436#M4604</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by togi on Fri Jul 27 04:11:09 MST 2012&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for your reply.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Before I restart the system the serial buffer on the PC is already flushed. Then there must be another problem.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Best regards,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Tom&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 16 Jun 2016 01:41:30 GMT</pubDate>
    <dc:creator>lpcware</dc:creator>
    <dc:date>2016-06-16T01:41:30Z</dc:date>
    <item>
      <title>USB CDC Clear Endpoint</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/USB-CDC-Clear-Endpoint/m-p/535434#M4602</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by togi on Thu Jul 26 09:30:26 MST 2012&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Dear developers,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I build a measurement system with a LPCXpresso 1769 and transfer the sampled data via USBCDC to the PC. Only when the event Callback came on the Endpoint In a new data block is written in the Endpoint Buffer. Control&amp;nbsp; characters are send to the measurement system to start and stop the aquisition. Now I want to reset the Endpoint In buffer before i restart the aquisition. I use the "Clear Buffer" command from the USB command code. But now after a restart of the aquisition there is no event callback on the Endpoint. Without the Clear Buffer command the system works properly. The reason why i would like to reset the buffer is to avoid old data.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for your help,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Best regards Tom&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jun 2016 01:41:28 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/USB-CDC-Clear-Endpoint/m-p/535434#M4602</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-16T01:41:28Z</dc:date>
    </item>
    <item>
      <title>Re: USB CDC Clear Endpoint</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/USB-CDC-Clear-Endpoint/m-p/535435#M4603</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by Tsuneo on Fri Jul 27 02:48:36 MST 2012&lt;/STRONG&gt;&lt;BR /&gt;&lt;HR /&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;STRONG&gt;Quote: &lt;/STRONG&gt;&lt;BR /&gt;Now I want to reset the Endpoint In buffer before i restart the aquisition. I use the "Clear Buffer" command from the USB command code.&lt;/SPAN&gt;&lt;HR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Do you mean you've applied "Clear Buffer" SIE command to the bulk IN endpoint?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;This command is supposed just for OUT endpoints.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;CDC-ACM class driver on PC of major OS (Windows, Linux and MacOSX) always polls bulk IN pipe, regardless that PC application reads RX COM port or not. Therefore, when your firmware stops writing to the bulk IN endpoint, the bulk IN endpoint buffer goes empty within two or three USB frames, even considering of double buffering. You may confirm buffer empty, applying "Select Endpoint" SIE command, at B_1_FULL/B_2_FULL bits.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Rather, you have to flush the input buffer on the PC class driver.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;For Windows, Win32 API: PurgeComm( PURGE_RXCLEAR ), .NET: SerialPort.DiscardInBuffer&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Tsuneo&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jun 2016 01:41:29 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/USB-CDC-Clear-Endpoint/m-p/535435#M4603</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-16T01:41:29Z</dc:date>
    </item>
    <item>
      <title>Re: USB CDC Clear Endpoint</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/USB-CDC-Clear-Endpoint/m-p/535436#M4604</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by togi on Fri Jul 27 04:11:09 MST 2012&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for your reply.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Before I restart the system the serial buffer on the PC is already flushed. Then there must be another problem.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Best regards,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Tom&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jun 2016 01:41:30 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/USB-CDC-Clear-Endpoint/m-p/535436#M4604</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-16T01:41:30Z</dc:date>
    </item>
  </channel>
</rss>

