Author Topic: When atmega32u4 board is connected to my laptop, windows cannot recognize it.  (Read 6085 times)

0 Members and 1 Guest are viewing this topic.

Offline electrowhizTopic starter

  • Contributor
  • Posts: 28
  • Country: in
I am doing a development board using atmega32u4. I have bootloaded the arduino leonardo into the atmega32u4. When I connected my atmega32u4 board to the laptop using usb cable , windows is displaying the message as  " the last usb connected to the  computer malfunctioned ,windows cannot recognize it" . Also my board is not getting power. What might be the problem?
« Last Edit: May 05, 2018, 10:05:08 am by electrowhiz »
 

Offline Nominal Animal

  • Super Contributor
  • ***
  • Posts: 8349
  • Country: fi
    • My home page and email address
I do not use Windows, so I can't help you there; but hardware-wise, some USB 3 chips have issues if directly connected to an ATmega32u4, or any other USB 1.0/1.1/2.0 device.  Putting an USB 2.0 hub in between seems to solve the issues. Could you try and see if that solves the problem? It could also be a cable issue; maybe the cable was squished or twisted or otherwise damaged enough to have electrical connection issues in the data lines.

I am using a short cable-type hub, with different connectors on the other end.  I have microcontrollers with both Mini B and Micro B connectors, so it's quite useful anyway.
 
The following users thanked this post: electrowhiz

Offline janoc

  • Super Contributor
  • ***
  • Posts: 3958
  • Country: de
The hub advice is also a cheap insurance in case something on the device goes badly wrong - it is cheaper to replace a fried hub than a computer motherboard. It doesn't replace an USB isolator but it is good enough for most common oopses like accidental shorts or putting wrong voltages where they don't belong.

To the OP - that problem can have millions of reasons - that error message only means that the device didn't enumerate properly. That could be because of a hw problem (incorrectly set up board, missing pull-up resistor, trying to run from the internal RC oscillator or resonator instead of crystal ...) or a firmware bug. Or both.

You need to provide more information if you want someone to be able to help you - schematic, pictures of the board, the source code for the firmware, etc.

 
The following users thanked this post: electrowhiz

Offline obiwanjacobi

  • Super Contributor
  • ***
  • Posts: 1030
  • Country: nl
  • What's this yippee-yayoh pin you talk about!?
    • Marctronix Blog
-disable driver signing in windows
-install the correct usb drivers

[2c]
Wrong code should not compile!
 
The following users thanked this post: electrowhiz

Offline janoc

  • Super Contributor
  • ***
  • Posts: 3958
  • Country: de
-disable driver signing in windows
-install the correct usb drivers

[2c]

Don't do that, that's completely irrelevant.

If Windows complains about the device "malfunctioning", that means it didn't even manage to enumerate it so the drivers are not even in the play yet. This becomes relevant only after the device shows up in the device manager correctly, even if it lacks a proper driver.
« Last Edit: May 07, 2018, 09:42:24 am by janoc »
 
The following users thanked this post: wraper, electrowhiz

Online SiliconWizard

  • Super Contributor
  • ***
  • Posts: 17829
  • Country: fr
True. This message is most often caused by an hardware issue on the peripheral side.
A (very) common issue when using laptops is a power supply one, because laptops usually have USB power control that most desktop computers don't, so laptops are much less forgiving. Most common I've seen is an inrush current (when you plug the device in) that's way over what's acceptable for an USB device, and it's commonly due to an input capacitor with too high a capacitance directly on VBUS without any proper current limiting. Very common on "cheap" USB devices and dev boards.

 
The following users thanked this post: electrowhiz

Offline janoc

  • Super Contributor
  • ***
  • Posts: 3958
  • Country: de
True. This message is most often caused by an hardware issue on the peripheral side.
A (very) common issue when using laptops is a power supply one, because laptops usually have USB power control that most desktop computers don't, so laptops are much less forgiving. Most common I've seen is an inrush current (when you plug the device in) that's way over what's acceptable for an USB device, and it's commonly due to an input capacitor with too high a capacitance directly on VBUS without any proper current limiting. Very common on "cheap" USB devices and dev boards.

The easiest way to avoid these is a powered USB hub (OTOH, e.g. my satnav explicitly refuses to work through a hub for whatever reason, so even that isn't panacea).

But given that the OP is building their own dev board, there could be a ton of much more basic problems in play - e.g. a short circuit or a wiring mistake (given that his board isn't getting power).
 
The following users thanked this post: electrowhiz

Offline Nominal Animal

  • Super Contributor
  • ***
  • Posts: 8349
  • Country: fi
    • My home page and email address
The easiest way to avoid these is a powered USB hub (OTOH, e.g. my satnav explicitly refuses to work through a hub for whatever reason, so even that isn't panacea).
For USB 1.1 microcontrollers (like ATmega32u4; max. 12 Mbits/s, won't work for 480 Mbits/s devices like Cypress FX2/FX2LP), the Olimex USB isolator is nice: you can even optionally use an isolated 8-15V supply to provide additional power. The isolator does have an isolated DC-DC converter, too, sufficient to run an ATmega32u4 without peripherals from the host USB port. The Chinese copies off eBay do not usually have the external power input, by the way, although the one I got seems okay otherwise.

But given that the OP is building their own dev board
I kinda assumed they are using a cheap Pro Micro clone with a Leonardo bootloader. I have a couple, and they're not too bad: the original SparkFun design is pretty good.
 
The following users thanked this post: electrowhiz

Offline janoc

  • Super Contributor
  • ***
  • Posts: 3958
  • Country: de
Well, we can debate all possible failure modes and how to prevent them but unless the OP actually shows up again and replies to some of the question, there is little anyone can do for them. I sometimes feel that some folks think that just the act of posting a question to some random forum will magically fix their problem ...   :-//
 

Offline Nominal Animal

  • Super Contributor
  • ***
  • Posts: 8349
  • Country: fi
    • My home page and email address
I sometimes feel that some folks think that just the act of posting a question to some random forum will magically fix their problem ...   :-//
Maybe it does? Rubber ducking debugging and all...

But yeah, it is very annoying when people just whizz out a question, then vanish, and never bother to answer followups, or report back.
 

Offline electrowhizTopic starter

  • Contributor
  • Posts: 28
  • Country: in
Guys tanx for your replies.I have found the issue. There was a short in the board which lead to this problem. I have powered my development board with another arduino and that arduino LED powered off. The problem was due to short circuit. I also found the shorted area. Tanq for sharing your wonderful ideas
 

Offline electrowhizTopic starter

  • Contributor
  • Posts: 28
  • Country: in
Sorry and I found the problem it was due to short circuit
 

Offline electrowhizTopic starter

  • Contributor
  • Posts: 28
  • Country: in
Sorry and I found the problem. It was due to short circuit
 

Offline electrowhizTopic starter

  • Contributor
  • Posts: 28
  • Country: in
Yes the problem was due to short circuit. Tanq for your support.
 

Offline janoc

  • Super Contributor
  • ***
  • Posts: 3958
  • Country: de
Glad to see that you have managed to find your problem.  :-+
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf

 

- - -
-->