Skip to main content

Getting Started with Seeed Studio XIAO nRF54LM20A Sense

Introduction

Seeed Studio XIAO nRF54LM20A Sense is a compact, ultra-low-power wireless development board built around Nordic Semiconductor’s nRF54LM20A SoC. It combines a 128 MHz Arm Cortex-M33 processor, 512 KB RAM, 2 MB on-chip NVM, multiprotocol 2.4 GHz wireless connectivity, onboard IMU, digital microphone, 8MB external flash, IPEX antenna connector, and nPM1300 PMIC for advanced battery-powered IoT, wearable, smart sensing, and edge AI applications.

Specification

Product NameSeeed Studio XIAO nRF54LM20ASeeed Studio XIAO nRF54LM20A Sense
ProcessorArm® Cortex®-M33 128 MHz & RISC-V 128 MHz Coprocessor
RAM512KB
Flash2 MB Non-volatile Memory (NVM)
External Flash8MB onboard external flash
PMIC / BatterynPM1300 PMIC for power regulation and battery charging
Interface

28x GPIO Pin
9x Analog Pin
1x I2C
1x UART
1x SPI
1x NFC
1x SHPHLD

Onboard

1x User LED (R/G/B 3 Color)
1x Charge LED (Battery Charging Indicator)
1x Reset Button
1x User Button
1x IPEX4 Connector (for external antenna)

1x User LED (R/G/B 3 Color)
1x Charge LED (Battery Charging Indicator)
1x Reset Button
1x User Button
1x IPEX4 Connector (for external antenna)
1x 6-Axis IMU
1x PDM Microphone

Wireless Connectivity

Bluetooth LE 6.0 (include Channel Sounding)
Bluetooth Mesh
NFC
Thread
Zigbee
Matter
Amazon Sidewalk
Proprietary 2.4 GHz protocols

Power Input

Type-C: 5V
Battery: 3.7V

Low Power Mode (3.7V@2A)/

Light-Sleep: ~9.96µA
Deep-Sleep (System OFF): ~4.76µA
Deep-Sleep (System OFF, GRTC wake-up): ~4.92µA
Ship-Mode: 0.33µA

Software Compatibility

Nordic nRF Connect SDK (based on Zephyr RTOS)
PlatformIO (based on Zephyr RTOS)

Working Temperature-20°C to 70°C
Dimensions21 x 17.8mm

Features

  • Powerful SoC with Advanced Connectivity & Security

    Seeed Studio XIAO nRF54LM20A Sense is a compact, ultra-low-power wireless development board powered by Nordic Semiconductor’s nRF54LM20A SoC. It features a 128 MHz Arm Cortex-M33 processor, 512 KB RAM, 2 MB on-chip NVM, a 128 MHz RISC-V coprocessor, multiprotocol 2.4 GHz wireless connectivity, onboard IMU, digital microphone, 8MB external flash, IPEX antenna connector, and Nordic nPM1300 PMIC for efficient power management.With support for Bluetooth LE, Bluetooth Channel Sounding, Bluetooth Mesh, Thread, Zigbee, Matter, and proprietary 2.4 GHz protocols up to 4 Mbps, this board is built for next-generation connected products. The onboard motion and audio sensors make it ideal for wearables, smart sensing, TinyML, gesture recognition, voice-triggered devices, and battery-powered IoT applications.

  • Ultra-Low Power Efficiency

    Built on Nordic nRF54LM20A and nPM1300 PMIC, XIAO nRF54LM20A Sense achieves a measured deep sleep current of only 4.76 µA under BAT power. Combined with the nPM1300 PMIC and its 0.33 µA Ship Mode BAT current, in active wireless operation, it records an average current of 3.87 mA with a 3.7 V simulated battery input and TX power set to +8 dBm, the board is ideal for long-life battery-powered sensing applications, wearables, and always-on IoT devices.

  • Streamlined Development Experience

    Full support for Nordic nRF Connect SDK and PlatformIO (Zephyr) enables efficient embedded development workflows. (Note: Arduino IDE is currently not supported)

Hardware Overview

XIAO nRF54LM20A Pin List

Pin Map

