Hi there,
So, It happens… it’s kinda a Kink in the samd21 Hitting Cancel during upload in Arduino IDE 2.x, it often leaves the Xiao SAMD21 in perpetual bootloader/DFU mode.
In this mode:
- It appears as a USB storage device (like
Arduino
orPORTALBOOT
) - It does not enumerate as a COM port
- Uploads fail from the Arduino IDE
This is normal behavior for SAMD21 chips — but you need to nudge it back into a healthy state. You have a few options here.
You don’t say what else you have tried , so I’ll list it all and you can confirm.
OPTION 1: Double-Tap Reset Button
If the board has a reset button: (some have only a pin)
- Double-tap it quickly (within 500ms).
- The board should reappear as a bootloader port (
PORTALBOOT
, or a COM port if the bootloader is healthy). - Try re-uploading the sketch via Arduino IDE.
If the double-tap doesn’t work, the bootloader may be corrupted.
OPTION 2: Burn Bootloader (recommended in this case)
Since it’s stuck in DFU mode, burning the bootloader is the correct fix.
You’ll need:
Required:
- A working USB-to-Serial adapter, or a debugger (like a J-Link or Atmel ICE)
- Or another Arduino used as an SWD programmer (harder setup)
- The Adafruit SAMD21 UF2 bootloader or Seeed’s Xiao bootloader
bossac
tool (if doing it CLI)- Optional: Arduino IDE > Tools > Burn Bootloader if supported
Quick Fix with bossac
(if DFU port is visible):
If the Xiao still shows up as a serial port:
- Open Terminal or CMD and run:
bossac --port=COMxx -U true -e -w -v -b path_to_bootloader.bin -R
Replace:
COMxx
with the correct portpath_to_bootloader.bin
with the Xiao SAMD21 bootloader binary
Seeed Xiao SAMD21 Bootloader Binary:
Seeed official UF2 bootloader:
Binary direct:
OPTION 3: Use Arduino IDE: Burn Bootloader (if supported)
- Plug in the Xiao
- Open Arduino IDE
- Go to
Tools > Programmer
and choose “Atmel SAM-ICE” or similar - Click “Burn Bootloader”
This requires a real programmer like J-Link or ICE — it won’t work over USB alone.
OPTION 4: Drag and Drop a .UF2
File
If your Xiao appears as a USB mass storage device:
- Download a .uf2 firmware (any valid sketch or bootloader)
- Drag and drop it onto the Xiao’s mounted USB drive
- It should reboot and return to normal
Summary:
Situation | Fix |
---|---|
Stuck in DFU/PORTALBOOT | Double-tap reset or burn bootloader |
No COM port in Arduino IDE | Reflash bootloader using bossac or J-Link |
Upload always fails | Likely needs fresh bootloader + working sketch |
This is the Kitchen Sink …
HTH
GL PJ
Option 4 would be most desirable.