Seeeduino XIAO Pinout (XIAO SAMD21), Datasheet, Schematic [Ultimate Guide]

In this guide, you’ll find the Seeeduino XIAO pinout diagram (the XIAO SAMD21 pinout), its datasheet and schematic diagram, and every pin group explained with its default pins. It’s the original Seeed XIAO pinout reference, for the first board of the Seeed Studio XIAO family (the Seeed Studio XIAO pinout that every later XIAO copied). Without further ado, let’s get right into it!

The Seeeduino XIAO, now sold as the Seeed Studio XIAO SAMD21, is a thumb-sized Arduino-compatible board built on Microchip’s ATSAMD21G18: an Arm Cortex-M0+ at 48MHz with 256KB flash and 32KB SRAM. On a 21 × 17.8mm board, it gives you 11 I/O pins (all 3.3v), 11 analog inputs, a true 10-bit DAC, 10 PWM pins, and native USB on a USB-C port.


Seeeduino XIAO Pinout Diagram

Here is a detailed Seeeduino XIAO Pinout Diagram with colored labels and legends to help you easily identify the functionalities that each pin can perform. It shows all 14 edge pins with their XIAO names (D0–D10, A0–A10), the SAMD21 port pins, and each pin’s analog, DAC, PWM, UART, SPI, I2C and interrupt functions, plus the SWD, RST and VIN pads on the back.

Seeeduino XIAO (Seeed Studio XIAO SAMD21) pinout diagram with digital, analog, DAC, PWM, UART, SPI, I2C, interrupt and SWD pin functions
Seeeduino XIAO (Seeed Studio XIAO SAMD21): 14 edge pins, back-side pads, and on-board parts

Each row shows the XIAO pin number, the pin name used in the Arduino core (D1 · A1…), the SAMD21 port pin (PA04…), and its functions, color-coded by peripheral. The square symbol means the pin is 3.3v only, the PWM symbol marks the 10 pins that can output PWM, and the numbered badges point to the notes at the bottom right of the diagram.

With the USB-C connector at the top, the left edge runs from D0 (pin 1) down to D6 (pin 7), and the right edge runs from D7 (pin 8, bottom) up to 5V (pin 14, top), counter-clockwise like Seeed’s own pin numbering. In the Arduino core, the pin number is the D-number: digitalWrite(6, HIGH) drives D6, and A0– A10 are the same pins as D0–D10. The pads are castellated, so you can solder the board flat onto a PCB, or use the Pre-Soldered version with headers on a breadboard.

Note: The XIAO SAMD21 Plus is a different board: the same 14 edge pins, but it adds 16 castellated pads on the back, a LiPo charger, an RGB LED, and Reset/Boot buttons. This pinout is for the original XIAO SAMD21 (Seeeduino XIAO), including its Pre-Soldered version.

Buy a Seeeduino XIAO: If you don’t have one yet, you can get the genuine Seeed Studio XIAO SAMD21 from Amazon or AliExpress. It’s the cheapest way to get a 32-bit Arm board with native USB into a tiny Arduino project.

Download Seeeduino XIAO Pinout Diagram (Full Resolution)

The Seeeduino XIAO pinout diagram (edge pins, back-side pads, power, MCU and notes panels) in full resolution (5120×2448 px WebP), in one ZIP file. Print it, zoom in, or keep it next to your bench. Please consider supporting my work if it helped you.


Seeeduino XIAO Datasheet

This development board is built around Microchip’s ATSAMD21G18A microcontroller (QFN-48). So the Seeeduino XIAO datasheet set has two parts: Seeed Studio’s documents for the board, and Microchip’s for the chip. Here are the official documents you’ll need, linked to their original sources:

DocumentSourceRevisionWhat You’ll Use It ForLink
XIAO SAMD21 wiki (getting started + specs)Seeed StudioonlineBoard specs, pin map, bootloader steps, Arduino setupWeb
XIAO SAMD21 schematic + PCB (KiCad)Seeed Studiov2.1 (2026-03-04)The current board circuit (see the next section)ZIP
Seeeduino XIAO schematic (old)Seeed Studiov1.0 (2019-11-12)The first board, with the VBUS diode that v2.0 removedPDF
XIAO SAMD21 pinout sheetSeeed StudioonlineSeeed’s pin-by-pin function listXLSX
SAM D21/DA1 Family datasheetMicrochipDS40001882L (Feb 2026)Pin multiplexing (Table 7-1), electrical limits, ADC, DAC, timers, SERCOM, every registerPDF
ATSAMD21G18 product pageMicrochiponlineErrata, application notes, newest datasheet revisionWeb
Seeed ArduinoCore-samd XIAO SAMD21 variantSeeed Studio (GitHub)masterThe Arduino pin map (D0–D10, PWM timers, Serial1, Wire, SPI, LEDs)Web

