Greetings,
Using Arduino IDE with a Metro M4 Airlift Lite that had been working well previously, I switched the USB stack to "TinyUSB" as I wanted to experiment with the expanded capabilities. My generic sketch compiled and uploaded, but then the board disappeared from Windows and shows up with a "USB Device Unrecognized" error. Used the latest Adafruit driver package (2.5.0.0) and still can't get the board to show up properly. Is there an easy fix for this?
Metro M4 Airlift Lite, TinyUSB Not Recognized by Win 10
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- Exonerd
- Posts: 9
- Joined: Fri Sep 24, 2021 12:06 am
- hathach
- Posts: 1271
- Joined: Tue Apr 23, 2013 1:02 am
Re: Metro M4 Airlift Lite, TinyUSB Not Recognized by Win 10
it is probably caused by `while(!Serial) {}` (or similar), try to add an yield() or delay(1) to allow mcu to run the tinyusb background task e.g
Otherwise, please post your minimal sketch here for analysis can
Code: Select all
while(!Serial) yield(); // or delay(1)
- Exonerd
- Posts: 9
- Joined: Fri Sep 24, 2021 12:06 am
Re: Metro M4 Airlift Lite, TinyUSB Not Recognized by Win 10
Thanks but I can't even get the board to show up for reprogramming at this state. Should I burn a fresh bootloader to reset the board, or is there a fix in Windows?
- Exonerd
- Posts: 9
- Joined: Fri Sep 24, 2021 12:06 am
Re: Metro M4 Airlift Lite, TinyUSB Not Recognized by Win 10
Resolved:
If you ever lose communication with the Arduino IDE and Windows due to a serial port error in your code, switching to bootloader mode (double-tap the reset button whilst connected to USB) will make the board reappear in Windows and the Arduino IDE, allowing for flashing a fresh sketch. I was worried I'd have to burn new bootloaders, etc. Thank you Adafruit for your handy capability to switch to CircuitPython!
Unresolved:
When switching to the TinyUSB stack, I get a compiler error for that delay command put in place to let the USB process complete, saying there is "unknown reference to Serial":
If you ever lose communication with the Arduino IDE and Windows due to a serial port error in your code, switching to bootloader mode (double-tap the reset button whilst connected to USB) will make the board reappear in Windows and the Arduino IDE, allowing for flashing a fresh sketch. I was worried I'd have to burn new bootloaders, etc. Thank you Adafruit for your handy capability to switch to CircuitPython!
Unresolved:
When switching to the TinyUSB stack, I get a compiler error for that delay command put in place to let the USB process complete, saying there is "unknown reference to Serial":
Code: Select all
Serial.begin(9600);
while(!Serial){
yield();
}
Please be positive and constructive with your questions and comments.