Page 1 of 1
Is USB_CFG_MAX_BUS_POWER critical?
Posted: Fri Oct 19, 2012 3:11 am
by xiangrui
Sorry if this has been asked.Is the USB_CFG_MAX_BUS_POWER parameter important? Is there any rule of thumb to estimate it? Thanks.
-Xiangrui
Re: Is USB_CFG_MAX_BUS_POWER critical?
Posted: Fri Oct 19, 2012 2:05 pm
by ulao
level it bee unless you need to borrow more power. There is no "correct entry" it just depends on what you need. For example if you get power exceeded, then up it.
Re: Is USB_CFG_MAX_BUS_POWER critical?
Posted: Sun Oct 21, 2012 2:33 am
by xiangrui
ulao wrote:level it bee unless you need to borrow more power. There is no "correct entry" it just depends on what you need. For example if you get power exceeded, then up it.
So how is that parameter used by the device or host? My understand is it is useful for something since it is a required.
Re: Is USB_CFG_MAX_BUS_POWER critical?
Posted: Sun Oct 21, 2012 4:36 am
by ulao
All it does is throttles the power for your device and reports the usage to the host. For example if you make a device that uses 50ma then why leave the max power at 100. In doing so you just told the host to waste 50ma. So you set 50 for USB_CFG_MAX_BUS_POWER. The second case would be like I mentioned upping the amps. If you design a device that requires 250ma then you need to set USB_CFG_MAX_BUS_POWER to 250.
Re: Is USB_CFG_MAX_BUS_POWER critical?
Posted: Sun Oct 28, 2012 1:49 pm
by Ross_ValuSoft
By setting the configuration variable to 100mA when your load only uses 50mA, you are not using or losing an extra 50mA. The variable does not force your "load" to use an extra 50mA.
However, if you set the variable below what your circuit needs, the host (PC) will refuse to give you more than the current identified by the variable. During development, I set the variable to a generous value, then measure the actual requirements and revise the value with a small safety margin (multiples of 50mA).
Cheers,
Ross