<?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: CDC Send 128_bytes Failure in Kinetis Microcontrollers</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/CDC-Send-128-bytes-Failure/m-p/651464#M39660</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Mark,&lt;/P&gt;&lt;P&gt;Thank you for your suggestion, 16 bytes the packet does not give, it would be 16 every 10ms of intervals.&lt;BR /&gt;I tried to increase the buffer to 128 did not give it, but for 64 bytes it worked, so until there is a stack with a bigger package I will adapt with this one.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;#undef CIC_NOTIF_ENDP_PACKET_SIZE&lt;BR /&gt;#define CIC_NOTIF_ENDP_PACKET_SIZE (64)&lt;BR /&gt;#undef DIC_BULK_IN_ENDP_PACKET_SIZE&lt;BR /&gt;#define DIC_BULK_IN_ENDP_PACKET_SIZE (64)/* max supported is 64 */&lt;BR /&gt;#undef DIC_BULK_OUT_ENDP_PACKET_SIZE&lt;BR /&gt;#define DIC_BULK_OUT_ENDP_PACKET_SIZE (64)/* max supported is 64*/&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for error buffre &amp;lt; 64 bytes:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;void timer_isr(void){ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1ms&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if ( CDC1_GetCharsInRxBuf() &amp;lt; 64 ) // no read&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;return...&lt;/P&gt;&lt;P&gt;else&lt;/P&gt;&lt;P&gt;CDC1_GetChar....&lt;/P&gt;&lt;P&gt;-----&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks,&lt;/P&gt;&lt;P&gt;Carlos.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 02 Jan 2017 19:56:41 GMT</pubDate>
    <dc:creator>CCandido</dc:creator>
    <dc:date>2017-01-02T19:56:41Z</dc:date>
    <item>
      <title>CDC Send 128_bytes Failure</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/CDC-Send-128-bytes-Failure/m-p/651462#M39658</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;my system to test &amp;nbsp;CDC Kinetis MK20DX256VLL7, with &amp;nbsp;C# VS2013,&amp;nbsp;&lt;/P&gt;&lt;P&gt;whats problems:&amp;nbsp;&lt;/P&gt;&lt;P&gt;send frame 128 bytes &amp;nbsp;ARM/ PC = ok&amp;nbsp;&lt;/P&gt;&lt;P&gt;send frame 16 bytes &amp;nbsp; &amp;nbsp;PC/ARM &amp;nbsp;= ok&amp;nbsp;&lt;/P&gt;&lt;P&gt;send frame &amp;nbsp;32 bytes &amp;nbsp; PC/ARM &amp;nbsp;= OK..failures....OK&lt;/P&gt;&lt;P&gt;send frame 128 bytes &amp;nbsp;PC/ARM &amp;nbsp;=&amp;nbsp;Many failures.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;all buffers in arm = 128 bytes &amp;nbsp;CDC1_DATA_BUFF_SIZE 128 and others.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;simple test: &amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Visual Studio: serialPort1.Write( str_OutBuffer, 0, 128 ); // sendo to ARM&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ARM:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if (CDC1_App_Task(cdc_buffer, sizeof(cdc_buffer))!=ERR_BUSOFF){&lt;BR /&gt; &lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (CDC1_GetCharsInRxBuf()!=0){ &amp;nbsp; // if have bytes received &amp;lt;-------&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; lenth = CDC1_GetCharsInRxBuf(); &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;get numbers bytes in buffer received&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;clear_bufstr( 128); &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;//clear buffer + add ( '\0' )&lt;BR /&gt; val = bytetochar( lenth ); &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;// convert byte to char(X2)&lt;BR /&gt; buf_str[0] = (byte) (val&amp;gt;&amp;gt;8);&lt;BR /&gt; buf_str[1] = (byte) (val);&lt;BR /&gt; buf_str[127]='#';&lt;BR /&gt; WAIT1_Waitms(5);&lt;BR /&gt; CDC1_SendString( buf_str); &amp;nbsp; &amp;nbsp; &amp;nbsp; // send to PC = ok&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;/P&gt;&lt;P&gt;results:&lt;/P&gt;&lt;P&gt;arm received: 0x20,0x80,0x40,0x60,0x10.....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;how to maker protocols to frame 128 bytes ( char/2 = 64 bytes Hex )&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks,&lt;/P&gt;&lt;P&gt;Carlos.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 Dec 2016 13:07:08 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/CDC-Send-128-bytes-Failure/m-p/651462#M39658</guid>
      <dc:creator>CCandido</dc:creator>
      <dc:date>2016-12-30T13:07:08Z</dc:date>
    </item>
    <item>
      <title>Re: CDC Send 128_bytes Failure</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/CDC-Send-128-bytes-Failure/m-p/651463#M39659</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Carlos&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There are a few threads that may be related (I didn't find the one that I was hoping to find where there are also suggested workarounds for some problems, but you could spend some time searching more carefully):&lt;BR /&gt;&lt;A class="jive-link-thread-small" data-containerid="11234" data-containertype="14" data-objectid="430910" data-objecttype="1" href="https://community.nxp.com/thread/430910"&gt;https://community.nxp.com/message/814841&lt;/A&gt;&lt;BR /&gt;&lt;A class="jive-link-thread-small" data-containerid="2019" data-containertype="14" data-objectid="385999" data-objecttype="1" href="https://community.nxp.com/thread/385999?q=virtual%20com"&gt;https://community.nxp.com/thread/385999?q=virtual%20com&lt;/A&gt;&lt;BR /&gt;&lt;A class="jive-link-thread-small" data-containerid="11234" data-containertype="14" data-objectid="387081" data-objecttype="1" href="https://community.nxp.com/thread/387081"&gt;https://community.nxp.com/message/621820&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;If you don't find a solution take a look at &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-K20D72M.html" rel="nofollow" target="_blank"&gt;http://www.utasker.com/kinetis/TWR-K20D72M.html&lt;/A&gt;&lt;BR /&gt;which includes industrial quality USB-CDC operation proven on many Kinetis and Coldfire parts during 8 years of intensive service. Simple to use, allows multiple CDC interfaces at the same time (and multiple CDC to UART bridges with complete end-to-end flow control), plus CDC based RNDIS.&lt;BR /&gt;The complete operation can be simulated to allow reviews and accelerate product development.&lt;BR /&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;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;A class="jive-link-external-small" href="https://community.nxp.com/external-link.jspa?url=http%3A%2F%2Fwww.utasker.com%2Fdocs%2FuTasker%2FuTaskerRNDIS.pdf" rel="nofollow" target="_blank"&gt;http://www.utasker.com/docs/uTasker/uTaskerRNDIS.pdf&lt;/A&gt;&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;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Jan 2017 16:18:25 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/CDC-Send-128-bytes-Failure/m-p/651463#M39659</guid>
      <dc:creator>mjbcswitzerland</dc:creator>
      <dc:date>2017-01-02T16:18:25Z</dc:date>
    </item>
    <item>
      <title>Re: CDC Send 128_bytes Failure</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/CDC-Send-128-bytes-Failure/m-p/651464#M39660</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Mark,&lt;/P&gt;&lt;P&gt;Thank you for your suggestion, 16 bytes the packet does not give, it would be 16 every 10ms of intervals.&lt;BR /&gt;I tried to increase the buffer to 128 did not give it, but for 64 bytes it worked, so until there is a stack with a bigger package I will adapt with this one.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;#undef CIC_NOTIF_ENDP_PACKET_SIZE&lt;BR /&gt;#define CIC_NOTIF_ENDP_PACKET_SIZE (64)&lt;BR /&gt;#undef DIC_BULK_IN_ENDP_PACKET_SIZE&lt;BR /&gt;#define DIC_BULK_IN_ENDP_PACKET_SIZE (64)/* max supported is 64 */&lt;BR /&gt;#undef DIC_BULK_OUT_ENDP_PACKET_SIZE&lt;BR /&gt;#define DIC_BULK_OUT_ENDP_PACKET_SIZE (64)/* max supported is 64*/&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for error buffre &amp;lt; 64 bytes:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;void timer_isr(void){ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1ms&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if ( CDC1_GetCharsInRxBuf() &amp;lt; 64 ) // no read&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;return...&lt;/P&gt;&lt;P&gt;else&lt;/P&gt;&lt;P&gt;CDC1_GetChar....&lt;/P&gt;&lt;P&gt;-----&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks,&lt;/P&gt;&lt;P&gt;Carlos.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Jan 2017 19:56:41 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/CDC-Send-128-bytes-Failure/m-p/651464#M39660</guid>
      <dc:creator>CCandido</dc:creator>
      <dc:date>2017-01-02T19:56:41Z</dc:date>
    </item>
  </channel>
</rss>