XIAO PinFunctionChip PinDescription
Power Pins
VBUSVBUS-5V Power Input/Output
GNDGND-Ground
3V33V3-OUT-3.3V Power Output
BAT+BAT+-Battery Input (monitored by nPM1300 via I²C)
BAT-BAT--Battery Negative Terminal
SHPHLDSHPHLD-PMIC Ship/Hibernate Mode Control (ultra-low-power shipping state)
System & Control Pins
RESETRESET-Board Reset
SWCLKSWCLKnRF54LM20A SWCLK / SAMD11 SWCLKSerial Wire Clock (for nRF54 and SAMD11)
SWDIOSWDIOnRF54LM20A SWDIO / SAMD11 SWDIOSerial Wire Data (for nRF54 and SAMD11)
SAMD11_RESETRESETSAMD11 RESETSAMD11 Co-processor Reset
User & LED Pins
-USER_BUTTONP0.09User Button Input
-RGB-BP1.23Onboard RGB LED Blue Channel
-RGB-GP1.24Onboard RGB LED Green Channel
-RGB-RP1.22Onboard RGB LED Red Channel
Analog Input (ADC) Pins
A0AIN0P1.00Analog Input 0 / GPIO
A1AIN1P1.31Analog Input 1 / GPIO
A2AIN2P1.30Analog Input 2 / GPIO
A3AIN3P1.29Analog Input 3 / GPIO
A7AIN7P1.03Analog Input 7 / GPIO
I2C Pins
SDAI2C_SDAP1.03I2C Data Line (IMU & Peripheral)
SCLI2C_SCLP1.07I2C Clock Line (IMU & Peripheral)
-BAT_SDAP1.18Battery Monitor I2C SDA (nPM1300)
-BAT_SCLP1.17Battery Monitor I2C SCL (nPM1300)
UART Pins
TXUART_TXP1.08UART Transmit
RXUART_RXP1.09UART Receive
SPI Pins
MOSISPI_MOSIP1.06SPI Master Out Slave In
MISOSPI_MISOP1.05SPI Master In Slave Out
SCKSPI_SCKP1.04SPI Serial Clock
Onboard Peripheral Pins
-MIC_DATP1.14Microphone Data Line
-MIC_CLKP1.13Microphone Clock Line
-IMU_SDAP0.08IMU I2C SDA (Onboard IMU)
-IMU_SCLP0.07IMU I2C SCL (Onboard IMU)
-IMU_CSP3.12IMU Chip Select
-IMU_INT1P0.06IMU Interrupt 1
-NFCP1.02 / P1.01NFC Antenna Pins
-GRTCP0.04 / P0.05General Purpose RTC Pins

Getting Started

In this section, we will guide you to quickly get started with the XIAO nRF54LM20A through the multi-color blinking effect of an RGB LED. Please complete the hardware and software preparations below to set up your XIAO for subsequent development.

Hardware

You need to prepare the following:

Seeed Studio XIAO nRF54LM20A Sense

Software

Setting Up PlatformIO for XIAO nRF54LM20A

Follow these streamlined steps to configure your development environment and deploy your first application on the XIAO nRF54LM20A.

Install PlatformIO IDE Extension for VS Code

If you haven't already, install the PlatformIO IDE extension directly within Visual Studio Code. This powerful extension transforms VS Code into a comprehensive embedded development environment.

  • Open VS Code.
  • Go to the Extensions view (Ctrl+Shift+X or Cmd+Shift+X).
  • Search for PlatformIO IDE and click Install.

Create a New PlatformIO Project

Here you can choose any one of the development version to create a project file, I take XIAO ESP32 C3 for example.

Operation oneOperation two

Configure platformio.ini for XIAO nRF54LM20A Zephyr Support

Once your project is created, locate the platformio.ini file in the root of your project directory (visible in the VS Code Explorer on the left). This file is the heart of your PlatformIO project configuration.

Operation three

You need to replace the entire content of your platformio.ini file with the following configuration:

[env:seeed-xiao-nrf54lm20a]
platform = https://github.com/Seeed-Studio/platform-seeedboards.git
framework = zephyr
board = seeed-xiao-nrf54lm20a

Then re-save the platformio.ini file (Ctrl+S or Cmd+S) and wait for it to load completely.

You can close this project once the loading is complete. This step is to download the necessary library files.

tip

If you have installed other XIAO libraries before, we recommend updating this library to the latest version using the following PlatformIO command. This is the official recommended method. Simply run the command directly in your project root directory (no need to navigate to the platform folder):

pio pkg update -g -p "https://github.com/Seeed-Studio/platform-seeedboards.git"

Now, let's test your setup with a classic Blink example. This code will toggle the built-in LED on your XIAO nRF54LM20A Sense.

Below is the link to download the library. You can choose to download this project directly to your local machine and then open it directly in VS Code. Alternatively, you can follow these steps: Replace and add some demo code. This process involves:

tip

The definitions for Seeed Studio XIAO series development boards are stored in the platform-seeedboards repository. If you are using the XIAO nRF54LM20A Sense, make sure to update this repository to the latest version.


Step 1: Create a New Project

Operation four

Step 2: Open the Project You can compile it first to see if the project you pulled runs correctly. If it does, the project was successfully pulled. Image below:

Operation five

Step 3: Replace the Project Code

  • Open the src/main.c and Zephyr/prj.conf files and replace the original code with the following code.
Operation six
src/main.c

/*
* Copyright (c) 2016 Intel Corporation
*
* SPDX-License-Identifier: Apache-2.0
*/

#include <zephyr/kernel.h>
#include <zephyr/device.h>
#include <zephyr/drivers/pwm.h>
#include <nrfx_power.h>

#define PWM_PERIOD_NS 1000000U
#define STEP_TIME_MS 500

#define LED_R_NODE DT_ALIAS(pwm_led1)
#define LED_G_NODE DT_ALIAS(pwm_led2)
#define LED_B_NODE DT_ALIAS(pwm_led0)

#if !DT_NODE_EXISTS(LED_R_NODE) || !DT_NODE_EXISTS(LED_G_NODE) || !DT_NODE_EXISTS(LED_B_NODE)
#error "This RGB blink demo expects pwm-led0/pwm-led1/pwm-led2 devicetree aliases"
#endif

static const struct pwm_dt_spec led_r = PWM_DT_SPEC_GET(LED_R_NODE);
static const struct pwm_dt_spec led_g = PWM_DT_SPEC_GET(LED_G_NODE);
static const struct pwm_dt_spec led_b = PWM_DT_SPEC_GET(LED_B_NODE);

struct rgb_step {
uint8_t r;
uint8_t g;
uint8_t b;
uint32_t delay_ms;
};

static int pwm_set_u8(const struct pwm_dt_spec *led, uint8_t level)
{
uint32_t duty_ns = (PWM_PERIOD_NS * (uint32_t)level) / 255U;

return pwm_set_dt(led, PWM_PERIOD_NS, duty_ns);
}

static int rgb_set(uint8_t r, uint8_t g, uint8_t b)
{
int ret;

ret = pwm_set_u8(&led_r, r);
if (ret < 0) {
return ret;
}

ret = pwm_set_u8(&led_g, g);
if (ret < 0) {
return ret;
}

ret = pwm_set_u8(&led_b, b);
if (ret < 0) {
return ret;
}

return 0;
}

int main(void)
{
int ret;

#if defined(CONFIG_NRFX_POWER)
nrfx_power_constlat_mode_request();
#endif

if (!device_is_ready(led_r.dev) || !device_is_ready(led_g.dev) || !device_is_ready(led_b.dev)) {
return -1;
}

static const struct rgb_step demo[] = {
{ 255, 0, 0, STEP_TIME_MS },
{ 0, 255, 0, STEP_TIME_MS },
{ 0, 0, 255, STEP_TIME_MS },
{ 255, 255, 0, STEP_TIME_MS },
{ 0, 255, 255, STEP_TIME_MS },
{ 255, 0, 255, STEP_TIME_MS },
{ 255, 255, 255, STEP_TIME_MS },
{ 0, 0, 0, STEP_TIME_MS },
};

while (1) {
for (size_t i = 0; i < ARRAY_SIZE(demo); i++) {
ret = rgb_set(demo[i].r, demo[i].g, demo[i].b);
if (ret < 0) {
return ret;
}
k_msleep(demo[i].delay_ms);
}
}

return 0;
}

Zephyr/prj.conf
CONFIG_GPIO=y
CONFIG_PWM=y
CONFIG_SERIAL=n
Zephyr/app.overlay
  1. If you need to modify or redefine device tree node contents, create a new app.overlay file in the Zephyr directory to explicitly bind device nodes.
  2. If you have modified the device tree files, please clean up the original files before rebuilding to prevent CMake from failing to recognize your changes.
/*
* Device tree overlay for XIAO nRF54LM20A RGB LED PWM demo.
*
* PWM20 peripheral is used for RGB LED control:
* - Channel 0: P1.22 (Blue LED) -> pwm_led0
* - Channel 1: P1.23 (Red LED) -> pwm_led1
* - Channel 2: P1.24 (Green LED) -> pwm_led2
*/

&pwm20 {
status = "okay";
};

/ {
pwmleds {
compatible = "pwm-leds";

pwm_led0: pwm_led_0 {
pwms = <&pwm20 0 PWM_MSEC(20) PWM_POLARITY_NORMAL>;
label = "Blue LED";
};

pwm_led1: pwm_led_1 {
pwms = <&pwm20 1 PWM_MSEC(20) PWM_POLARITY_NORMAL>;
label = "Red LED";
};

pwm_led2: pwm_led_2 {
pwms = <&pwm20 2 PWM_MSEC(20) PWM_POLARITY_NORMAL>;
label = "Green LED";
};
};
};

