<?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: LPC4330 USB device response to IN bulk endpoint in LPC Microcontrollers</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC4330-USB-device-response-to-IN-bulk-endpoint/m-p/687661#M27726</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I am struck with this issue. Please let me know your inputs.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rgds,&lt;/P&gt;&lt;P&gt;Venkat.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 25 May 2017 03:40:02 GMT</pubDate>
    <dc:creator>venkatvallapane</dc:creator>
    <dc:date>2017-05-25T03:40:02Z</dc:date>
    <item>
      <title>LPC4330 USB device response to IN bulk endpoint</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC4330-USB-device-response-to-IN-bulk-endpoint/m-p/687660#M27725</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I have set USB1 as device with IN and OUT bulk endpoints.&lt;/P&gt;&lt;P&gt;When PC requests URB_BULK in packet with URB length as 0x583e0, my response is only 0xf000 (I respond using WriteEP method).&lt;/P&gt;&lt;P&gt;When I look at my response packet, I see that URB length is 0xf000 and data length is 0xf000.&lt;/P&gt;&lt;P&gt;I expect URB length to be 0x583e0 and data length as 0xf000.&lt;/P&gt;&lt;P&gt;Please let me know why URB length is changed to actual length from the requested length.&lt;/P&gt;&lt;P&gt;Looks like my app (which is a pre-compiled library from 3rd party) expects URB length as requested length in response.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;On side-note, I noticed that if number of bytes to write is 0x8000 to WriteEP function, it is sending null packet!&lt;/P&gt;&lt;P&gt;so my response of 0xf000, I split to three packets: First I caled WriteEP with 0x7FC0 as number of bytes to write and in my EP handler, I called WriteEP with 0x7040 and then WriteEP with 0x0 (null packet to terminate).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;// My EP handler function...&lt;/P&gt;&lt;P&gt;// First WriteEP with 0x7FC0 happens somewhere else in the core before URB_BULK in packet&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; static uint8_t pkt_cnt = 0;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;if(pkt_cnt == 0) {&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;USBD_API-&amp;gt;hw-&amp;gt;WriteEP(hUsb, 0x82, g_data+0x7FC0,0x7040);&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;pkt_cnt++;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;} else if(pkt_cnt == 1) {&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;USBD_API-&amp;gt;hw-&amp;gt;WriteEP(hUsb, 0x82, g_data,0x0);&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;pkt_cnt++;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;} else {&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;pkt_cnt = 0;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;}&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;return LPC_OK;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rgds,&lt;/P&gt;&lt;P&gt;Venkat.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 May 2017 02:35:24 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC4330-USB-device-response-to-IN-bulk-endpoint/m-p/687660#M27725</guid>
      <dc:creator>venkatvallapane</dc:creator>
      <dc:date>2017-05-22T02:35:24Z</dc:date>
    </item>
    <item>
      <title>Re: LPC4330 USB device response to IN bulk endpoint</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC4330-USB-device-response-to-IN-bulk-endpoint/m-p/687661#M27726</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I am struck with this issue. Please let me know your inputs.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rgds,&lt;/P&gt;&lt;P&gt;Venkat.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 May 2017 03:40:02 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC4330-USB-device-response-to-IN-bulk-endpoint/m-p/687661#M27726</guid>
      <dc:creator>venkatvallapane</dc:creator>
      <dc:date>2017-05-25T03:40:02Z</dc:date>
    </item>
    <item>
      <title>Re: LPC4330 USB device response to IN bulk endpoint</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC4330-USB-device-response-to-IN-bulk-endpoint/m-p/687662#M27727</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;SPAN class=""&gt;&lt;A _jive_internal="true" data-content-finding="Community" data-userid="298078" data-username="venkatvallapaneni" href="https://community.nxp.com/people/venkatvallapaneni"&gt;Venkat Vallapaneni&lt;/A&gt;&lt;/SPAN&gt;,&lt;/P&gt;&lt;DIV style="color: #000000; font-family: 微软雅黑; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 1; word-spacing: 0px; -webkit-text-stroke-width: 0px; font-size: 16px; line-height: 1.5; background-color: #ffffff;"&gt;&lt;SPAN style="background-color: #ffffff;"&gt;Thank you for your interest in NXP Semiconductor products and&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV style="color: #000000; font-family: 微软雅黑; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 1; word-spacing: 0px; -webkit-text-stroke-width: 0px; font-size: 16px; line-height: 1.5; background-color: #ffffff;"&gt;&lt;SPAN style="background-color: #ffffff;"&gt;the opportunity to serve you.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV style="color: #000000; font-family: 微软雅黑; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 1; word-spacing: 0px; -webkit-text-stroke-width: 0px; font-size: 16px; line-height: 1.5; background-color: #ffffff;"&gt;&lt;SPAN style="background-color: #ffffff;"&gt;I'd like to know what demo and board you use and I was wondering if you can share your testing demo and app, then I can replicate the issue on my site.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV style="color: #000000; font-family: 微软雅黑; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 1; word-spacing: 0px; -webkit-text-stroke-width: 0px; font-size: 16px; line-height: 1.5; background-color: #ffffff;"&gt;&lt;SPAN style="background-color: #ffffff;"&gt;I'm looking forward to your reply.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV style="color: #000000; font-family: 微软雅黑; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 1; word-spacing: 0px; -webkit-text-stroke-width: 0px; font-size: 16px; line-height: 1.5; background-color: #ffffff;"&gt;Have a great day,&lt;/DIV&gt;&lt;P&gt;TIC&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>Fri, 26 May 2017 06:35:15 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC4330-USB-device-response-to-IN-bulk-endpoint/m-p/687662#M27727</guid>
      <dc:creator>jeremyzhou</dc:creator>
      <dc:date>2017-05-26T06:35:15Z</dc:date>
    </item>
    <item>
      <title>Re: LPC4330 USB device response to IN bulk endpoint</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC4330-USB-device-response-to-IN-bulk-endpoint/m-p/687663#M27728</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I am using NGX LPC4330 Xplorer board.&lt;/P&gt;&lt;P&gt;I am attaching my LPC4330 project, sample PC application c code using libusb-1.0 and wireshark USB trace.&lt;/P&gt;&lt;P&gt;LPC project: usb_test&lt;/P&gt;&lt;P&gt;C code for PC: usbd/usbtr.c&lt;/P&gt;&lt;P&gt;USB trace from wireshark: usb_traces/usb_test.pcapng&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you see wireshark trace, you would notice that URB length from host to device for URB_BULK IN is 361440 (0x583E0). But response packet from device to host is having URB length as 61440 (0xf000).&lt;/P&gt;&lt;P&gt;Please note that my data length in response is also 0xf000.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But what I want in response packet is: URB length matching request packet (which is 0x583E0) and data length is 0xf000 (as I respond with these many bytes).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please let me know if you need further information regarding this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rgds,&lt;/P&gt;&lt;P&gt;Venkat.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 27 May 2017 08:36:23 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC4330-USB-device-response-to-IN-bulk-endpoint/m-p/687663#M27728</guid>
      <dc:creator>venkatvallapane</dc:creator>
      <dc:date>2017-05-27T08:36:23Z</dc:date>
    </item>
    <item>
      <title>Re: LPC4330 USB device response to IN bulk endpoint</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC4330-USB-device-response-to-IN-bulk-endpoint/m-p/687664#M27729</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A class="jx-jive-macro-user" href="https://community.nxp.com/people/jeremyzhou"&gt;jeremyzhou&lt;/A&gt;‌,&lt;/P&gt;&lt;P&gt;Any update for me on this? I am struck in my project because of this issue.&lt;/P&gt;&lt;P&gt;Any update on this is highly appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also, is it possible to have a local NXP contact (I am in Bangalore, India) for supporting this issue?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rgds,&lt;/P&gt;&lt;P&gt;Venkat.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 31 May 2017 18:09:30 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC4330-USB-device-response-to-IN-bulk-endpoint/m-p/687664#M27729</guid>
      <dc:creator>venkatvallapane</dc:creator>
      <dc:date>2017-05-31T18:09:30Z</dc:date>
    </item>
    <item>
      <title>Re: LPC4330 USB device response to IN bulk endpoint</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC4330-USB-device-response-to-IN-bulk-endpoint/m-p/687665#M27730</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;SPAN class=""&gt;&lt;A _jive_internal="true" class="" data-content-finding="Community" data-userid="298078" data-username="venkatvallapaneni" href="https://community.nxp.com/people/venkatvallapaneni"&gt;Venkat Vallapaneni&lt;/A&gt;&lt;/SPAN&gt;,&lt;/P&gt;&lt;P&gt;I had already escalated the question, and USB expert will reply later.&lt;/P&gt;&lt;P&gt;Thanks for patient.&lt;BR /&gt;Have a great day,&lt;BR /&gt;TIC&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>Thu, 01 Jun 2017 01:50:23 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC4330-USB-device-response-to-IN-bulk-endpoint/m-p/687665#M27730</guid>
      <dc:creator>jeremyzhou</dc:creator>
      <dc:date>2017-06-01T01:50:23Z</dc:date>
    </item>
    <item>
      <title>Re: LPC4330 USB device response to IN bulk endpoint</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC4330-USB-device-response-to-IN-bulk-endpoint/m-p/687666#M27731</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;A class="jx-jive-macro-user" href="https://community.nxp.com/people/jeremyzhou"&gt;jeremyzhou&lt;/A&gt;,&lt;/P&gt;&lt;P&gt;Any update on this?&lt;/P&gt;&lt;P&gt;For now, I got an work around for this problem.&lt;/P&gt;&lt;P&gt;But I have one question to implement the work around:&lt;/P&gt;&lt;P&gt;Is there any callback when BULK IN transfer is received by the device?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I see that endpoint handler is called only after BULK IN is completed.&lt;/P&gt;&lt;P&gt;I would like to know when it is initiated by PC (USB host) and with what size?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rgds,&lt;/P&gt;&lt;P&gt;Venkat.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Jun 2017 03:41:20 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC4330-USB-device-response-to-IN-bulk-endpoint/m-p/687666#M27731</guid>
      <dc:creator>venkatvallapane</dc:creator>
      <dc:date>2017-06-09T03:41:20Z</dc:date>
    </item>
    <item>
      <title>Re: LPC4330 USB device response to IN bulk endpoint</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC4330-USB-device-response-to-IN-bulk-endpoint/m-p/687667#M27732</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;SPAN class=""&gt;&lt;A _jive_internal="true" class="" data-content-finding="Community" data-userid="298078" data-username="venkatvallapaneni" href="https://community.nxp.com/people/venkatvallapaneni"&gt;Venkat Vallapaneni&lt;/A&gt;&lt;/SPAN&gt;,&lt;/P&gt;&lt;P&gt;I hasn't received any updates until now, and I'd like to escalate your question, so I was wondering if you can describe your question in details again.&lt;BR /&gt;Have a great day,&lt;BR /&gt;TIC&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>Fri, 09 Jun 2017 06:54:23 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC4330-USB-device-response-to-IN-bulk-endpoint/m-p/687667#M27732</guid>
      <dc:creator>jeremyzhou</dc:creator>
      <dc:date>2017-06-09T06:54:23Z</dc:date>
    </item>
  </channel>
</rss>