Which document do I need? The Seeed wiki for setup and the pin list, the schematic for what’s connected to each pin, and the Microchip datasheet for the pin functions, the electrical limits, and register-level details. Seeed’s wiki still links an old Atmel copy of the datasheet; the Microchip link above is the current revision.


Seeeduino XIAO Schematic

The Seeeduino XIAO schematic is Seeed Studio’s XIAO SAMD21 v2.1 drawing, dated 2026-03-04 (KiCad, published for the Pre-Soldered board). Its revision table lists v1.0 (2019-11-12), v1.1 (CE silkscreen and a reset point on the bottom), and v2.0 (2020-05-29): “Remove Schottky diode from VBUS”. All the circuitry is on one sheet, so here is the full sheet followed by close-ups of each block; click a page to view it full screen.

Seeeduino XIAO schematic page 1: full circuit sheet (XIAO SAMD21 v2.1)
Page 1 of 5 · Full Sheet
Seeeduino XIAO schematic page 2: USB-C connector and XC6206 3.3v LDO (XIAO SAMD21 v2.1)
Page 2 of 5 · USB-C & XC6206 LDO
Seeeduino XIAO schematic page 3: ATSAMD21G18 microcontroller and 32.768kHz crystal (XIAO SAMD21 v2.1)
Page 3 of 5 · ATSAMD21G18 & 32.768kHz Crystal
Seeeduino XIAO schematic page 4: TX, RX, L and power LEDs, reset circuit and RST pads (XIAO SAMD21 v2.1)
Page 4 of 5 · LEDs & Reset Pads
Seeeduino XIAO schematic page 5: edge headers J2 and J4 and SWD pads (XIAO SAMD21 v2.1)
Page 5 of 5 · Edge Headers & SWD Pads
Page 1 of 4

Official source: the XIAO SAMD21 v2.1 schematic and PCB files (KiCad ZIP) from the Seeed Studio wiki (the pages above are rendered from it). Here’s what to look at:

  • USB input and the 5V pin: USB-C VBUS goes straight to the 5V edge pin and the VIN pad on the back. Since board v2.0 there’s no diode and no fuse in that path (the v1.0 schematic had a B0540WS Schottky). The two 5.1kΩ CC resistors make any USB-C charger supply 5v.
  • 3.3v regulator: an XC6206P332MR LDO (U1) turns VBUS into the 3.3v rail for the SAMD21, the LEDs and the 3V3 pin, with 10µF on its input and output. Torex rates the XC6206 at 200mA maximum. Seeed’s wiki calls it a “DC-DC converter”, but it’s a linear regulator.
  • ATSAMD21G18 and USB: the MCU (U2) has its USB D+/D− (PA25/PA24) wired straight to the connector, so there’s no USB-UART chip: Serial is the SAMD21’s own USB. VDDANA comes straight from the 3.3v rail, and PA03 (VREFA) only has a 1µF cap to ground, so the ADC reference is the 3.3v rail.
  • Clocks: a 32.768kHz crystal (X1, 12pF caps) sits on PA00/PA01. The 48MHz CPU clock comes from the SAMD21’s DFLL, locked to that crystal (or to USB), so there’s no high-speed crystal on the board.
  • LEDs: TX (blue, PA19), RX (blue, PA18) and L (yellow, PA17) each go from 3.3v through 1kΩ to the MCU pin, so they light when the pin is LOW. The green power LED sits on 3.3v through 1kΩ and is always on.
  • Reset and SWD: RESETN has a 10kΩ pull-up and 100nF to ground. It goes to the two RST pads next to the USB-C connector (TP2, with TP4 = GND) and to the back pad TP1. SWCLK (PA30) and SWDIO (PA31) go to the back pads TP3 and TP5.

Seeeduino XIAO Specs

The Seeeduino XIAO (XIAO SAMD21) was the first board of the XIAO family. Here are its specifications, including the board-level parts that chip-only spec lists usually skip.

Seeeduino XIAO (XIAO SAMD21) development board with ATSAMD21G18 and USB-C

Get a Seeeduino XIAO: The genuine Seeed Studio XIAO SAMD21 is the one I recommend. Grab it from Amazon or AliExpress.

ItemSeeeduino XIAO (XIAO SAMD21)
MCUMicrochip ATSAMD21G18A-MU (QFN-48)
CPUArm Cortex-M0+, up to 48MHz
Memory256KB flash (8KB used by the bootloader, 248KB for your code), 32KB SRAM, no EEPROM
Logic level3.3v on every pin, not 5v tolerant (max VDD + 0.6v on a pin)
I/O pins11 (D0–D10), on 14 castellated edge pads
Analog inputs11 (A0–A10), 12-bit, 350ksps
Analog output1 true 10-bit DAC on A0
PWM10 pins (D1–D10), 8 independent duty cycles
Interfaces1× UART (Serial1), 1× I2C (Wire), 1× SPI, native USB (Serial)
Board supplyUSB-C 5v, the 5V pin, or the VIN pad on the back (all the same net)
3.3v regulatorXC6206P332MR LDO, rated 200mA maximum
Pin current2mA source / 2.5mA sink by default, 7mA / 10mA with strong drive (DRVSTR)
Clock32.768kHz crystal; 48MHz from the internal DFLL
USB connectorUSB-C to the SAMD21’s native USB 2.0 full-speed; no USB-UART chip
Buttons and LEDsNo buttons (RST pads instead); L, TX, RX LEDs (active LOW) and a green power LED
DebugSWD on the back pads (SWCLK, SWDIO, RST, GND)
Size21 × 17.8mm, XIAO form factor, surface-mountable
Nobattery charger, Wi-Fi/Bluetooth, 5v-tolerant pins, I2C pull-ups, EEPROM

