Page 1 of 1

Reset problem

Posted: Tue Nov 21, 2006 3:34 pm
by shaoziyang
When watchdog reset a AVR_USB device, mcu will go on work after reset. Windows will lost this USB device when mcu reset, and will not find device again because D- line's resistance not change.

Posted: Tue Nov 21, 2006 4:58 pm
by christian
There are two ways to force a re-enumeration after a watchdog reset:
  1. Connect the pull-up resistor to a port pin instead of +3.3V and take this port pin low for a while during startup. The driver has provisions for this technique with the usbDeviceConnect() and usbDeviceDisconnect() macros.
  2. If you don't want to spend an additional port pin, just pull D+ and D- to low during startup and hold them low for a while. This will indicate USB Reset to the host and cause re-enumeration. Most of the reference designs use this technique.

Please note that (2) is not completely standard compliant since only the host or hub may issue USB Reset, not the device.

Posted: Thu Nov 23, 2006 4:13 pm
by shaoziyang
I use (2), and windows will find device again. But user's PC application need to reopen USB device.

In this case, if user's software send usb_control_msg function fail, it maybe device reset or function fail.