My Project Stop from working after some hour

General discussions about V-USB, our firmware-only implementation of a low speed USB device on Atmel's AVR microcontrollers
Post Reply

My Project Stop from working after some hour

Post by Behzad-khazama » Thu Aug 09, 2007 6:21 pm

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 .


Post by behzad-khazama » Fri Aug 10, 2007 10:41 am

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 ?


Post by behzad-khazama » Wed Aug 15, 2007 9:26 pm

Why you do not answer my questions ? :cry: :roll:

Objective Development
Objective Development
Posts: 1443
Joined: Thu Nov 09, 2006 11:46 am

Post by christian » Thu Aug 16, 2007 11:03 am

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.

Post Reply