Skip to content
My Account

Reference

Seeed Studio XIAO nRF52840 Pinout

The Seeed XIAO nRF52840 pin reference: every pin with its nRF pin, the RGB and charge LEDs, the Sense sensors, battery reading and the double-tap bootloader.

  • nRF52840
  • 64 MHz
  • BLE
  • Thread
No ratings yet, be the first.

The Seeed Studio XIAO nRF52840 is a thumb-sized Bluetooth board (21 × 17.8 mm) built on the Nordic nRF52840, an Arm Cortex-M4F at 64 MHz. It is the first chip on this site that is not from Espressif, and it has no Wi-Fi at all: it is made for low-power Bluetooth LE, Thread and Zigbee devices that run for months on a small battery. The Sense version adds an IMU and a digital microphone.

This guide covers every pin with its nRF pin, the three LEDs, the charger, the Sense sensors, flashing with the double-tap bootloader, and the traps. The data comes from the Seeed Studio wiki. The wiki contradicts itself in a few places, and this guide says where. I did not read the Nordic datasheet for this update.

System-on-chip and board

ItemValue
ChipNordic nRF52840, Arm Cortex-M4F with FPU, 64 MHz
Memory1 MB flash and 256 KB RAM in the chip, plus 2 MB QSPI flash on the board (P25Q16H)
RadioBluetooth LE (the wiki says 5.0 in one place and 5.4 in another), Bluetooth Mesh, 802.15.4 (Thread, Zigbee) and NFC-A. No Wi-Fi
AntennaCeramic antenna on board, with an RF switch (select P2.05, power P2.03)
USBUSB-C
ChargerBQ25101 for a 3.7 V lithium cell
LEDsRGB LED (red P0.26, green P0.30, blue P0.06) and a charge LED (P0.17)
ButtonReset on P0.18. Double-tap for the bootloader
NFC padsNFC1 on P0.09 and NFC2 on P0.10
Standby currentBelow 5 µA
Size21 × 17.8 mm

Source: Seeed Studio XIAO nRF52840 wiki.

Getting started

1. What you needThe XIAO nRF52840 (or Sense), a USB-C data cable, and if you want to use a battery, a qualified 3.7 V lithium cell.
2. Install the board packageIn the Arduino IDE add Seeed’s “Seeed nRF52 Boards” package. For the Sense sensors and machine learning, Seeed recommends their separate mbed-enabled package.
3. Upload the sketchChoose Seeed XIAO nRF52840, upload the Bluetooth example below, and look for the device on your phone. If the port does not appear, double-tap RESET to enter the bootloader.

Specifications

SupplyUSB-C 5 V, or a 3.7 V lithium cell. The 5V pad is VBUS and works as an input or an output
3V3 outputA pad, current rating not given in the wiki
Charge currentAbout 50 mA by default (P0.13 as a high-impedance input), about 100 mA when P0.13 is driven low
Charge LEDP0.17, LOW = charging
GPIO11 on the header (the Plus has up to 18)
Logic level3.3 V, no 5 V tolerance

The wiki labels one charge section “green light” while the text says red, and the code example for low charge current drives P0.13 HIGH although the text says to use high impedance. Check the behaviour on your own board.

Source: Seeed Studio XIAO nRF52840 wiki.

Dimensions

The board is 21 × 17.8 mm. The Sense version carries the IMU and the microphone on the same board, so it has the same footprint. Seeed publishes a drawing for the pad positions, so check it before you design a socket or case. The Plus variants have a different pad layout.

Source: Seeed Studio XIAO nRF52840 wiki.

Pin reference

XIAO pinChip pinFunctionNotes
D0P0.02Analog (AIN0)
D1P0.03Analog (AIN1)
D2P0.28Analog (AIN4)
D3P0.29Analog (AIN5)
D4P0.04I²C SDAAlso Analog (AIN2)
D5P0.05I²C SCLAlso Analog (AIN3)
D6P1.11UART TX
D7P1.12UART RX
D8P1.13SPI Clock
D9P1.14SPI MISO
D10P1.15SPI MOSI

An onboard 3-in-1 RGB LED covers status indication: red on P0.26 (LED_BUILTIN), blue on P0.06, green on P0.30, plus a separate charge-status LED on P0.17. All three are common-anode, wired to turn on with a LOW signal and off with HIGH, backwards from most boards’ onboard LED. Power pins broken out: 5V (USB VBUS), 3V3, GND.

The Sense variant

The XIAO nRF52840 Sense adds two onboard sensors on the same board, using pins not exposed on the header, so they don’t cost you any of the 11 GPIOs above:

  • LSM6DS3TR-C 6-axis IMU (accelerometer + gyroscope), power on P1.08, interrupt on P0.11.
  • Onboard PDM microphone, data on P0.16, clock on P1.00.