Seeeduino XIAO Specifications Summary

  • The Seeeduino XIAO runs an ATSAMD21G18 Cortex-M0+ at 48MHz with 256KB flash (248KB free) and 32KB SRAM.
  • It has 11 I/O pins (D0–D10), and every pin is 3.3v only: none of them is 5v tolerant.
  • Each pin drives only 2mA by default, because the Arduino core doesn’t turn on the SAMD21’s strong drive (7mA).
  • All 11 pins are analog inputs (A0–A10), 12-bit, but analogRead() returns 10-bit until you call analogReadResolution(12).
  • A0 (D0) is a true 10-bit DAC output, and it has no PWM.
  • 10 pins output PWM (D1–D10), but D4 and D10 share one duty cycle, and so do D5 and D8.
  • The I2C pins are D4 (SDA) and D5 (SCL), with no pull-up resistors on the board.
  • Serial is USB; Serial1 is D6 (TX) / D7 (RX); SPI is D8 (SCK), D9 (MISO), D10 (MOSI).
  • Every pin can be an interrupt, but D5 and D7 share one interrupt line, and D4 is the NMI.
  • LED_BUILTIN is 13 (the yellow L LED on PA17), and it’s active LOW.
  • The 5V pin and the VIN pad are raw USB VBUS, with no diode since board v2.0.
  • Short the two RST pads twice quickly to start the UF2 bootloader.

Seeeduino XIAO Peripherals: SAMD21 vs On the Pins

The SAMD21 has flexible pin muxing: each pin offers a few SERCOM, timer and analog functions (Table 7-1 of the datasheet). This table shows what the chip has and what you can actually reach on the XIAO edge.

PeripheralATSAMD21G18AOn the Seeeduino XIAO
GPIO3811 (D0–D10) + 2 SWD pads
ADC12-bit, 350ksps, 14 channels on this package11 (A0–A10)
DAC1× 10-bitA0 (D0)
PWMTCC0 (4 channels), TCC1 (2), TCC2 (2), TC3–TC510 pins, 8 independent duty cycles
SERCOM (UART/SPI/I2C)6Serial1 (SERCOM4), SPI (SERCOM0), Wire (SERCOM2)
I2S1possible on D2, D3, D4, D5, D8 (clashes with Wire/SPI)
Touch (PTC)yesA0, A1, A6–A10 (FreeTouch library, CircuitPython touchio)
External interrupts16 lines + NMI11 pins (D5 and D7 share line 9)
USBfull-speed device/hostUSB-C connector
Wi-Fi / EEPROMnone–

Seeeduino XIAO Quick Pin Selection Guide

Not sure which pin to use? Here are the Seeeduino XIAO pins I’d pick first for each job, and why.

Use CaseRecommended PinsWhy
Serial to the PCUSB-C (Serial)USB CDC on the SAMD21’s own USB
Serial to a module (GPS, GSM…)D7 (RX), D6 (TX)The Arduino Serial1 pins (SERCOM4)
I2C sensors and displaysD4 (SDA), D5 (SCL)The Arduino Wire pins, same place on every XIAO
SPI devicesD8 (SCK), D9 (MISO), D10 (MOSI), CS on D7 or D3The Arduino SPI pins; there’s no fixed CS
Analog output (audio, voltage)A0The only DAC pin, true 10-bit
Analog inputsA1, A2, A3, then A6–A10Keep A0 free for the DAC, A4/A5 for I2C
PWM (LEDs, servos)D1, D2, D3, D9TCC0 channels with their own duty cycles
InterruptsD1, D2, D3, D8, D9, D10Each one on its own interrupt line
On-board LEDLED_BUILTIN (13) (LOW = on)No wiring needed
DebuggingSWCLK, SWDIO back padsSWD with a J-Link, Atmel-ICE or CMSIS-DAP probe

Seeeduino XIAO Pins to Use With Caution

