USB not working on bootloaded SAMD21

Hi,

I made a custom SAMD21G18A board. While I can flash the bootloader, I can't for the life of me get the USB working.

I've used my Arduino M0 Pro as a programmer after desoldering its R2 and R3 to disconnect the EDBG from its SAMD21 MCU. It seems to work fine as a programmer. Most of the time, my board gets detected by Atmel studio and I can burn a bootloader without any issues. Occasionally my board fails to get detected but most of the time it works. Right now I have Adafruit's UF2 bootloader on my custom board.

When connected, through USB, the computer starts freaking out and throws "USB device not recognized" warnings indefinitely until I disconnect my board. Sometimes it works for a short while before freaking out. It's weird because my board seems to bootload (mostly)perfectly fine; I followed Adafruit's excellent ARM bootloading guide and loaded on their UF2 bootloader on my board. Sometimes, it works and my board appears as a USB flash drive, but as soon as I upload any code to it it locks up and doesn't work upon reconnection.

I've tried desoldering my external 32khz crystal and burning in a crystal-less bootloader. same results. The SAMD21's VDD pins show 3.3v, so I don't think it's a power supply issue.

However, I used only 10uF/4.7uF capacitors as decoupling caps since they were the only ones I had laying around. Is it possible for wrong decoupling capacitor values to mess up MCU performance like this?

This has been driving me absolutely crazy for the past few days. I can't figure out why my board has been acting so strangely. I would greatly appreciate any sort of help.

Thank you!

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.