/ {
aliases {
pwm-led0 = &pwm_led0;
pwm-led1 = &pwm_led1;
pwm-led2 = &pwm_led2;
};
};

Now, connect your XIAO nRF54LM20A to your computer via USB. After saving, compiling, and downloading, the RGB light will start blinking.In VS Code:

Operation seven

The output in the terminal should indicate a successful compilation and burning process.

Code Explanation

  • src/main.c Main application entry point that implements demo logic, including LED color configuration, breathing effects, blink rhythm control, button-based mode switching, and other hardware interaction behaviors.

  • zephyr/prj.conf Zephyr RTOS configuration file for enabling/disabling system components and peripheral drivers, including logging, UART, PWM, I2C, SPI, low-power management, and other functionalities.

Observe the Result

Bluetooth Antenna

This board uses an external Bluetooth antenna. To ensure a better quality of Bluetooth signal and enhance your Bluetooth usage experience, it is recommended to install a Bluetooth antenna. The connection method is shown below:

Bluetooth antenna connection

Battery Usage

The XIAO nRF54LM20A is capable of using a 3.7V lithium battery as the power supply input. You can refer to the following diagram for the wiring method.

Battery wiring
caution

Please be careful not to short-circuit the positive and negative terminals and burn the battery and equipment when soldering. If the battery has power, never solder it onto the board, as this may burn out the circuit board. Short-circuiting while the circuit is powered on poses a significant risk; it is recommended to use an adapter.

Instructions on the use of batteries:

  1. Please use qualified batteries that meet the specifications.
  2. XIAO can be connected to your computer device via data cable while using the battery, rest assured that XIAO has a built-in circuit protection chip, which is safe.

Battery Voltage Detection

The XIAO nRF54LM20A integrates a battery voltage detection feature that centers on efficiently managing battery power measurements using the nPM1300-CAA load switch. This guide will focus on analyzing the software implementation of the battery detection (especially the main.c code) and guide you on how to easily deploy and use this feature in a PlatformIO environment, avoiding the complexity of the Zephyr NCS SDK.

XIAO nRF54L15 BLE Advertising Power Consumption

Detecting Battery Schematic

What the nPM1300-CAA chip does:

nPM1300-CAA is a highly integrated power management IC (PMIC) that replaces the simple load switch function of the TPS22916. It not only controls battery voltage switching for low-power monitoring but also integrates charging, regulation, and precise fuel gauging (via voltage, current, temperature) to maximize battery life for the nRF54LM20A.


note

The following example works for both PlatformIO and nRF Connect SDK. It can be used directly in PlatformIO, while the SDK requires manually adding files. Refer to this link

Peripherals Overview

The peripheral circuitry on this board includes an IMU and a microphone. You can see their locations in the diagram below:

IMU and microphone locations

IMU

The XIAO nRF54LM20A features an LSM6DS3TR-C IMU, supporting 6-axis accelerometer, gyroscope, and magnetometer.

MIC

The XIAO nRF54LM20A is equipped with an MSM261DGT006 microphone, supporting 16-bit audio capture.

FAQ

Issue 1: Stuck at Reading CMake configuration on macOS

When compiling and uploading programs with PlatformIO on macOS, the process may get stuck at the Reading CMake configuration step even after network issues have been ruled out. This is usually caused by a macOS compatibility problem that prevents the Python-based arm-none-eabi-gdb-py tool from running correctly.

Recommended fix: Replace the faulty gdb-py file with a symbolic link.

  1. Navigate to the tool directory: /Users/mengdu/.platformio/packages/[email protected]/bin/
  2. Back up the original file by renaming arm-none-eabi-gdb-py to arm-none-eabi-gdb-py.broken.bak.
  3. Create a new symbolic link named arm-none-eabi-gdb-py that points to arm-none-eabi-gdb.

Issue 2: Build errors after modifying configuration files

If you previously built the full Zephyr project and later modified configuration files, it is recommended to clean the build cache before rebuilding and uploading. This helps avoid compilation errors caused by stale or corrupted cache files.

pio run -t clean  // Clean command

Issue 3: Build errors after modifying configuration files

Some USB cables can only supply power and cannot transfer data. If you don't have a USB cable or don't know if your USB cable can transmit data, you can check Seeed USB Type-C support USB 3.1.

Resources

Seeed Studio XIAO nRF54LM20A

Hardware Design

Seeed Studio XIAO nRF54LM20A Sense

Hardware Design

Tech Support & Product Discussion

Thank you for choosing our products! We are here to provide you with different support to ensure that your experience with our products is as smooth as possible. We offer several communication channels to cater to different preferences and needs.

Loading Comments...