PinReasonWhat to Do
All pins3.3v only, not 5v tolerantLevel-shift every 5v signal
All pins2mA default driveTurn on DRVSTR (7mA) or drive loads through a transistor
D0 / A0DAC pin, no PWMUse analogWrite() on A0 only for the DAC; PWM on D1–D10
D4 / D10Same PWM duty cycle (TCC1 channel 0)Use only one of them for PWM
D5 / D8Same PWM duty cycle (TCC1 channel 1)Use only one of them for PWM
D5 / D7Share interrupt line EXTINT9Never attach interrupts to both
D4Its interrupt is the NMIIt can’t be masked with noInterrupts()
5V / VINRaw USB VBUS, no diode or fuseNever feed 5v here with USB plugged in; add a Schottky diode
3V3200mA LDO shared with the boardKeep external loads near 100mA

XIAO SAMD21 Pinout: Pins Functions

The 14 edge pins of the Seeeduino XIAO (plus the back pads) are divided into the following groups based on the hardware functionality they’re used for. Most I/O pins belong to several groups at once.

We’ll discuss each pin group in the following sections one by one in more detail.


Seeeduino XIAO Power Pins

The Seeeduino XIAO is powered from the USB-C port (5v), from the 5V pin, or from the VIN pad on the back, and all three are the same net. The 3V3 pin is the XC6206 regulator’s output. The power pins are highlighted in red in the pinout diagram.

Seeeduino XIAO (XIAO SAMD21) power pins (5V USB VBUS, 3V3 output, GND)

PinXIAO PinRangeNotes
5V145v in/outUSB VBUS directly: no diode since v2.0, no fuse
3V3123.3v outXC6206 LDO output, 200mA max, shared with the SAMD21 and LEDs
GND130vPlus the GND pads on the back
VINback pad5v inSame net as the 5V pin (not a separate input)

How much current can the 3V3 pin supply? Seeed doesn’t give a figure. The XC6206 is rated 200mA, and the SAMD21 and the LEDs take their share, so keep external loads near 100mA, as testers on the Seeed forum suggest. An LDO also turns the extra voltage into heat, so 5v in at 200mA out is about 0.34W in that tiny SOT-23 package.

Can I power the Seeeduino XIAO from a LiPo battery? Not directly. There’s no charger and no battery protection, and Seeed’s wiki says never to connect a LiPo to VIN/GND. A single cell (3.7v) on the 5V pin also leaves the XC6206 without headroom. Use a charger/boost module that outputs 5v into the 5V pin, or pick the XIAO SAMD21 Plus, which has a charger.

Note: The 5V pin and the VIN pad are wired straight to the USB-C connector’s VBUS. Since board v2.0 (2020), there’s no diode, even though Seeed’s wiki still says the VIN pads “bypass the protection diode”. Feeding 5v into them while USB is plugged in back-feeds your PC’s USB port (Seeed forum). Unplug USB first, or put a Schottky diode in series with your supply.


Seeeduino XIAO GPIO Pins

The Seeeduino XIAO has 11 GPIO pins: D0–D10 (PA02, PA04–PA11, PB08, PB09). They all work at 3.3v, and none of them is 5v tolerant. Every one of them can be a digital input, a digital output, an analog input, or an interrupt source.

Seeeduino XIAO (XIAO SAMD21) GPIO pins D0-D10 with their SAMD21 port pins

Here are the electrical limits (SAM D21 datasheet DS40001882L):

  • Logic level 3.3v; never apply more than VDD + 0.6v (about 3.9v) to any pin.
  • Normal drive: 2mA source and 2.5mA sink. With the pin’s DRVSTR bit set: 7mA and 10mA. A bigger load just pulls the voltage away from 3.3v or 0v.
  • Pins are grouped in clusters with a total of 46mA source and 65mA sink each, so a few strong-drive LEDs is fine; one per pin on all 11 isn’t.
  • Internal pull-ups and pull-downs: INPUT_PULLUP and INPUT_PULLDOWN both work.
  • The pins you don’t see: PA17/PA18/PA19 (L, RX, TX LEDs, Arduino 13/12/11), PA24/PA25 (USB), PA00/PA01 (crystal), PA30/PA31 (SWD pads).

The Seeed core’s pinMode(pin, OUTPUT) doesn’t set DRVSTR, so a pin set HIGH with a 10mA LED on it sags well below 3.3v (one user measured a 200mV drop with a light load). Turn strong drive on with one register line after pinMode():

Learn more in our Arduino digitalWrite() GPIO Tutorial.


Seeeduino XIAO Interrupt Pins

All 11 I/O pins of the Seeeduino XIAO can trigger an external interrupt with attachInterrupt(digitalPinToInterrupt(pin), isr, mode). There are two catches: D5 and D7 share interrupt line EXTINT9, and D4 is the NMI (non-maskable interrupt) instead of a normal line.

PinPortInterrupt LinePinPortInterrupt Line
D0PA02EXTINT2D6PB08EXTINT8
D1PA04EXTINT4D7PB09EXTINT9 (shared with D5)
D2PA10EXTINT10D8PA07EXTINT7
D3PA11EXTINT11D9PA05EXTINT5
D4PA08NMID10PA06EXTINT6
D5PA09EXTINT9 (shared with D7)

