Hai Great Keil Forum Support Team.
How much currant could drive my USB port? Kindly advice to avoid damaged for the usb port..if I'm not wrong the Voltage around 5 VDC and 4 VDC.
Regards Jeckson
A more direct answer should be NO More than 500 milliamps. Bradford
During enumeration, the maximum that can be negotiated is 500mA;
Before enumeration, the maximum allowed is 100mA.
There are also limits on the maximum "apparent" capacitance - to limit the "inrush" at startup...
This one has always puzled me. Some time ago I did a little research on the matter with no outcome at all. An USB powered external USB HDD would not power up when connecting to an notebooks USB port. Wheras it run smoothly from a Desktop. I kicked the same walls here and there and finally opted to external-power it with an AC adapter. On that event I was told to look in Control Panel and see the current reported by the HUB...
Just want to document some more in hope somebody "hardware inclined" can give us all a good explanation. I have tried attaching a picture with XP reporting 100 mA current for an wireless mouse and 2 mA, that is right, only 2 mA for an external 320 Gb USB SATA HDD while it is being defragmented. I do not believe what the OS is reporting. You look and see. In This same Notebook now, I have connected 3 USB HDD simultaneously + Wireless mouse just to test, all running smoothly.
I really do not think it is Descriptor side fixed because the same drive that reports 2 mA here, will not power up on my USB enabled DVD player at home ( must use AC adapter ). It is somehow, misteriously driven from the motherboard side, whatever.
Interesting if someone can dig more in this topic. Thank you.
Greetings Francisco
The USB spec states that devices should not draw more than 100mA without negotiation; and 500mA is the limit after negotiation. (I think USB-3 might be higher?)
But many products - especially cheap "gadgets" - ignore this and just try to pull whatever power they want.
Also, not all hosts enforce the limit - so non-compliant devices will "work" (sic) with these hosts.
As you should be able to imagine, a laptop is a "power constrained" device - so it is much more likely that "hungry" devices will not work on a laptop (this is often noted in the user instructions).
If your device is properly compliant, and your laptop will not meet its power requirements, then you need to use a powered hub to provide the power. (again, this is often noted in the user instructions).
Note that some USB-HDD adaptors need an external PSU for certain drive types - check the user instructions for details.
I rather doubt that (most) hosts or hubs actually measure the current drawn by devices - I suspect that they are simply reporting the information from the Descriptors...
"...ignore this and just try to pull whatever power they want"
This is, unfortunately, also true of a number of "application notes" published by certain semiconductor vendors who really should know better!
:-(
"The USB spec states that devices should not draw more than 100mA without negotiation; and 500mA is the limit after negotiation."
I was looking at this in the USB spec recently, and what it does not say is: what happens if the negotiation fails?!
If the high-power negotiation fails, is the device considered to be configured as a low-power device? Or does it have to re-start the negotiation from scratch as a low-power device? Or what??
The devices we implement have a USB host that always allows 500mA without need for negotiation. And the actual current-controlling chip will react around 700-900mA depending on temperature and tolerances - if too much current is drawn, then the voltage is removed until the load has been removed, or we power off/on the power to the USB connector under program control.
I think a lot of other USB host devices do allow extra current, that can make a non-conforming USB device function even when the device is too hungry.
My USB-to-IDE adapters and cables to 2.5" HDD enclosures always have two connectors. One extra connector just to be able to pick up current from more than one USB port. On some machines, I can use a normal cable, or the splitter cable without the extra connector attached. On the machines that do care about current consumption, I do have to use an extra USB connector.
USB is a bit funny, in that it is on one hand a replacement for older RS232 devices. But it is at the same time a "standard" power-supply connector for a lot of devices. You have reading lamps to your laptop. Small fans. Heaters for your coffe cup. Background lights in mouse pads. Battery chargers. The list of different items just using USB for power can be made almost infinitely long. And most of these gadgets don't have any real USB logic inside. So when power isn't a real problem on the host side, it is normally easier to just let the host supply some power with some kind of auto-reset fuse or quite forgiving current limiter.
Indeed - but what should a conforming device do if it wants to continue in low-poewr mode after the host refuses its high-power request??
A USB Host seldom provides fractional power. Usually it's 100 mA for a low power device or 500 mA for a high power device. If the Window's driver detects an overload, it will dis-connect and re-enumeration is required.
A well defined device will drop the power to the pull-up resistors and then re-apply power to force a dis-connect and re-connect. Most Window USB drivers will flash a screen informing of the power overload.
The LPC2378 type devices can hold off the pull-up enable under software control to allow the power to intialize and settle before initiating enumeration. If the device can be operated in a lower power mode, then the decision could be made prior to the re-enumeration. Bradford
Yes, I can see that could be done - but my quesion was, what should be done?
What is the preferred approach to this?
> If the high-power negotiation fails, is the device considered to be configured as a low-power device?
No. When a device requests more than one unit load (100mA) on its config descriptor, bMaxPower field, and when Windows and Mac don't accept it, OS stop enumeration in half, and put power-supply overflow warning dialog. There is no way for the device to know the enumeration stops. Just custom device driver solves this problem.
Linux doesn't check config descriptor, and it allows ANY config.
Tsuneo
In addition to above post,
USB spec regulates that root hub (ie. PC USB port) and self-powered hub should supply five unit load (500 mA). Just bus-powered hub is limited to one unit load (100mA). Therefore, above accident occurs just on bus-powered hub.
Hub answers to host about its power supply status with GetStatus( DEVICE ) request from the host. But most of hubs on the market always answer to the inquiry as self-powered, even when it is actually bus-powered. Just hubs with "USB logo" obey the rule. Therefore, above situation doesn't occur so often in the real world.
In this reason, a custom device driver is rarely made to solve above problem. Manufacturers of high-power devices just write to their user's manual as follows, when user sees power-supply overflow warning dialog, connect the device to self-powered hub.