Itsy Bitsy 32u4 - Unknown USB Device

Please tell us which board you are using.
For CircuitPython issues, ask in the Adafruit CircuitPython forum.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
TomHumbleAndHandsome
 
Posts: 99
Joined: Mon Feb 15, 2021 6:38 pm

Itsy Bitsy 32u4 - Unknown USB Device

Post by TomHumbleAndHandsome »

I purchased 10 Itsy Bitsy 32u4 boards to experiment with, (5 each of the 5V and 3.3V). Everything was working fine, with several small projects under my belt using the Arduino IDE, and debugging with Serial.print statements.

Then I decided to experiment with low power, using the following line of code:

LowPower.idle(SLEEP_8S, ADC_OFF, TIMER4_OFF, TIMER3_OFF, TIMER1_OFF, TIMER0_OFF, SPI_OFF, USART1_OFF, TWI_OFF, USB_OFF);

From that point on, the IDE doesn't recognize the board. In fact, it doesn't recognize ANY of my Itsy Bitsy boards, even the unused ones I just got from Adafruit.

I can download code by "double pressing" the power button on the Itsy Bitsy when the IDE is attempting to download the code but after the code finishes downloading, the device disappears again so I can't use Serial communications.

Strange that this problem occurs with ALL my Itsy Bitsy boards even the ones fresh out of the package from Adafruit. Yet it doesn't happen with an Arduino! It's only the Itsy Bitsy boards that seem to be broken. And it's not code on the boards themselves because I plug in a fresh board and it's not recognized.

There has to be some code I need to execute. I would be so grateful to get that code. But I would also love to understand what is happening that prevents my environment from recognizing ALL Itsy Bitsy boards but not Arduino boards. Where is the issue? In the IDE? Some setting in Windows?

Thanks in advance.

User avatar
sj_remington
 
Posts: 999
Joined: Mon Jul 27, 2020 4:51 pm

Re: Itsy Bitsy 32u4 - Unknown USB Device

Post by sj_remington »

Have you considered not turning off the USB module in your idle command?

User avatar
TomHumbleAndHandsome
 
Posts: 99
Joined: Mon Feb 15, 2021 6:38 pm

Re: Itsy Bitsy 32u4 - Unknown USB Device

Post by TomHumbleAndHandsome »

I used that command once and removed it. I've given up on low power (for now).

My problem is how to get the IDE to recognize the Itsy Bitsy on the COM port (through the USB). And Windows too. When I look at the device manager in Windows, it gives me the unknown device error where it used to say I had an Itsy Bitsy on the COM port.

That "USART1_OFF" did something I can't seem to reverse. And it affects ALL my Itsy Bitsy boards!

User avatar
TomHumbleAndHandsome
 
Posts: 99
Joined: Mon Feb 15, 2021 6:38 pm

Re: Itsy Bitsy 32u4 - Unknown USB Device

Post by TomHumbleAndHandsome »

New Development:

I connected a fresh/unused Itsy Bitsy and both the Windows device manager and the Arduino IDE recognized it as an Itsy Bitsy.

However, as soon as I uploaded the simplest program I could write (see below), it's no longer recognized; I have to double click the power button for future uploads and I can't use Serial communications.

This leads me to believe that I'm over-writing some "ID" area on the chip that is necessary for the IDE to recognize the board.

This never happened before. SOMEONE must have run into this before, I can't be the first!

Anybody know how to stop this from happening?

Code: Select all

void setup()
{
  pinMode(13, OUTPUT);
}

void loop()
{
  digitalWrite(13, HIGH);
  delay(500);
  digitalWrite(13, LOW);
  delay(500);
}
~ If making mistakes is how we learn, I must be close to genius by now. ~

User avatar
sj_remington
 
Posts: 999
Joined: Mon Jul 27, 2020 4:51 pm

Re: Itsy Bitsy 32u4 - Unknown USB Device

Post by sj_remington »

What did you change after this happened? That can't possibly be attributed to the Itsy Bitsy boards.
From that point on, the IDE doesn't recognize the board. In fact, it doesn't recognize ANY of my Itsy Bitsy boards, even the unused ones I just got from Adafruit.
Try installing the IDE on another desktop/laptop machine, and retesting the boards.

User avatar
TomHumbleAndHandsome
 
Posts: 99
Joined: Mon Feb 15, 2021 6:38 pm

Re: Itsy Bitsy 32u4 - Unknown USB Device

Post by TomHumbleAndHandsome »

Hi SJ - This morning I discovered that uploading code from the IDE corrupts the itsy bitsy board somehow and from then on, I can't use it (unless I double click the power, and even then, I can't use Serial).

Yesterday I thought it had to do with the call to the power save library but today I figured out it's ANY code that I upload.

Thanks for looking at this btw.

User avatar
sj_remington
 
Posts: 999
Joined: Mon Jul 27, 2020 4:51 pm

Re: Itsy Bitsy 32u4 - Unknown USB Device

