adafruit / uf2-samdx1

MSC bootloader (based on UF2) for SAMD21
Other
210 stars 182 forks source link

Having an issue with USB device disappearing if the programmer is not connected #191

Closed davepruitt closed 1 year ago

davepruitt commented 1 year ago

This may be more of a "help wanted" post rather than reporting a true "issue". Hopefully that's okay here.

I've got a custom board design, but it's fairly similar to the Adafruit Grand Central M4. My board has the SAMD51P19A. I have a USB cable connected to my board from my computer, and the USB cable is also providing power to the board. Additionally, I have a programmer plugged into the board - it's an Atmel ICE programmer.

The pins used for the USB Data+/Data- are PA25 and P24 - the same as with the Grand Central M4. Additionally, the pins used for the programmer PA31, PA30, and PB30 (for SWDIO, SWCLK, and SWO respectively) - also the same as with the Grand Central M4.

I've loaded this bootloader onto my board (the variant for the Grand Central M4), and it loads on perfectly fine. The mass storage USB device appears on my computer, and a COM port is accessible. However, if I disconnect my Atmel ICE programmer from the board, then the USB device disappears from my computer, despite the fact that the USB cable is still plugged into the board and providing power to the board.

Any idea what could be going on here? I'm stumped.

davepruitt commented 1 year ago

So I just built the bootloader from scratch, and when I load the version of the bootloader that I built onto my board, I no longer encounter this issue. I'm not sure what has changed, but apparently building it myself rather than using the official release did something to fix it.