Page 1 of 1

Operation without an USB master - driver hangs

Posted: Wed May 12, 2010 3:13 pm
by AntonG
Dear V-USB team and developers,

I have a problem here I cannot find any solution for. I have searched the forum as well as documentation but haven't found a solution.

The problem is as follows: if my device is connected via USB to the disconnected from mains PC, it hangs. With USB disconnected, or powered (but turned off) PC everything works fine.

The board (ATmega8) is powered externally with 5V (well, 4.3-4.5 V). I use 3.6V Zener diodes on D+ and D- lines, 1k5 pullup on D-, 1M pulldown on D+. D+ is connected to PD4, D- to PD3 (INT1). Of course there is 62 Ohms in series on both lines. INT0 is not used, driver is configured to use INT1.
I'm using D- as interrupt source in order to detect lost connection and reset USB - EMI workaround.

Everything works save for the mentioned case. I suppose it has something to do with this:
Operation without an USB master:
The driver behaves neutral without connection to an USB master if D- reads
as 1. ...<cut>... . If D- becomes statically 0, the driver may block in the
interrupt routine.


The thing is that D- is 0 in the described case. Is there some way to workaround it either in the hardware or software? Any suggestions are highly appreciated!