USB enumeration

Hi all,

I am studying the USB Gadget driver for xxxx device , the linux version is 2.6.14. I have some doubts regarding the USB enumeration, please clarify me

1.Whenever a USB DEVICE connected, is it possible to draw more than 100mA(i.e 500mA) ?How the HOST will restrict the device to draw only 100mA till the enumeration? 2.How the DEVICE will come to know the host is not able to provide the asked current i.e the bMaxPower value in Configuration Descriptor? 3.If Driver is not installed in the DEVICE, upon connecting the DEVICE to HOST, HOST will send the request packets but the device will not respond. after some time I am loading the device driver then the DEVICE will be dectected by the HOST. How the HOST will know about the device after the first enumeration failure?Is it going to ping the device periodically?

Thanks and regards prasanna keragodu

Reply to
Loading thread data ...

According to the USB spec, no, the device must not draw more than 100 mA before enumeration and configuration.

Some clever power control in the host controller does it.

The host will not send a SET_CONFIGURATION message to the device, which means the device never configures and enumeration does not complete. Also, the host operating system will throw up a message box saying, "device needs too much power ...." so the user knows it is not enumerated.

If no driver is found, the host will stop sending requests to the device because it doesn't know what to do. Instead, it asks the user to provide a suitable driver. Once a proper driver is loaded, enumeration continues.

The host is in charge of the enumeraton! The device simply responds to host requests.

Really, you should consider actually reading the USB spec. All of your questions would have been answered.


Reply to
Andy Peters

To be fully compliant with the spec, then no, the device is not allowed to draw more than 100mA until after enumeration/configuration.

In reality, some hosts implement a cutoff/over-current warning for

100mA and some hosts do not. This means that it is sometimes POSSIBLE to draw significantly more than 100mA during enumeration. A device which draws that much current during enumeration is not a USB compliant device and should fail USB logo testing.

If you are using this device with an uncontrolled host (i.e., whatever host a customer feels like using), then you had better have a back up plan - batteries, wall wart, etc.

Note also that any hub without its own power supply (it gets its power from the USB) is likely to be a problem because of the limitted power available, especially if the hub is providing power to other devices.

Reply to

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.