Page 1 of 1
My Project Stop from working after some hour
Posted: Thu Aug 09, 2007 6:21 pm
by Behzad-khazama
With Special Thanks for your free firmware .
I have built an project with using this firmware without any problem .
I have used libusb an vb6 in computer side . but some time and in some mainbord after some hour my application can not find the device and I have to disconnect usb cable and replug it again or restart windows to solve the problem . can u help me about have can i solve this problem ? my hardware use usb power .
Posted: Fri Aug 10, 2007 10:41 am
by behzad-khazama
two questions,
what is the difernce between external power or usb powering ? my application use usb power but it can work with both mode.
and second question : for bus current limitation I have set current cunsumption to 100 instead your default (20) . how many is the limitation of this number ? for example can i set it to 500 ?
Posted: Wed Aug 15, 2007 9:26 pm
by behzad-khazama
Why you do not answer my questions ?
Posted: Thu Aug 16, 2007 11:03 am
by christian
Sorry, I've somehow overlooked your posting...
Regarding the first question: If the device stops working after some hours, it probably had a RESET due to EMI, brownout or whatever. If the host does not detect this RESET, it won't re-enumerate the device and the device-ID won't match.
There are two ways to cope with this. First try to make your circuit EMI-proof as much as possible. And second add 500 ms of USB disconnect condition at the beginning of main(). See the latest version of PowerSwitch for an example.
Regarding the second question: Self-powered devices don't use any power from the USB bus and the host does not need to add them in the maximum power estimate. Bus powered devices are summed up on a per interface basis. One USB host interface can deliver up to 500 mA. If your device consumes all of it, you can't add any other devices with a bus-powered hub or you have to add an externally powered hub.