Post by sj_remington »

It is difficult to imagine how the IDE could inadvertently introduce a permanent change in the MCU, that cannot be reset by power cycling. An exception is to change the "fuses" in the MCU, but that usually requires some effort and several steps on your part. And that would not affect the behavior of other Itsy Bitsy boards.

One possibility is a hardware problem, like an electrical overload in the USB port, which caused the operating system to shut down the port. Use the Windows Device Manager to check whether the USB port has a yellow warning symbol, and/or has been disabled.

Reboot your machine, test again and try other USB ports and USB CABLES to see if the problem is repeatable.

User avatar
TomHumbleAndHandsome
 
Posts: 99
Joined: Mon Feb 15, 2021 6:38 pm

Re: Itsy Bitsy 32u4 - Unknown USB Device

Post by TomHumbleAndHandsome »

[img]C:\Users\tom\Desktop\Before%20Upload.png[/img]

[img]C:\Users\tom\Desktop\After%20Upload.png[/img]

In case those pictures don't come out (I'm new at this), these are before and after screenshots of the Windows device manager showing how the Itsy Bitsy went from a known device to an unknown device.

I took your advice and used a different USB port too. It happens on all USB ports and even on another laptop.

Good thing I bought 10 of these, I'm almost out of them now.

User avatar
sj_remington
 
Posts: 999
Joined: Mon Jul 27, 2020 4:51 pm

Re: Itsy Bitsy 32u4 - Unknown USB Device

Post by sj_remington »

Sorry, I have no other ideas. But I don't suspect the Itsy Bitsy boards.

User avatar
TomHumbleAndHandsome
 
Posts: 99
Joined: Mon Feb 15, 2021 6:38 pm

Re: Itsy Bitsy 32u4 - Unknown USB Device

Post by TomHumbleAndHandsome »

I just updated all my libraries and boards in the IDE and tried it again. This is the verbose output of the uploader. Does any of this give you any ideas? - BTW, I agree, it's not the boards; I think it's something in my IDE (a bug???) that is overwriting some important data on the chip when it uploads.

This is the verbose output of the upload:

Sketch uses 3862 bytes (13%) of program storage space. Maximum is 28672 bytes.
Global variables use 149 bytes of dynamic memory.
Forcing reset using 1200bps open/close on port COM7
PORTS {COM7, } / {} => {}
PORTS {} / {COM8, } => {COM8, }
Found upload port: COM8
C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avrdude -CC:\Program Files (x86)\Arduino\hardware\tools\avr/etc/avrdude.conf -v -patmega32u4 -cavr109 -PCOM8 -b57600 -D -Uflash:w:C:\Users\tom\AppData\Local\Temp\arduino_build_926923/sketch_jul26a.ino.hex:i

avrdude: Version 6.3-20190619
Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
Copyright (c) 2007-2014 Joerg Wunsch

System wide configuration file is "C:\Program Files (x86)\Arduino\hardware\tools\avr/etc/avrdude.conf"

Using Port : COM8
Using Programmer : avr109
Overriding Baud Rate : 57600
AVR Part : ATmega32U4
Chip Erase delay : 9000 us
PAGEL : PD7
BS2 : PA0
RESET disposition : dedicated
RETRY pulse : SCK
serial program mode : yes
parallel program mode : yes
Timeout : 200
StabDelay : 100
CmdexeDelay : 25
SyncLoops : 32
ByteDelay : 0
PollIndex : 3
PollValue : 0x53
Memory Detail :

Block Poll Page Polled
Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack
----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
eeprom 65 20 4 0 no 1024 4 0 9000 9000 0x00 0x00
flash 65 6 128 0 yes 32768 128 256 4500 4500 0x00 0x00
lfuse 0 0 0 0 no 1 0 0 9000 9000 0x00 0x00
hfuse 0 0 0 0 no 1 0 0 9000 9000 0x00 0x00
efuse 0 0 0 0 no 1 0 0 9000 9000 0x00 0x00
lock 0 0 0 0 no 1 0 0 9000 9000 0x00 0x00
calibration 0 0 0 0 no 1 0 0 0 0 0x00 0x00
signature 0 0 0 0 no 3 0 0 0 0 0x00 0x00

Programmer Type : butterfly
Description : Atmel AppNote AVR109 Boot Loader

Connecting to programmer: .
Found programmer: Id = "CATERIN"; type = S
Software Version = 1.0; No Hardware Version given.
Programmer supports auto addr increment.
Programmer supports buffered memory access with buffersize=128 bytes.

Programmer supports the following devices:
Device code: 0x44

avrdude: devcode selected: 0x44
avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% -0.00s

avrdude: Device signature = 0x1e9587 (probably m32u4)
avrdude: reading input file "C:\Users\tom\AppData\Local\Temp\arduino_build_926923/sketch_jul26a.ino.hex"
avrdude: writing flash (3862 bytes):

