The Seeed Studio XIAO BLE (nRF52840) is an exceptionally small, powerful development board designed for wearables and low-power IoT. However, because it runs a custom Adafruit nRF52 bootloader, users occasionally lock up the MCU or overwrite the bootloader partition while flashing bare-metal C or custom Zephyr RTOS applications. Once the bootloader is bricked, the board will no longer enumerate as a USB mass storage device or virtual COM port.
SWD Hookup Pinout
To restore the bootloader, you must bypass the USB interface and flash the bootloader directly to the nRF52840’s internal flash memory via the Serial Wire Debug (SWD) interface. The XIAO BLE exposes tiny gold SWD test pads on its underside:
- GND: Connect to debugger Ground
- CLK (SWDCLK): Connect to debugger SWD Clock
- DIO (SWDIO): Connect to debugger SWD Data
- RST: Connect to debugger Reset (optional, but recommended for hardware-level reset)
- 3V3: Supply 3.3V power to the board
Flashing with J-Link and OpenOCD
Once your debugger (e.g., SEGGER J-Link, DAPLink, or Raspberry Pi Pico configured as Picoprobe) is hooked up, use OpenOCD or J-Link Commander to erase the chip and flash the bootloader hex file. Below is the command-line instruction for OpenOCD:
openocd -f interface/jlink.cfg -c "transport select swd" \
-f target/nrf52.cfg \
-c "init; halt; nrf5 mass_erase; program xiao_ble_bootloader.hex verify; reset; exit"
After a successful flashing operation, the status LED on the XIAO BLE will pulse slowly (breathing effect), indicating that the bootloader is active and waiting for a USB connection.
Open-Source Repository
You can download pre-compiled bootloader binaries, pinout diagrams, and detailed scripts from our GitHub repository: Flashing-Bootloader-Xiao-BlE.
Need help with Seeed Studio XIAO BLE bootloader recovery? Contact our engineering team.
