Go Down

Topic: Device won't enumerate after bootloader is programmed (Read 460 times) previous topic - next topic

seat6

Hello, I'm using the samd21G18A device in a custom PCB.  I've included the main bit of my schematic.  Basically, when I program the bootloader (I have a 10 pin connector on the board) using an Atmel-ICE and Atmel Studio, it works fine.  The bootloader loads, but then the device never enumerates as a usb device for me to load my main sketch.

I've tried a few bootloaders including the ones for the zero, sparkfun's samd21 breakout, and ones from here: https://github.com/arduino/ArduinoCore-samd/tree/master/bootloaders/zero, and they all work about the same.  They program just fine, but never enumerate.

Sparkfun's bootloader uses the built in LED, which is helpful.  With that I've been able to verify that when I press the reset button (ground the reset pin), the LED goes off since the bootloader is not driving it.  So I have confidence in my reset pin.  

I've replaced the samd21, the crystal, and all the IC's involved in deriving 3.3V, and none of these steps have led to any changes.

My best guess at the problem is the crystal, just because I am pretty sure a bad crystal will lead to no issues with programming, but will lead to usb communication issues.

A suggestions for debugging this?


seat6

Additionally, if it helps, here's a link to the Crystal I'm using:

https://www.digikey.com/product-detail/en/epson/FC-135-32.7680KA-A5/SER4103CT-ND/6188447

westfw


seat6

Yes, when I power on the board (since there is no sketch loaded on it, just the bootloader, it enters bootloader mode by default) the LED on D13, blinks at about 5hz (just based on visual inspection, I haven't actually measured the frequency). 

seat6

Another thing worth considering, I attached my D-, D+ usb pair to a logic analyzer, and see about a 240Kohm resistance between GND and D-/D+. I'm now investigating whether there's some physical problem with my usb connection

seat6

I figured it out.  Turns out the USB ports I was plugged into are bad.  using a different computer or ports and it works great.  The only other thing worth mentioning to anyone else having the same issue is, if you use the sparkfun bootloader, the led blink pattern will drop from ~5hz, to ~0.5hz once the bootloader believes its enumerated.  This can be helpful with debugging. Also, if you are having these problems be sure to always try and use different cables and a different computer (if you have access to one).

Go Up