Metro M4 Airlift Lite, TinyUSB Not Recognized by Win 10

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
Exonerd
 
Posts: 9
Joined: Fri Sep 24, 2021 12:06 am

Metro M4 Airlift Lite, TinyUSB Not Recognized by Win 10

Post by Exonerd »

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?

User avatar
hathach
 
Posts: 1270
Joined: Tue Apr 23, 2013 1:02 am

Re: Metro M4 Airlift Lite, TinyUSB Not Recognized by Win 10

Post by hathach »

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

Code: Select all

while(!Serial) yield(); // or delay(1) 
Otherwise, please post your minimal sketch here for analysis can

User avatar
Exonerd
 
Posts: 9
Joined: Fri Sep 24, 2021 12:06 am

Re: Metro M4 Airlift Lite, TinyUSB Not Recognized by Win 10

Post by Exonerd »

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?

User avatar
Exonerd
 
Posts: 9
Joined: Fri Sep 24, 2021 12:06 am

Re: Metro M4 Airlift Lite, TinyUSB Not Recognized by Win 10

Post by Exonerd »

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":

Code: Select all

 Serial.begin(9600);
  while(!Serial){
    yield();
  }

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

Return to “Metro, Metro Express, and Grand Central Boards”