A separate “Plus”/”Sense Plus” variant exists with additional broken-out pins (D11–D15, covering I2S and a second UART), if you have one of those, check Seeed’s own pin-multiplexing page for the extra pins, they aren’t covered here since the plain Sense and base XIAO nRF52840 don’t expose them.

Power and battery

  • USB-C powers the board and charges the battery.
  • Charge current. The default is about 50 mA, or about 100 mA when you drive P0.13 low during constant-current charging.
  • Reading the battery needs P0.14 LOW. If P0.14 is HIGH the read path is off and P0.31 (the battery ADC pin on the Plus boards) can see up to 3.6 V, which risks the input.
  • No battery on USB-only. With USB and no battery, the charge LED lights for a while and then goes out.
  • Sleep. The standby current is below 5 µA, but your sketch, the LEDs and the sensors decide the real figure.

Programming

ItemSetting
Board packageSeeed nRF52 Boards (Bluefruit library, Arduino). Seeed nRF52 mbed-enabled for the Sense sensors
UploadDouble-tap RESET to enter the bootloader, then upload over USB
LEDsCommon anode: LOW turns them on, HIGH turns them off
SerialUSB serial through the USB-C port
Other toolsZephyr or the Nordic nRF Connect SDK for Thread and Zigbee

Example code

#include <bluefruit.h>

void setup() {
  Bluefruit.begin();
  Bluefruit.setName("XIAO-nRF52840");

  Bluefruit.Advertising.addFlags(BLE_GAP_ADV_FLAGS_LE_ONLY_GENERAL_DISC_MODE);
  Bluefruit.Advertising.addName();
  Bluefruit.Advertising.start(0); // 0 = advertise indefinitely
}

void loop() {
  // Advertising runs in the background, nothing needed here.
}

Uses Adafruit’s Bluefruit nRF52 library, bundled with Seeed’s own “Seeed nRF52 Boards” package in the Arduino Boards Manager, install that board package first. For sensor/ML work on the Sense variant, Seeed’s wiki instead recommends their separate “Seeed nRF52 mbed-enabled” board package.

Real gotchas

  • No Wi-Fi. This chip cannot do Wi-Fi. For Wi-Fi and Thread in one chip, take an ESP32-C6.
  • 3.3 V logic only. A 5 V signal can destroy a pin.
  • The LEDs are inverted. LOW turns them on. A Blink sketch from another board looks like it does nothing or runs backwards.
  • P0.14 must stay LOW to read the battery. HIGH disables the read path and risks P0.31.
  • The wiki is inconsistent. It gives Bluetooth 5.0 and 5.4, 18 and 20 pins, and a green and a red charge LED. Check the pin and LED on your own board.
  • Some pins double up. On the Plus boards D14 and D15 share the NFC pads P0.09 and P0.10.
  • The double-tap bootloader. If the port is missing, double-tap RESET quickly. A single click only resets.
  • Two board packages. The Bluefruit package and the mbed package are not interchangeable, and the Sense sensor examples want the mbed one.
  • Do not short the battery pads while soldering.

Compared with the ESP32-C6 for Thread

BoardRadiosGood forPower
XIAO nRF52840Bluetooth LE, Thread, Zigbee, NFCNo Wi-FiUnder 5 µA standby
ESP32-C6Wi-Fi 6, Bluetooth LE, Thread, ZigbeeWi-Fi and Thread in one chipNot checked here

Both can be a Thread end device, which matters for Matter. The ESP32-C6 numbers come from its own guide and are not checked again here.

What to build with it

  • A BLE sensor tag that runs for months on a coin cell or a small lithium cell.
  • A BLE keyboard or mouse, using the HID support.
  • A motion-triggered logger on the Sense using the IMU.
  • A voice trigger using the PDM microphone.
  • A Thread sensor in a Matter network.

Safety notes

Before you wire anything up

  • Keep every GPIO at 3.3 V.
  • Use only a qualified 3.7 V lithium cell and never short its terminals.
  • Do not charge a lithium cell unattended.
  • Never connect the board to mains voltage. Keep it on a low-voltage supply.
  • Disconnect the power before you change the wiring.

Conclusion

The XIAO nRF52840 is the right choice for a Bluetooth-only or Thread-only battery device where Wi-Fi isn’t needed at all, at the cost of a completely different toolchain (Bluefruit/Zephyr, not the ESP-IDF/Arduino-ESP32 stack this site’s other boards use). Need Wi-Fi and Thread on the same chip instead? See ESP32-C6-WROOM-1, or this site’s broader ESP32-Matter write-up.

Board data is from the Seeed Studio XIAO nRF52840 wiki.

Advertisement
All guides

More guides

Keep building.

From ESP32 HomeKit accessories to Arduino and ATtiny reference guides, there’s more where this came from.

All guides