FX3™ Self-Powered Design Does Not Enumerate Successfully when Plugged into Bus-Powered Hub - KBA218816

Version: **

 

Question:

Self-powered design does not enumerate successfully when it is plugged into a bus-powered hub. 

 

Answer:

You should modify the configuration descriptor’s bmAttributes and bMaxPower fields according to the standard configuration descriptor section of USB 2.0 Spec.

The following descriptor is sample snippets of firmware code of configurations descriptor. 

/* Configuration descriptor */                                            

    0x09,                                            /* Descriptor size */

    CY_U3P_USB_CONFIG_DESCR,        /* Configuration descriptor type */  

    0x39,0x00,                                   /* Length of this descriptor and all sub descriptors*/

    0x01,                                            /* Number of interfaces */

    0x01,                                            /* Configuration number */

    0x00,                                            /* COnfiguration string index */

    0xC0,                                            /* Config characteristics - Self powered */

    0x0A,                                            /* Max power consumption of device (in 8mA unit) :*/

Cypress’s FX3 example code is only for bus-powered design. You must modify the configuration descriptor related to the self-powered design to have the device enumerate successfully when it is plugged into a bus-powered hub. This happens because the bus-powered hub disables the port if the device request for more than 100 mA in the configuration descriptor.