Because D5 and D7 use the same line, only one of them can have an interrupt at a time: attaching the second one replaces the first (Seeed forum). D4 works with attachInterrupt() too (the Seeed core sets up the NMI for it), but an NMI can’t be turned off with noInterrupts(), so keep its ISR short and safe.

Learn more in our Arduino External Interrupts Tutorial.


Seeeduino XIAO ADC & DAC Pins

Every I/O pin of the Seeeduino XIAO is an analog input: A0–A10 (D0–D10), on the SAMD21’s 12-bit ADC at up to 350ksps. A0 is also a true 10-bit DAC output, which gives you a real analog voltage from 0v to 3.3v, not PWM. The analog pins are highlighted in green in the pinout diagram.

Seeeduino XIAO (XIAO SAMD21) ADC pins A0-A10 and the 10-bit DAC on A0

PinPortADC ChannelPinPortADC Channel
A0 (DAC)PA02AIN0A6PB08AIN2
A1PA04AIN4A7PB09AIN3
A2PA10AIN18A8PA07AIN7
A3PA11AIN19A9PA05AIN5
A4PA08AIN16A10PA06AIN6
A5PA09AIN17

The Arduino core starts with Arduino UNO-style defaults: analogRead() returns 10-bit values (0–1023) and analogWrite() takes 8-bit values. Call analogReadResolution(12) for the full 0–4095 range, and analogWriteResolution(10) to use the DAC’s full 0–1023 range. Here’s a sketch that outputs a ramp on the DAC and reads it back on A1 (wire A0 to A1):

Note: The ADC reference is the 3.3v rail by default (VREFA on PA03 isn’t on an edge pin), so the readings move with the regulator output. The DAC output is weak too: it’s meant for a high-impedance input, so buffer it with an op-amp before driving a speaker or a low-impedance load.

There are so many things that we can do with the analog pins, which include: reading potentiometers, LDRs, NTC thermistors and soil moisture sensors, generating audio tones and waveforms with the DAC, capacitive touch buttons on the touch-capable pins, and much more.

Learn more in our Arduino ADC analogRead() Tutorial.


Seeeduino XIAO PWM Pins

The Seeeduino XIAO has 10 PWM pins: D1–D10 (D0 is the DAC). They run on three timers (TCC0, TCC1 and TC4), and two pairs share a compare channel: D4 and D10 always have the same duty cycle, and so do D5 and D8. So you get 8 independent PWM outputs. The PWM pins are highlighted in the pinout diagram.

Seeeduino XIAO (XIAO SAMD21) PWM pins D1-D10 on TCC0, TCC1 and TC4

Seeeduino XIAO PWM Pins: D1–D10, with D4 = D10 and D5 = D8.

PinPortTimer OutputDuty Cycle Shared With
D1PA04TCC0/WO0–
D9PA05TCC0/WO1–
D2PA10TCC0/WO2–
D3PA11TCC0/WO3–
D10PA06TCC1/WO0 (channel 0)D4
D4PA08TCC1/WO2 (channel 0)D10
D8PA07TCC1/WO1 (channel 1)D5
D5PA09TCC1/WO3 (channel 1)D8
D6PB08TC4/WO0–
D7PB09TC4/WO1–

TCC1 has only two compare channels but four outputs, so WO2 and WO3 repeat channels 0 and 1. This sketch shows it: D4 ends up with the same 80% duty cycle as D10, whatever you wrote to it first (reproduced on 3 boards on the Seeed forum):

The core’s PWM runs at about 732Hz on TCC pins (48MHz / 65536), fine for LEDs and motors. Servos need 50Hz, which the Servo library generates on its own timer, so you can still use any pin for them.

There are so many things that we can control with PWM, which include: LED dimming, RGB LEDs, DC motor speed (with a driver), servo motors, buzzers, and much more.

Learn more in our Arduino PWM analogWrite() Tutorial.


Seeeduino XIAO UART Pins

The Seeeduino XIAO has one hardware UART on its pins: Serial1 on D6 (TX) and D7 (RX), on the SAMD21’s SERCOM4. Serial is the USB-C port (USB CDC), not a pin. The UART pins are highlighted in blue in the pinout diagram.

Seeeduino XIAO (XIAO SAMD21) UART pins (D6 TX PB08, D7 RX PB09 on SERCOM4)

Seeeduino XIAO Default UART Pins: D6 (TX) and D7 (RX) for Serial1.

PortArduino ObjectTX PinRX PinNote
USB CDCSerialUSB-CUSB-CThe Serial Monitor port
SERCOM4Serial1D6 (PB08)D7 (PB09)Hardware UART

Since Serial is native USB, it disappears and comes back on every reset. Wait for it in setup() if you don’t want to miss the first prints, but only with a timeout, or a battery-powered board will hang there forever:

There are so many modules that we can interface with the UART pins, which include: GPS modules, GSM/LTE modules, fingerprint sensors, RS485 transceivers, DFPlayer Mini, other microcontrollers, and much more.

Learn more in our Arduino UART Serial Communication Tutorial.


Seeeduino XIAO I2C Pins

The Seeeduino XIAO I2C pins are D4 (SDA) and D5 (SCL), on the SAMD21’s SERCOM2, the same place as on every XIAO board, so Grove and XIAO expansion boards work out of the box. In the Arduino core, that’s the Wire object. The I2C pins are highlighted in yellow in the pinout diagram.

Seeeduino XIAO (XIAO SAMD21) I2C pins (D4 SDA PA08, D5 SCL PA09 on SERCOM2)

Seeeduino XIAO Default I2C Pins: D4 (SDA) and D5 (SCL).

SignalPinPortSAMD21 Peripheral
SDAD4 / A4PA08SERCOM2 PAD0
SCLD5 / A5PA09SERCOM2 PAD1

Note: There are no I2C pull-up resistors on the Seeeduino XIAO, and the SAMD21’s internal pull-ups are too weak for I2C. If an I2C scanner finds nothing (or hangs), add 4.7kΩ pull-ups from SDA and SCL to 3.3v (not 5v), unless your module already has them (Seeed forum).

There are so many modules and sensors that we can interface with the I2C bus, which include: OLED displays (SSD1306), RTC modules (DS3231), IMUs (MPU6050), BME280 sensors, port expanders, and much more.

Learn more in our Arduino I2C Tutorial.


Seeeduino XIAO SPI Pins

The Seeeduino XIAO SPI pins are D8 (SCK), D9 (MISO) and D10 (MOSI), on the SAMD21’s SERCOM0. There’s no fixed CS (SS) pin, so choose any free pin, such as D7 or D3. The SPI pins are highlighted in pink in the pinout diagram.

Seeeduino XIAO (XIAO SAMD21) SPI pins (D8 SCK PA07, D9 MISO PA05, D10 MOSI PA06 on SERCOM0)

Seeeduino XIAO Default SPI Pins: D8 (SCK), D9 (MISO), and D10 (MOSI), with CS on a pin you choose.

SignalPinPortSAMD21 Peripheral
SCKD8 / A8PA07SERCOM0 PAD3
MISOD9 / A9PA05SERCOM0 PAD1
MOSID10 / A10PA06SERCOM0 PAD2
CSany free pin–GPIO

There are so many modules that we can interface with the SPI bus, which include: TFT displays (ST7789, GC9A01), SD card modules, LoRa radios (SX1276), nRF24L01 radios, MAX7219 LED drivers, and much more.


Seeeduino XIAO SWD, Reset & Bootloader

The Seeeduino XIAO has no buttons. Instead, it has two RST pads next to the USB-C connector, and the SWD debug pads (SWCLK, SWDIO, RST, GND) on the back, together with the VIN and GND pads.

Seeeduino XIAO (XIAO SAMD21) SWD and reset pads (SWCLK PA30, SWDIO PA31, RST)

PadSignalUse
RST pads (front, TP2 + TP4)RESETN + GNDShort once = reset; short twice quickly = bootloader
SWCLK (back, TP3)PA30SWD clock
SWDIO (back, TP5)PA31SWD data
RST (back, TP1)RESETN (10kΩ pull-up)Reset for the debug probe
GND (back, TP6)GNDProbe ground
VIN / GND (back, bottom)USB VBUS / GNDPower input (same net as 5V); not battery pads

Seen from the back with USB-C at the top, the SWD pads form a 2×2 group: SWCLK (left) and SWDIO (right) on top, GND (left) and RST (right) below them. Connect a J-Link, an Atmel-ICE, or a CMSIS-DAP probe (a Raspberry Pi Debug Probe works) and debug with OpenOCD and GDB, or reflash the bootloader.

Seeeduino XIAO Bootloader Mode (Recover a Missing COM Port)

If an upload fails or a sketch crashes, the Seeeduino XIAO’s COM port can disappear. The UF2 bootloader always brings it back (Seeed forum):

  1. Short the two RST pads twice, quickly (tweezers or a wire). The yellow L LED flickers, then stays lit.
  2. The bootloader COM port appears on your PC, together with a small UF2 USB drive.
  3. Upload from the Arduino IDE on that port, or drop a .uf2 file (CircuitPython, a compiled sketch) on the drive.

Note: The bootloader sits in the first 8KB of flash, which is where Seeed’s wiki gets its “8KB” flash figure: your sketch gets the other 248KB. If the bootloader itself is erased (for example by a bad SWD flash), the double-tap does nothing, and only an SWD probe can write it back (Hackster unbrick guide).


Getting Started With Seeeduino XIAO

You can program the Seeeduino XIAO with the Arduino IDE, CircuitPython, MicroPython, PlatformIO, TinyGo, Rust or Zephyr, all over the USB-C cable. No external programmer is needed.

  • Arduino IDE: add https://files.seeedstudio.com/arduino/package_seeeduino_boards_index.json to the Boards Manager URLs, install “Seeed SAMD Boards”, then select Seeeduino XIAO M0 (the board’s name in the IDE).
  • CircuitPython: flash the Seeeduino XIAO build through the bootloader drive and use board.D0– board.D10 / board.A0– board.A10; touchio works on the touch pins.
  • TinyGo: target xiao, with the same D-names (TinyGo XIAO docs).
  • PlatformIO: board seeed_xiao on the Atmel SAM platform.
Arduino NamePinDefault
SerialUSB-CUSB CDC
Serial1D6 (TX), D7 (RX)SERCOM4
WireD4 (SDA), D5 (SCL)SERCOM2, no pull-ups
SPID8 / D9 / D10SERCOM0; choose your own CS
A0–A10D0–D1010-bit by default (12-bit available)
DAC0A08-bit by default (10-bit available)
LED_BUILTIN13 (PA17)Yellow L LED, active LOW
PIN_LED2 / PIN_LED312 (PA18) / 11 (PA19)Blue RX / TX LEDs, active LOW

The classic Blink sketch works, but in reverse: digitalWrite(LED_BUILTIN, LOW) turns the yellow LED on. The TX and RX LEDs blink with USB traffic, and you can drive them yourself on pins 11 and 12.

Tip: Low power: the SAMD21 has idle and standby modes (the ArduinoLowPower library uses standby). The green power LED alone draws about 1mA all the time; users report a Seeeduino XIAO in standby at about 13µA–29µA once that LED is removed (Seeed forum).


Seeeduino XIAO Common Problems & Fixes

Why did the COM port disappear? A failed upload or a crashing sketch. Short the RST pads twice quickly to start the bootloader, then upload again on the port that appears.

Why does analogWrite() on D4 also change D10? D4 and D10 share TCC1 channel 0 (and D5/D8 share channel 1). Use only one pin of each pair for PWM.

Why do my interrupts on D5 and D7 not both work? They share interrupt line EXTINT9. Move one of them to another pin.

Why is the LED on when I write LOW? L, TX and RX are wired from 3.3v to the pin, so they’re active LOW. That’s by design.

Why does my I2C scanner find nothing? There are no pull-ups on D4/D5. Add 4.7kΩ resistors to 3.3v.

Why does my LED look dim, or the pin voltage sag? The default drive is 2mA. Set DRVSTR (7mA) or use a transistor.

Why does my DAC output only go up in big steps? analogWrite() is 8-bit by default. Call analogWriteResolution(10).

Is the Seeeduino XIAO 5v tolerant? No. Every pin is 3.3v only. Use a level shifter or a divider for 5v signals.

Why does my PC complain when I power the 5V pin? The 5V pin is raw VBUS with no diode (since v2.0), so your supply back-feeds the USB port. Unplug USB, or add a diode.


Seeeduino XIAO vs XIAO RP2040 vs XIAO SAMD21 Plus vs Arduino Nano

The Seeeduino XIAO has three close relatives: Seeed’s XIAO RP2040 (same footprint, faster chip), Seeed’s XIAO SAMD21 Plus (same chip, more pads and a charger), and the classic Arduino Nano it’s often compared with. Here’s how they compare:

FeatureSeeeduino XIAO (XIAO SAMD21)XIAO RP2040XIAO SAMD21 PlusArduino Nano
MCUSAMD21, M0+ 48MHzRP2040, 2× M0+ 133MHzSAMD21, M0+ 48MHzATmega328P, 16MHz
Flash / RAM256KB / 32KB2MB / 264KB256KB / 32KB32KB / 2KB
I/O pins111127 (11 + 16 back pads)22
Analog inputs (edge pins)114118
DACYes (A0)NoYesNo
Logic level3.3v3.3v3.3v5v
Battery chargerNoNoYesNo
Size21 × 17.8mm21 × 17.8mm21 × 17.8mm45 × 18mm

Pick the Seeeduino XIAO for small Arduino projects that need many analog inputs or a real DAC. Pick the XIAO RP2040 when you need more speed and memory in the same footprint, the Plus for more pins and a LiPo charger, and the Nano when your sensors and modules are 5v.


Seeeduino XIAO Pin Details

Here is every Seeeduino XIAO pin in physical order, with its SAMD21 port pin, main functions, all its other functions (from Table 7-1 of the datasheet), and a short description. With the USB-C connector at the top, pin 1 (D0) is the top-left pad, pins 1–7 run down the left edge, and pins 8–14 run up the right edge.

Click to expand the full pin table (18 pins)
PinLabelPortMain FunctionsOther Functions5v TolerantDescription
1D0 / A0PA02DAC output, AIN0, EXTINT2PTC Y0No (3.3v)The DAC pin (true 10-bit analog output) and an analog input; no PWM.
2D1 / A1PA04AIN4, PWM TCC0/WO0, EXTINT4VREFB, AC AIN0, PTC Y2, SERCOM0 PAD0No (3.3v)Analog input with an independent PWM channel; a good first analog pin.
3D2 / A2PA10AIN18, PWM TCC0/WO2, EXTINT10SERCOM0/2 PAD2, TCC1/WO0, I2S SCK0, GCLK_IO4No (3.3v)Analog input, independent PWM, and a free interrupt line.
4D3 / A3PA11AIN19, PWM TCC0/WO3, EXTINT11SERCOM0/2 PAD3, TCC1/WO1, I2S FS0, GCLK_IO5No (3.3v)Analog input, independent PWM; a good SPI CS pin.
5D4 / A4 / SDAPA08I2C SDA (Wire, SERCOM2 PAD0), AIN16, PWM TCC1/WO2, NMISERCOM0 PAD0, TCC0/WO0, I2S SD1, PTC X0No (3.3v)The default I2C data pin; its PWM follows D10, and its interrupt is the NMI.
6D5 / A5 / SCLPA09I2C SCL (Wire, SERCOM2 PAD1), AIN17, PWM TCC1/WO3, EXTINT9SERCOM0 PAD1, TCC0/WO1, I2S MCK0, PTC X1No (3.3v)The default I2C clock pin; its PWM follows D8, and it shares EXTINT9 with D7.
7D6 / A6 / TXPB08Serial1 TX (SERCOM4 PAD0), AIN2, PWM TC4/WO0, EXTINT8PTC Y14No (3.3v)Serial1 transmit.
8D7 / A7 / RXPB09Serial1 RX (SERCOM4 PAD1), AIN3, PWM TC4/WO1, EXTINT9PTC Y15No (3.3v)Serial1 receive; shares EXTINT9 with D5.
9D8 / A8 / SCKPA07SPI SCK (SERCOM0 PAD3), AIN7, PWM TCC1/WO1, EXTINT7AC AIN3, PTC Y5, I2S SD0No (3.3v)The default SPI clock pin; its PWM follows D5.
10D9 / A9 / MISOPA05SPI MISO (SERCOM0 PAD1), AIN5, PWM TCC0/WO1, EXTINT5AC AIN1, PTC Y3No (3.3v)The default SPI data-in pin, with an independent PWM channel.
11D10 / A10 / MOSIPA06SPI MOSI (SERCOM0 PAD2), AIN6, PWM TCC1/WO0, EXTINT6AC AIN2, PTC Y4No (3.3v)The default SPI data-out pin; its PWM follows D4.
123V3–3.3v output––XC6206 regulator output, 200mA max shared with the board.
13GND–Ground––Ground.
145V–USB VBUS––5v straight from the USB-C connector; no diode or fuse.
backSWCLK / SWDIOPA30 / PA31SWDSERCOM1 PAD2/PAD3, TCC1/WO0/WO1No (3.3v)Serial Wire Debug pads for a debug probe.
backRST–Reset––RESETN; pull LOW to reset, like the front RST pads.
backVIN–USB VBUS––Same net as the 5V pin; not a battery input.
backGND (×2)–Ground––Ground pads next to SWD and next to VIN.

Wrap Up

To conclude this guide article, the Seeeduino XIAO (XIAO SAMD21) is a very solid board for small Arduino projects that need a 32-bit chip, native USB, and lots of analog pins in the smallest possible space. It gives you a 48MHz SAMD21, 11 analog inputs, a true DAC and 10 PWM pins on a board the size of your thumbnail. Just remember the board-level gotchas: every pin is 3.3v only with a 2mA default drive, D4/D10 and D5/D8 share PWM, D5/D7 share an interrupt line, the LEDs are active LOW, and the 5V pin is raw USB VBUS.

I hope you’ve found this guide helpful for deciding which pins to use for your project. For more boards, check out the Pinouts, Datasheets & Schematic Diagrams Library. Follow this Arduino Series of Tutorials to learn more about Arduino programming.

If you’re just getting started with Arduino, you need to check out the Arduino Programming Getting Started Ultimate Guide below.

Getting Started With Arduino Programming For Beginners

The complete beginner’s guide to Arduino programming: installing the IDE, your first sketch, and the Arduino tutorials series step by step.

Share This Page With Your Network!
Join Our +25,000 Newsletter Subscribers!

Stay Updated With All New Content Releases. You Also Get Occasional FREE Coupon Codes For Courses & Other Stuff!

Photo of author
Author
Embedded systems engineer with several years of experience in embedded software and hardware design. I work as an embedded SW engineer in the Automotive & e-Mobility industry. However, I still do Hardware design and SW development for DSP, Control Systems, Robotics, AI/ML, and other fields I'm passionate about.
I love reading, writing, creating projects, and teaching. A reader by day and a writer by night, it's my lifestyle. I believe that the combination of brilliant minds, bold ideas, and a complete disregard for what is possible, can and will change the world! I will be there when it happens, will you?

Leave a Comment