Reset problem
Reset problem
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.
There are two ways to force a re-enumeration after a watchdog reset:
Please note that (2) is not completely standard compliant since only the host or hub may issue USB Reset, not the device.
- 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.
- 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.