32U4 Device Descriptor Request Failed

654 views
Skip to first unread message

Edward Shin

unread,
Apr 30, 2014, 5:02:31 AM4/30/14
to lufa-s...@googlegroups.com
Hi all,

I've designed my own board with a 32U4 running at 16 MHz and am currently trying to get LUFA running on it, but I've run into some problems. I'm fairly confident board design is not the issue, as it's mostly lifted straight off the Leonardo design.

I'm running Atmel Studio 6, with the LUFA ASF extension.
I've tried compiling several of the example programs, including the CDC Virtual Serial, Generic HID Device, Keyboard, and USB Device Template. For each of these examples, I've confirmed that F_CPU and F_USB are set to 16000000UL, and my device is set to the 32U4. I've been using 'none' or 'user' for the board configuration, but I don't think it particularly matters.

All of these examples compile and program fine, but the device fails to enumerate on my computers.
Windows reports "USB device not recognized", and the Device Manager says that the "Device Descriptor Request Failed".

Does anyone have any idea as to what may be going wrong? Would this error mean that there is something wrong with the USB connection itself, or is it some sort of software/configuration issue?

One thought I had was that I may not have been compiling the project correctly, so I tried loading the Arduino Leonardo bootloader, but came across the same issue. I haven't looked at the USB differential signals on a scope yet, which is probably what I will try next.

Any input would be greatly appreciated!

-Edward

Edward Shin

unread,
Apr 30, 2014, 4:13:39 PM4/30/14
to lufa-s...@googlegroups.com
Just a quick update: I hooked it up to the scope, and there's definitely some data being transmitted when it is plugged in.

Jim Paris

unread,
Apr 30, 2014, 4:26:27 PM4/30/14
to Edward Shin, lufa-s...@googlegroups.com
You didn't provide too much to go on... do you have a schematic of
your PCB available? Does your code run OK on a Leonardo? Does other
non-USB code on your microcontroller run, and at the correct speed
(e.g. blinking a light once a second)?

Jim
> --
> You received this message because you are subscribed to the Google Groups "LUFA Library Support List" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to lufa-support...@googlegroups.com.
> To post to this group, send email to lufa-s...@googlegroups.com.
> Visit this group at http://groups.google.com/group/lufa-support.
> For more options, visit https://groups.google.com/d/optout.

Edward Shin

unread,
Apr 30, 2014, 5:18:13 PM4/30/14
to lufa-s...@googlegroups.com, Edward Shin
The source for my board can be found here: http://github.com/hylian/arducard
Here's a picture of the schematic: http://i.imgur.com/yL4jON2.png
And one of the board: http://i.imgur.com/C8QMYuO.png

Some changes I made on the board trying to fix the problem:
-Removed varistors on D+/D-
-Added an extra wire from UGND to USB connector GND
-Fixed UVCC being connected to +3V3 by connecting it to VBUS instead.
-Shorted diode D1 (so that VBUS and UVCC are connected directly to the USB power)

The microcontroller itself seems OK. I ran some code to just toggle a pin, and it seems to be doing so at about the right frequency. When the LUFA examples are loaded, the D-/D+ pins seem to be working as well. I don't have a Leonardo or any other 32U4 devices to test my code on, unfortunately.

Thanks,
Edward

Dean Camera

unread,
May 8, 2014, 7:07:37 AM5/8/14
to lufa-s...@googlegroups.com
Edward,

At 3.3V the 32U4 caps out at 8MHz, as specified in the datasheet (see "Figure 21-2. Operating modes versus frequency and power-supply" in the USB chapters). Your schematic appears - it's a bit blurry on my monitor - to specify 8MHz as the crystal, but you wrote earlier that you have the F_USB and F_CPU set for 16MHz. Can you double check this please?

The Windows enumeration failure balloon can be triggered by everything from low level protocol failures, to faulty ports, to the phase of the moon - not much good for debugging purposes.

Cheers!
- Dean

Edward Shin

unread,
May 9, 2014, 12:28:34 AM5/9/14
to lufa-s...@googlegroups.com
This seems to very likely be the issue, thanks! I should've RTFM :)
I'm using a 16 MHz crystal, so I'll try dividing the clock frequency by two and seeing if it helps.

Cheers,
Edward
Reply all
Reply to author
Forward
0 new messages