Xiao SAMD21 stuck in DFU mode

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 or PORTALBOOT)
  • 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)

  1. Double-tap it quickly (within 500ms).
  2. The board should reappear as a bootloader port (PORTALBOOT, or a COM port if the bootloader is healthy).
  3. Try re-uploading the sketch via Arduino IDE.

:warning: 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:

:toolbox: 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

:rocket: Quick Fix with bossac (if DFU port is visible):

If the Xiao still shows up as a serial port:

  1. 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 port
  • path_to_bootloader.bin with the Xiao SAMD21 bootloader binary

:brick: Seeed Xiao SAMD21 Bootloader Binary:
Seeed official UF2 bootloader:

Binary direct:

OPTION 3: Use Arduino IDE: Burn Bootloader (if supported)

  1. Plug in the Xiao
  2. Open Arduino IDE
  3. Go to Tools > Programmer and choose “Atmel SAM-ICE” or similar
  4. 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:

  1. Download a .uf2 firmware (any valid sketch or bootloader)
  2. Drag and drop it onto the Xiao’s mounted USB drive
  3. It should reboot and return to normal

:brain: 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 :slight_smile: PJ :v:

Option 4 would be most desirable. :+1: