adafruit / uf2-samdx1

MSC bootloader (based on UF2) for SAMD21
Other
214 stars 187 forks source link

Adafruit Grand Central M4 (SAMD51P20A) bootloader USB not showing up USB devices and USB capture logs #142

Closed greymfm closed 4 years ago

greymfm commented 4 years ago

Hi, We have purchased 50 pieces Adafruit Grand Central M4 boards for our Ardumower project. We have (after some time working with them) bootloader issues with all of these boards using many different computers (all all different combinations of OS's, Windows, Linux etc.). We have tried out all available Grand Central M4 bootloader versions (v3.30, v3.7.0, v3.9.0, v3.10.0 ), different USB cables, USB-powered hubs, USB2 and USB3 etc.- Always the same bootloader issue.

Problem: The UF2 bootloader is 90% of the time not showing up any USB devices when loading via double-pressing RESET on the Adafruit Grand Central M4 board. The Neopixel LED stays red and the small LED is quickly pulsating. We have flashed a user program using Arduino IDE and the Arduino blink example code but it's difficult to flash when the bootloader does not show any USB devices 90% of the time.

We have captured several USB log dumps attached using 'usbmon' to be viewed with 'wireshark'. usblog.tar.gz

This is dmesg output when the board shows USB devices and can be flashed using Arduino IDE: grafik

And this is dmesg output when the board does NOT show any USB devices: grafik

What else could we do to help finding the cause for such a problem? :-)

One 'workaround' we found to get into the bootloader:

  1. Press and hold RESET button.
  2. Plug-in the board into the USB.
  3. Release RESET button and immediately press RESET two times. Then the boards go into bootloader, the Neopixel LED goes green and a USB device is shown. But this workaround does not work on Windows machines, only Linux machines.

Thanks, Alexander

dhalbert commented 4 years ago

An early batch of Grand Central M4's had the main timing crystal installed upside down, which caused USB timing issues. See the first picture below.. The component near the "E" in "POWER" should not have two pads visible: it should look like the second picture. This caused problems similar to what you describe. If you search in https://forums.adafruit.com for grand central crystal you will find several threads with more pictures. The other possibility is bad USB cables, but I would assume you have tried alternate cables. If not, please do. Please open a thread on the forums for this issue, and post the thread link here. image image

dhalbert commented 4 years ago

Also, could you say from where you purchased these boards?

greymfm commented 4 years ago

Thank you! The crystals are soldered correctly (not upside down). Also, yes, we tried different USB cables. We purchased the boards via Mouser Electronics. I will post a thread on the forum. Thank you for your time!

greymfm commented 4 years ago

Here's the Adafruit forum thread link for this post: https://forums.adafruit.com/viewtopic.php?f=63&t=169701

greymfm commented 4 years ago

Features say: 'In-memory logging for debugging - use the logs target to extract the logs using openocd' - I can connect to the board using OpenOCD - Any examples on how could I extract logs using OpenOCD ? :-)

ladyada commented 4 years ago

@dhalbert please check the thread when you're back!

dhalbert commented 4 years ago

Replied in thread: https://forums.adafruit.com/viewtopic.php?f=63&t=169701

dhalbert commented 4 years ago

Closing for now due to further research by OP that only a few boards seem to have problems. Please reopen as necessary.

https://forums.adafruit.com/viewtopic.php?f=63&t=169701&p=831529#p831525