Device recognition fails sometimes

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

Device recognition fails sometimes

Post by Tero » Thu Jul 19, 2007 12:32 am

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?

Tero

Post by Tero » Thu Jul 19, 2007 5:41 pm

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.

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

Post by christian » Thu Jul 19, 2007 9:47 pm

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.

usbcoder

faulty hub ?

Post by usbcoder » Mon Aug 20, 2007 2:09 pm

-Dev# 4 Vendor 0x0424 Product 0x2504

Have you tried disconnecting this hub from the bus ?

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

Post by christian » Tue Feb 05, 2008 8:56 pm

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.

lpx
Posts: 7
Joined: Fri Apr 20, 2007 8:58 am

Post by lpx » Tue Nov 04, 2008 1:21 am

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

bearing
Posts: 10
Joined: Mon Oct 27, 2008 6:06 pm
Location: Sweden

Post by bearing » Tue Nov 04, 2008 3:40 am

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.

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

Post by christian » Tue Nov 04, 2008 11:58 am

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.

Post Reply