<?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 host resets my device after 'get configuration descriptor' in LPC Microcontrollers</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/USB-host-resets-my-device-after-get-configuration-descriptor/m-p/524890#M7526</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by siangming on Sat Dec 13 01:09:02 MST 2014&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;hi all&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;i am using a LPC11U37H to implement a USB 2.0 full-speed device...i am going to implement it with a winusb driver on a windows 7 host pc.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Right now, i am getting a host reset after the 'get configuration descriptor' request.. the request is asking for a 255 bytes data payload.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;i have only 1 configuration, 1 interface and 1 endpoint (excluding endpoint 0 IN and OUT). so i send my configuration as below:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;typedef struct{&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;unsigned char bLength;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;unsigned char bDescriptorType;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;unsigned short int wTotalLength;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;unsigned char bNumInterfaces;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;unsigned char bConfigurationValue;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;unsigned char iConfiguration;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;unsigned char bmAttributes;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;unsigned char bMaxPower;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;unsigned char bLength_interface;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;unsigned char bDescriptor_Typeinterface;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;unsigned char bInterfaceNumber;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;unsigned char bAlternateSetting;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;unsigned char bNumEndpoints;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;unsigned char bInterfaceClass;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;unsigned char bInterfaceSubclass;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;unsigned char bInterfaceProtocol;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;unsigned char iInterface;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;unsigned char bLength0;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;unsigned char bDescriptorType0;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;unsigned char bEndpointAddress0;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;unsigned char bmAttributes0;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;unsigned short wMaxPacketSize0;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;unsigned char bInterval0;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;} getconfig_descriptor;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;getconfig_descriptor My_getconfig_desc = {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;9,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;2,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;25, //total length of descriptor and subordinate descriptors&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;1, //number of interface&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;1, //configuration number, must be above 00. 00 = not configured.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;0, //no string descriptor&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;0b11000000, //self-powered, NO remote wakeup&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;0x32, //100mA current&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;9,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;4,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;0, //interface number&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;0, //default alternate setting&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;1, //number of physical endpoints (excluding EP0)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;0xFF, //interface class&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;0, //interface subclass&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;0, //interface protocol&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;0, //no string descriptor&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;7,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;5,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;0b10000001, //IN, logical endpoint address&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;0b00000011, //attributes: interrupt endpoint&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;64, //Maxpacketsize&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;0x64 //100ms max latency&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;};&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;After the setup request from the host,&amp;nbsp; i checked that the endpoint0 IN (data stage) and endpoint0 OUT (status stage) completed sucessfully because my endpoint0 IN interrupts fired off and i checked that NBytes are 0, meaning all 255 bytes of data are sent to the host. My endpoint0 OUT interrupt also fired off, meaning i received a ZLP status (stage completion) from the host.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;(for the 255 bytes of data to send, i fill up the first 25bytes of the buffer with my structure above and the remaining of the 230 bytes with 0.)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;i am thinking there must be something wrong with my descriptors since there is no other reason for the host to reset my device.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;can anyone help check my descriptors above?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Note: i did not supply my INF file to the win7 host yet before i plugged in my device.... on the host, i get a 'device not recognised' message after i plugged in the device.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;But i guess the INF file does not matter because i supposed if the enumeration went ok, i should see a message asking for drivers if the INF is not found...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;thanks&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 15 Jun 2016 16:51:18 GMT</pubDate>
    <dc:creator>lpcware</dc:creator>
    <dc:date>2016-06-15T16:51:18Z</dc:date>
    <item>
      <title>USB host resets my device after 'get configuration descriptor'</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/USB-host-resets-my-device-after-get-configuration-descriptor/m-p/524890#M7526</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by siangming on Sat Dec 13 01:09:02 MST 2014&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;hi all&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;i am using a LPC11U37H to implement a USB 2.0 full-speed device...i am going to implement it with a winusb driver on a windows 7 host pc.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Right now, i am getting a host reset after the 'get configuration descriptor' request.. the request is asking for a 255 bytes data payload.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;i have only 1 configuration, 1 interface and 1 endpoint (excluding endpoint 0 IN and OUT). so i send my configuration as below:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;typedef struct{&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;unsigned char bLength;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;unsigned char bDescriptorType;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;unsigned short int wTotalLength;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;unsigned char bNumInterfaces;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;unsigned char bConfigurationValue;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;unsigned char iConfiguration;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;unsigned char bmAttributes;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;unsigned char bMaxPower;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;unsigned char bLength_interface;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;unsigned char bDescriptor_Typeinterface;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;unsigned char bInterfaceNumber;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;unsigned char bAlternateSetting;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;unsigned char bNumEndpoints;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;unsigned char bInterfaceClass;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;unsigned char bInterfaceSubclass;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;unsigned char bInterfaceProtocol;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;unsigned char iInterface;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;unsigned char bLength0;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;unsigned char bDescriptorType0;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;unsigned char bEndpointAddress0;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;unsigned char bmAttributes0;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;unsigned short wMaxPacketSize0;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;unsigned char bInterval0;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;} getconfig_descriptor;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;getconfig_descriptor My_getconfig_desc = {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;9,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;2,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;25, //total length of descriptor and subordinate descriptors&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;1, //number of interface&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;1, //configuration number, must be above 00. 00 = not configured.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;0, //no string descriptor&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;0b11000000, //self-powered, NO remote wakeup&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;0x32, //100mA current&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;9,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;4,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;0, //interface number&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;0, //default alternate setting&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;1, //number of physical endpoints (excluding EP0)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;0xFF, //interface class&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;0, //interface subclass&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;0, //interface protocol&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;0, //no string descriptor&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;7,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;5,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;0b10000001, //IN, logical endpoint address&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;0b00000011, //attributes: interrupt endpoint&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;64, //Maxpacketsize&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;0x64 //100ms max latency&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;};&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;After the setup request from the host,&amp;nbsp; i checked that the endpoint0 IN (data stage) and endpoint0 OUT (status stage) completed sucessfully because my endpoint0 IN interrupts fired off and i checked that NBytes are 0, meaning all 255 bytes of data are sent to the host. My endpoint0 OUT interrupt also fired off, meaning i received a ZLP status (stage completion) from the host.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;(for the 255 bytes of data to send, i fill up the first 25bytes of the buffer with my structure above and the remaining of the 230 bytes with 0.)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;i am thinking there must be something wrong with my descriptors since there is no other reason for the host to reset my device.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;can anyone help check my descriptors above?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Note: i did not supply my INF file to the win7 host yet before i plugged in my device.... on the host, i get a 'device not recognised' message after i plugged in the device.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;But i guess the INF file does not matter because i supposed if the enumeration went ok, i should see a message asking for drivers if the INF is not found...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;thanks&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 16:51:18 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/USB-host-resets-my-device-after-get-configuration-descriptor/m-p/524890#M7526</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T16:51:18Z</dc:date>
    </item>
    <item>
      <title>Re: USB host resets my device after 'get configuration descriptor'</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/USB-host-resets-my-device-after-get-configuration-descriptor/m-p/524891#M7527</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by capiman on Sat Dec 13 02:45:26 MST 2014&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Have you tried usbview?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;It displays the descriptor which were received by windows.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;If I remember correctly it does some checks (at least length checks) on config descriptor.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Do you perhaps have a USB analyzer where you can check if you really have sent what you have implemented.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Is perhaps alignment a problem?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Have you checked if sizeof(My_getconfig_desc) delivers the correct value?&lt;/SPAN&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 16:51:19 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/USB-host-resets-my-device-after-get-configuration-descriptor/m-p/524891#M7527</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T16:51:19Z</dc:date>
    </item>
    <item>
      <title>Re: USB host resets my device after 'get configuration descriptor'</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/USB-host-resets-my-device-after-get-configuration-descriptor/m-p/524892#M7528</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 Sat Dec 13 06:56:45 MST 2014&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;my endpoint0 IN interrupts fired off and i checked that NBytes are 0, meaning all 255 bytes of data are sent to the host.&lt;/SPAN&gt;&lt;HR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;As Windows request "255 bytes" for the config descriptor by Get_Descriptor, you have coded to send just this requested size, with padding. But in USB practice, when Get_Descriptor would request more than the target descriptor size, the device should return just the size of the descriptor. No padding is required.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;I&gt;&lt;STRONG&gt;9.4.3 Get Descriptor&lt;/STRONG&gt; on USB2.0 spec&lt;BR /&gt;If the descriptor is shorter than the wLength field, the device indicates the end of the control transfer by sending a short packet when further data is requested.&lt;/I&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Tsuneo&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 16:51:20 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/USB-host-resets-my-device-after-get-configuration-descriptor/m-p/524892#M7528</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T16:51:20Z</dc:date>
    </item>
    <item>
      <title>Re: USB host resets my device after 'get configuration descriptor'</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/USB-host-resets-my-device-after-get-configuration-descriptor/m-p/524893#M7529</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 Sat Dec 13 07:44:17 MST 2014&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;In addition to above post,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;HR /&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;STRONG&gt;Quote: &lt;/STRONG&gt;&lt;BR /&gt;typedef struct{...} getconfig_descriptor;&lt;/SPAN&gt;&lt;HR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Is this struct a "packed" one?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;GCC: __attribute__ ((__packed__))&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Keil, IAR: __packed&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;What is the bMaxPacketSize0 on the device descriptor?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;For full-speed, 8, 16, 32 or 64 bytes are allowed for bMaxPacketSize0.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;As we discussed on your another post&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.nxp.com/external-link.jspa?url=http%3A%2F%2Fwww.lpcware.com%2Fcontent%2Fforum%2Fsetting-endpoint-maxpacketsize-lpc11u37h" rel="nofollow" target="_blank"&gt;http://www.lpcware.com/content/forum/setting-endpoint-maxpacketsize-lpc11u37h&lt;/A&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;your firmware has to manage MPS (Max Packet Size).&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;If you would assign 32 or 64 to bMaxPacketSize0, 25 bytes config descriptor is sent by single transaction of this size. But for 8 or 16, your firmware has to split the 25 bytes into 4 (8,8,8,1) or 2 (16, 9) transactions.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Tsuneo&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 16:51:20 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/USB-host-resets-my-device-after-get-configuration-descriptor/m-p/524893#M7529</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T16:51:20Z</dc:date>
    </item>
    <item>
      <title>Re: USB host resets my device after 'get configuration descriptor'</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/USB-host-resets-my-device-after-get-configuration-descriptor/m-p/524894#M7530</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by siangming on Mon Dec 15 00:22:25 MST 2014&lt;/STRONG&gt;&lt;BR /&gt;&lt;HR /&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;STRONG&gt;Quote: Tsuneo&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;my endpoint0 IN interrupts fired off and i checked that NBytes are 0, meaning all 255 bytes of data are sent to the host.&lt;/SPAN&gt;&lt;HR /&gt;&lt;BR /&gt;&lt;BR /&gt;As Windows request "255 bytes" for the config descriptor by Get_Descriptor, you have coded to send just this requested size, with padding. But in USB practice, when Get_Descriptor would request more than the target descriptor size, the device should return just the size of the descriptor. No padding is required.&lt;BR /&gt;&lt;BR /&gt;&lt;I&gt;&lt;STRONG&gt;9.4.3 Get Descriptor&lt;/STRONG&gt; on USB2.0 spec&lt;BR /&gt;If the descriptor is shorter than the wLength field, the device indicates the end of the control transfer by sending a short packet when further data is requested.&lt;/I&gt;&lt;BR /&gt;&lt;BR /&gt;Tsuneo&lt;/SPAN&gt;&lt;HR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;yes, this is the problem... i am sending 255 bytes for 'get configuration descriptor'. after i changed my firmware to only return 25 bytes (configuration descriptor size), the device is able to enumerate fine..&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;thank you.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 16:51:21 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/USB-host-resets-my-device-after-get-configuration-descriptor/m-p/524894#M7530</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T16:51:21Z</dc:date>
    </item>
  </channel>
</rss>

