[SOLVED] SAMD21 bootloader failure on Linux?

Hello, first-time XAIO user here, just starting on my first project.

I’m trying to get a Seeed Studio XAIO SAMD21 to go into bootloader mode, so that I can load a uf2 file into it. I’m working on a Linux Ubuntu 24.04.2 system.

When I first plug the SAMD21 into a USB-C cable connected to my system, I see this in dmesg:

[  402.405636] usb 3-1.2: new full-speed USB device number 12 using xhci_hcd
[  402.488950] usb 3-1.2: New USB device found, idVendor=2886, idProduct=802f, bcdDevice= 1.00
[  402.488954] usb 3-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[  402.488955] usb 3-1.2: Product: Seeed femto M0
[  402.488956] usb 3-1.2: Manufacturer: Seeed
[  402.488957] usb 3-1.2: SerialNumber: DC85AFAA503058414E2E3120FF0B1801
[  402.512956] cdc_acm 3-1.2:1.0: ttyACM0: USB ACM device
[  402.512975] usbcore: registered new interface driver cdc_acm
[  402.512977] cdc_acm: USB Abstract Control Model driver for USB modems and ISDN adapters

As far as I can tell, this seems correct. The SAMD21 also seems to go into a BLINK program, flashing the yellow light once every 2 seconds.

When I short the RST pads together twice quickly, the yellow light goes into a ‘flicker’ mode, and this appears in dmesg:

[  431.674139] usb 3-1.2: USB disconnect, device number 12
[  432.614115] usb 3-1.2: new full-speed USB device number 13 using xhci_hcd
[  432.691892] usb 3-1.2: New USB device found, idVendor=2886, idProduct=002f, bcdDevice=42.01
[  432.691895] usb 3-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[  432.691896] usb 3-1.2: Product: Seeeduino XIAO
[  432.691898] usb 3-1.2: Manufacturer: Seeed Studio
[  432.691899] usb 3-1.2: SerialNumber: DC85AFAA503058414E2E3120FF0B1801
[  432.691970] usb 3-1.2: rejected 1 configuration due to insufficient available bus power
[  432.691972] usb 3-1.2: no configuration chosen from 1 choice

I think the SAMD21 is going into bootloader mode correctly (flickering yellow light), but my Linux system isn’t registering it correctly as a volume that I can drag the uf2 file onto.

Can anyone tell me what’s happening, and how to set my system or the SAMD21 up correctly, so that I can program it with a uf2 file? Are there any other diagnostics I can run to see what’s happening?

Thanks for any advice and guidance.

-Kevin

This is a tutorial on the use of SAMD21 in the wiki. You can refer to the steps and follow the specifications. We hope this will be helpful to you.

It seems the device is in bootloader mode (yellow light flickering), but if you’re unsure, you can also try pressing the BOOT button (if present) to force the board into bootloader mode. It might reset the bootloader’s state and reinitialize the USB interface.

@Seeed_Kian, thanks for replying. I have followed the directions on that page, but get stuck at the point of “… the chip enters Bootloader mode and the burn port appears again.” I think the SAMD21 is in bootloader mode (the orange light is flickering) but the ‘burn port’ doesn’t appear. By “burn port,” I think it’s meant that a drive shows up in my Files window; this doesn’t happen for me.

Any other suggestions? Anyone with experience with this device on a Linux system have similar problems?

-Kevin

@ahsrabrifat, thanks for replying. There is no boot button on a SAMD21.

-Kevin

It seems as if the message I described in dmesg was actually correct: It had to do with the power demand from a USB-C device.

Originally, I had plugged the device into a USB expansion port that I happened to have on my keyboard, because it was more convenient than reaching under my desk. However, when I plugged the device directly into a USB-A port on my PC and reset it, it worked fine, with this output in dmesg:

[ 1306.112870] usb 3-4: New USB device found, idVendor=2886, idProduct=002f, bcdDevice=42.01
[ 1306.112873] usb 3-4: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 1306.112875] usb 3-4: Product: Seeeduino XIAO
[ 1306.112876] usb 3-4: Manufacturer: Seeed Studio
[ 1306.112877] usb 3-4: SerialNumber: DC85AFAA503058414E2E3120FF0B1801
[ 1306.117062] cdc_acm 3-4:1.0: ttyACM0: USB ACM device
[ 1306.117659] usb-storage 3-4:1.2: USB Mass Storage device detected
[ 1306.117990] scsi host7: usb-storage 3-4:1.2
[ 1306.118770] hid-generic 0003:2886:002F.0005: hiddev1,hidraw4: USB HID v1.00 Device [Seeed Studio Seeeduino XIAO] on usb-0000:00:14.0-4/input3

In addition, a drive named “Arduino” appeared in my Files window, and I was able to drag the uf2 file there.

-Kevin