Page 1 of 1

Device recognition fails sometimes

Posted: Thu Jul 19, 2007 12:32 am
by Tero
Hi,

Has anybody experienced failed recognition after connecting or resetting AVR? I have about 20% success rate on getting connection. After device is found, the connection seems to work fine without any communication errors, ever. I checked the D+ D- signals with scope and they look fine. I tried also putting small 0.39-1nF filter caps on the lines without any help.

It feels like computer tries to connect the device because the "Device" number rolls constantly when AVR is plugged and has failed to connect (however, D+ D- lines seem to be quiet at the same time!). Output of lsusb -t:

Bus# 5
`-Dev# 1 Vendor 0x0000 Product 0x0000
`-Dev# 4 Vendor 0x0424 Product 0x2504
|-Dev# 98 Vendor 0x56c0 Product 0x15dc <-AVR
`-Dev# 26 Vendor 0x046d Product 0xc016
Bus# 4
`-Dev# 1 Vendor 0x0000 Product 0x0000
Bus# 3
`-Dev# 1 Vendor 0x0000 Product 0x0000
Bus# 2
`-Dev# 1 Vendor 0x0000 Product 0x0000
Bus# 1
`-Dev# 1 Vendor 0x0000 Product 0x0000


Any ideas why recognition may fail?

Posted: Thu Jul 19, 2007 5:41 pm
by Tero
Could the problem be the 16MHz crystal that I'm using (avr-usb is configured & compiled for this freq)? However, I'll get 12MHz and try again.

Posted: Thu Jul 19, 2007 9:47 pm
by christian
Please download a new version of the driver with the PowerSwitch project which will be online tomorrow. The new version is 2007-07-19.

We have fixed a minor quirk with SE0 (end of packet) detection. This might help.

If it does not, please get in contact with us through the support form.

faulty hub ?

Posted: Mon Aug 20, 2007 2:09 pm
by usbcoder
-Dev# 4 Vendor 0x0424 Product 0x2504

Have you tried disconnecting this hub from the bus ?

Posted: Tue Feb 05, 2008 8:56 pm
by christian
It turned out that there was a copy/paste bug in the 15 and 16 MHz modules. This bug affected device enumeration depending on the USB timing.

Please get at least version 2008-02-05 of PowerSwitch for the latest release of AVR-USB which fixes this issue.

Posted: Tue Nov 04, 2008 1:21 am
by lpx
Hi,

In the last couple of weeks i have been working again with AVR-USB but this time under linux.

I'm currently working with the latest powerswitcth project as base and i'm experiencing some recognition problems as well.

The device is listed and reconized however, when i use the powerswitch command to communicate with it, the comunication fails beause he cant find the device, event with it being detected and listed by lsusb.

If I connect the device to a usb hub it simply works.

I'm using an Atmega 168 with a 12 Mhz crystal.

The only thing that i have diferent is the 3.3. at the D- line. I use a voltage divider formed by a 4.7k e 2.2k resistor.

Could this be a problem? Must I use the 2 diodes zener and the 1.5 k resistor?

Thanks,

Nuno Santos

Posted: Tue Nov 04, 2008 3:40 am
by bearing
It should be:

Code: Select all

PIN---68ohm---_---Computer
              ^Zener
              |
              GND


The pins are used as both input and output. Impedance is probably too big with the 2.2k series resistance.

Posted: Tue Nov 04, 2008 11:58 am
by christian
If you use a voltage divider, you limit the pull-up voltage only, not the signal levels generated by the processor. For reliable communication, the signal levels need to be near the levels defined in the USB spec.