Page 1 of 1

AVR USB device not recognized

Posted: Fri Aug 10, 2007 4:02 am
by mastastefant
Hi,

I am using an AtMega16, 16Mhz at 5 Volt, connected with zehner and 1k5 pullup, with the current usbdrv sources, fuse bits set to external clock.

When I connect the device to the PC (Debian 4), i only get the 'device descriptor read/64, error -71' messages a few times in syslog.

With DEBUG_LEVEL=2 i get the following output:

Code: Select all

ff:
ff:
ff:
ff:
ff:
ff:
ff:
ff:
ff:
ff:
ff:
ff:
ff:
ff:
ff:
ff:
ff:
ff:
ff:
ff:
ff:
ff:
12: 80 06 00 01 00 00 40 00
20: 4b 12 01 10 01 00 00 00 08 11 77
12: 80 06 00 01 00 00 40 00
20: 4b 12 01 10 01 00 00 00 08 11 77
12: 80 06 00 01 00 00 40 00
20: 4b 12 01 10 01 00 00 00 08 11 77
<repeated several times>
ff:
ff:
ff:
ff:
ff:
12: 00 05 17 00 00 00 00 00
20: 4b 00 00
12: 00 05 17 00 00 00 00 00
20: 4b 00 00


The two lines 12: and 20: are repeated very often, interrupted by some resets (0xff) when the host tries a new device id.

I think this is a Device Descriptor request, but i could not figure out what the response code (06 00 01 ..) means, where it comes from and especially if it is correct.

I am reading voltage levels of 2.97V on D-, on D+ i get some (weak) activity on a LED (doesn't work with LED disconnected either), but only 0.2V on the multimeter at most (but maybe it's just to slow to measure the peak voltages).

Can there be a problem with the electrical connection or is this a firmware/configuration problem (or both :) )? (I'm using a static HID-descriptor, so nothing fancy here).

Any help would be appreciated.

Thanks

Fixed problem

Posted: Sun Aug 12, 2007 5:40 am
by mastastefant
Hi,

I am using now a AtMega48-20, which works well at 12Mhz and 16Mhz. The oszillator on the development board i was using seems to work slower than specified, so this caused most likely the problems.

Posted: Mon Aug 13, 2007 12:50 pm
by christian
The debug log shows that the host sends a request and the device answers, but the host does not recognize the answer and retries the request several times until it decides to issue another reset and start from scratch.

I have not decoded the host request to see whether it makes sense. But if the clock frequency is not precise enough (as you suspected), this is a possible behavior.

Posted: Tue Feb 05, 2008 8:57 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.