Writing | ################################################## | 100% 0.31s

avrdude: 3862 bytes of flash written
avrdude: verifying flash memory against C:\Users\tom\AppData\Local\Temp\arduino_build_926923/sketch_jul26a.ino.hex:
avrdude: load data flash data from input file C:\Users\tom\AppData\Local\Temp\arduino_build_926923/sketch_jul26a.ino.hex:
avrdude: input file C:\Users\tom\AppData\Local\Temp\arduino_build_926923/sketch_jul26a.ino.hex contains 3862 bytes
avrdude: reading on-chip flash data:

Reading | ################################################## | 100% 0.05s

avrdude: verifying ...
avrdude: 3862 bytes of flash verified

avrdude done. Thank you.

User avatar
sj_remington
 
Posts: 999
Joined: Mon Jul 27, 2020 4:51 pm

Re: Itsy Bitsy 32u4 - Unknown USB Device

Post by sj_remington »

I still don't understand this statement in your very first post:
From that point on, the IDE doesn't recognize the board. In fact, it doesn't recognize ANY of my Itsy Bitsy boards, even the unused ones I just got from Adafruit.


What did you change, that allowed you to try programming another board?

User avatar
TomHumbleAndHandsome
 
Posts: 99
Joined: Mon Feb 15, 2021 6:38 pm

Re: Itsy Bitsy 32u4 - Unknown USB Device

Post by TomHumbleAndHandsome »

In hind-sight I could explain it better.

A new Itsy Bitsy board is "seen" by the IDE, that is, The IDE recognizes it's an Itsy Bitsy and gives me the option to choose it under "Tools/Port" - If I open Windows device manager at this point, it says the com port and "Itsy Bitsy... version number etc." And if I bring it to another laptop, it also recognizes it as an Itsy Bitsy.

BUT after I load a program (any program) to that particular Itsy Bitsy, "Tools/Port" is greyed out. When I open Windows device manager, it calls it an unknown device and when I stick it into a USB port on another laptop, it's also shown as an unknown device.

What my "fix" is, is to simply open a brand new itsy bitsy and try it all over again. As before, the OS and the IDE recognize it until I upload a program to it.

The frustrating thing is that this is new as of yesterday. I've been programming these boards for weeks with no issues.

One caveat - Somewhere in the adafruit web site it has a "fix" for this very problem. It says to "double click" the power button on the Itsy Bitsy as the IDE is trying to upload the hex file. This actually works to upload the file but once uploaded, the device is no longer recognized (as stated above). So I have only a partial work-around: I can upload new code but I can't access it through the USB serial port after I do.

Right now, my best guess is that there's some compiler option I accidentally tripped that overwrites a device ID on the board. I'm just guessing though. So now I'm trying to find detailed documentation on what's in that hex file.

User avatar
TomHumbleAndHandsome
 
Posts: 99
Joined: Mon Feb 15, 2021 6:38 pm

Re: Itsy Bitsy 32u4 - Unknown USB Device

Post by TomHumbleAndHandsome »

What did you change, that allowed you to try programming another board?
I didn't change anything on the board, I just grabbed a new, unused board from adafruit and stuck the USB cable into it.

User avatar
TomHumbleAndHandsome
 
Posts: 99
Joined: Mon Feb 15, 2021 6:38 pm

Re: Itsy Bitsy 32u4 - Unknown USB Device

Post by TomHumbleAndHandsome »

I had chosen the feather, which was incorrect.
I had chosen the feather, which was incorrect.
Untitled.png (61.45 KiB) Viewed 225 times
sj_remington - Thought you'd want to know - SOLVED

Thanks to "RogerInHawaii" and his post "More problems with ItsyBitsy 32u4", I was able to figure out just how stupid I am.

RogerInHawaii had the exact same issue. His problem was that he chose the 3v version of the itsy bitsy instead of the 5v. When I read that I thought "but there's only one version, the feather"

Then I looked at the list of devices again. Down at the bottom are the correct boards.

Good grief.

When I spend time trying to figure out, I appreciate when someone tries to help. Thanks.

User avatar
TomHumbleAndHandsome
 
Posts: 99
Joined: Mon Feb 15, 2021 6:38 pm

Re: Itsy Bitsy 32u4 - Unknown USB Device

Post by TomHumbleAndHandsome »

One last weird thing though

Loading the device when you have selected the wrong device by double clicking the reset button does something to the itsy bitsy board because I still had to go back and reprogram all the itsy bitsys that I played with by selecting the right board and double clicking. After that, they were ok.

Anyway, Limor, if you're reading this, I like RogerInHawaii's advice about colorizing boards, but another suggestion would be (and this probably isn't something under your control) to group devices in the device list in the Arduino IDE so that all the 32u4s are together.

All in all, the best solution would be to add a few points to my IQ but that's probably not going to happen :0(

Locked
Please be positive and constructive with your questions and comments.

Return to “Itsy Bitsy Boards”