Custom Atmega32u4 PCB connects to Windows as 'Unknown USB Device'

Go To Last Post
73 posts / 0 new

Pages

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Yes, I use the same computer when connecting either board.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

clawson wrote:

meolsen wrote:
, could you find the 'Hardware Ids' part and show that?
+1

 

Sure, I will post this when I have a chance.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

meolsen wrote:

In the details page in the device manager, could you find the 'Hardware Ids' part and show that? 

 

My best guess is that the device fails to set up correctly. I don't think drivers are the main issue... (The driver is bound based on the Hardware Ids, so show that so that we can see what is reported).

 

Sure enough, the hardware ID is listed incorrectly as "UNKNOWN". 

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

So this is electrical if it cannot even enumerate to deliver a VID/PID and descriptor.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Yep, seems so. Now the question is what's wrong electrically?

I was able to scope the frequency across c10 (GND to Xtal2) but all I saw was line noise: 60Hz. I think it's possible my scope wasnt set to a base of 10ns so i think if I remeasure I might finally get verification on the clock's frequency.

Anyone have any other ideas for what to troubleshoot on the circuit?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

It could be the USB hardware clock or the CPU clock is not right.  I'm not familiar with the mega.

 

Here's the Xmega manual:

 

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Actually I think the Xmega manual is not correct concerning the USB hardware clock.  It says the frequencies are the minimum for the hardware clock.  But I think the truth is, the exact frequency given for full speed, and likely for low speed too, is the exact (almost) frequency that must be used, within a certain allowable error.

 

I read somewhere that the maximum frequency error for full speed is 0.5%, according to the spec.   I find my USB will work okay with a much bigger error of 4% but I wouldn't want to depend on it.

 

I read the maximum frequency error for low speed is considerably greater but I don't remember what it is.

 

One thing you have to know is if the bootloader is using full speed or low speed.  On the Xmega it would be a good bet it runs full speed. 

 

 

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

steve17 wrote:
I read the maximum frequency error for low speed is considerably greater but I don't remember what it is.
15000ppm (+/-1.5%)

http://www.beyondlogic.org/usbnutshell/usb2.shtml#DataSignallingRate

 

"Dare to be naïve." - Buckminster Fuller

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Are you using the correct VCC?   The Xmega VCC must be somewhere around 3.3 volts when using USB.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Yes. Also, we're talking about the atmega32u4, not sure if thats a relevant distinction from the Xmega for the purpose of this discussion

This reply has been marked as the solution. 
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1

I fixed the issue! The 2 resistors on the D+/- lines on the PCB were the wrong values (they didn't match my schematic). Once I replaced them the PCB was recognized perfectly as an ATm32U4DFU.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The High Septon wrote:

 The 2 resistors on the D+/- lines on the PCB were the wrong values.

There seems to be a lot of that going around.  I learned something else too.  It seems the Xmega is the only Atmel chip that doesn't require USB resistors on the board.  They are inside the chip and are calibrated in the factory.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The High Septon wrote:

I fixed the issue! The 2 resistors on the D+/- lines on the PCB were the wrong values (they didn't match my schematic). Once I replaced them the PCB was recognized perfectly as an ATm32U4DFU.

 

Please explain the following:

 

Chuck99 in post #14 wrote:

1) Have you verified that the 22 Ohm resistors are actually 22 Ohms?

 

The High Septon in post#15 wrote:

1) Yes, verified.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

> atmega32u4 (and 16u4) comes with a pre-installed bootloader out of the box

Please confirm that you meant chips ordered from the factory (DigiKey).

In that case, apply power and usb cables and there should be a boot loader.

Is that correct?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Datasheet says:

 

So do you have -AU or -MU parts ?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Having said that the top of the datasheet says:

 

 

So maybe 33.2 is wrong and it is lines 2 and 4 not 3 and 4 that should have footnote (3) ?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The 32u4 and 16u4 definitely do ship with bootloaders.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The bootloader needs portf as their HWB switch. Did you sure you tied it high and not floating?
.
MG

I don't know why I'm still doing this hobby

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

MicroGyro wrote:
The bootloader needs portf as their HWB switch. Did you sure you tied it high and not floating? . MG

 

This thread was solved months ago :P The resistors on the D+ and D- USB lines were spec'ed incorrectly.

Last Edited: Fri. Aug 4, 2017 - 03:50 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Well... I'm too lazy to read all the post. :D
.
MG

I don't know why I'm still doing this hobby

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The High Septon wrote:
The 32u4 and 16u4 definitely do ship with bootloaders.
-AU or -MU ? And "RC" or not?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

valusoft wrote:
you could make a loop by attaching your probe's ground wire to the probe tip and hold this "loop" near your crystal

That is a great trick!  I have always hooked a small RFID coil to the probe, but making a loop with the ground wire works pretty well.  It is a good day when I learn something new.

Pages