Home

Awesome

Silicon Labs Arduino Core

This project enables Silicon Labs hardware to be used with the Arduino ecosystem.

Latest release Latest release date

Currently supported hardware:

Arduino Nano Matter SparkFun Thing Plus Matter MGM240P xG24 Explorer Kit xG24 Dev Kit xG27 Dev Kit BGM220 Explorer Kit Ezurio Lyra 24P 20dBm Dev Kit Seeed Studio XIAO MG24 (Sense)

Installation

Getting started

If you're using your board for the first time with Arduino IDE you need to burn the bootloader first. Burning the bootloader fully erases the flash memory first, then burns the bootloader. You only need to do this once during the initial setup or if you are changing Matter device types and/or want to move your device to a different Matter network.

Radio protocol variants

Each board supports a number of different radio protocol stacks (like 'Matter', 'BLE (Arduino)', 'BLE (Silabs)' and 'None') which can be selected under 'Tools > Protocol stack' in the Arduino IDE.

You can see the list/icon of available radio protocols for each board under currently supported hardware or by going to this menu.

Matter library

Matter

The core comes bundled with the Matter library. The library's goal is to make creating and managing Matter devices easy and user-friendly.

The library sits on top of Silicon Labs' Matter SDK which is included in the Matter protocol stack variant of the supported boards. Make sure to select Matter in the 'Tools > Protocol stack' menu to have the Matter SDK / radio stack included in your sketch.

See the docs for the Matter library here.

Libraries

Included with the core:

Separately supplied:

Additional APIs

There are some additional functions besides the standard Arduino API you can call on Silicon Labs boards:

Debugging with J-Link on Silicon Labs boards

All Silicon Labs boards (except for the Nano Matter) come equipped with an onboard SEGGER J-Link debugger which can be used from the Arduino IDE. In order to utilize this feature you'll need the following:

If you'd like to debug on the Nano Matter see this chapter.

Debugger configuration file

Go to the folder where your sketch is located and create a file named debug_custom.json - and add the following content to it:

[
    {
        "configId": "SiliconLabs:silabs:thingplusmatter:programmer=commander",
        "servertype": "jlink",
        "device": "MGM240PB32VNA",
        "interface": "swd",
        "serverpath": "JLinkGDBServer"
    }
]

This is a sample debugging configuration for the SparkFun Thing Plus Matter. You most likely need to change some values to make it work on your system and board.

Change the device property according to the MCU on your board. Here's a table for help:

BoardMCU
SparkFun Thing Plus Matter MGM240PMGM240PB32VNA
Silicon Labs xG24 Explorer KitEFR32MG24B210F1536IM48
Silicon Labs xG24 Dev KitEFR32MG24B310F1536IM48
Silicon Labs xG27 Dev KitEFR32BG27C140F768IM40
Silicon Labs BGM220 Explorer KitBGM220PC22HNA
Ezurio Lyra 24P 20dBm Dev KitBGM240PB32VNA3

Change the (variant name) in the configId property according to the FQBN (Fully Qualified Board Name) of the variant you're using:

"configId": SiliconLabs:silabs:(variant name):programmer=commander

Here's a table listing all the variant names:

BoardVariant name
SparkFun Thing Plus Matterthingplusmatter
Silicon Labs xG24 Explorer Kitxg24explorerkit
Silicon Labs xG24 Dev Kitxg24devkit
Silicon Labs xG27 Dev Kitxg27devkit
Silicon Labs BGM220 Explorer Kitbgm220explorerkit
Ezurio Lyra 24P 20dBm Dev Kitlyra24p20

Change the serverpath property to the location of JLinkGDBServer on your system. JLinkGDBServer is installed with the J-Link Software and Documentation pack.

Make sure 'Simplicity Commander' is selected in Tools > Programmer.

You can begin a debug session by pressing the Start debugging button in the top left corner next to the Verify and Upload buttons in the Arduino IDE.

There are two examples provided with a debugger configuration for the SparkFun Thing Plus Matter MGM240P board - one for Unix-based systems (Linux and macOS) and one for Windows. You can find them under File > Examples > SiliconLabs > thingplusmatter_debug_unix/win. These examples can be easily modified to work with the other boards just by changing the device property in debug_custom.json.

Here's the official Arduino guide on using SEGGER J-Link debuggers.

Debugging on OpenOCD compatible boards

OpenOCD capable boards like the Arduino Nano Matter come equipped with a Atmel SAMD11 board controller which can be used to debug the main CPU.

You'll need to perform the following steps to debug on OpenOCD boards:

Debugger configuration file

Go to the folder where your sketch is located and create a file named debug_custom.json - and add the following content to it:

[
  {
      "configId": "SiliconLabs:silabs:nano_matter:programmer=openocd",
      "servertype": "openocd",
      "device": "MGM240SD22VNA",
      "interface": "swd",
      "serverpath": "openocd"
  }
]

Change the device property according to the MCU on your board. Here's a table for reference:

BoardMCU
Arduino Nano MatterMGM240SD22VNA
Seeed Studio XIAO MG24EFR32MG24B220F1536IM48

Change the (variant name) in the configId property according to the FQBN (Fully Qualified Board Name) of the variant you're using:

"configId": SiliconLabs:silabs:(variant name):programmer=openocd

Here's a table listing all the OpenOCD variant names:

BoardVariant name
Arduino Nano Matternano_matter
Seeed Studio XIAO MG24xiao_mg24

Launch a debugging session

Limitations

USB-UART baud rate

The UART baud rate of Serial can be changed freely - however if you're using it through the USB-UART bridge then it only works with 115200 bps by default. This is because the Silicon Labs boards use an EFM32 microcontroller as a board controller/debugger/flasher/USB-UART converter and this controller has a separate configuration. If you wish to change the baud rate used through the USB-UART bridge, then you can configure the board controller to use a different speed from it's admin console. The admin console can be reached from Simplicity Studio. Use this guide to change the baud rate in the board controller. The baud rate in your sketch must match the baud rate configured in the board controller - otherwise communication won't work. This limitation does NOT affect the Arduino Nano Matter or other OpenOCD compatible boards as they use a different board controller.

Questions and help

Have a question or stuck somewhere? Made something cool? 🕹ī¸ Hit us up on Reddit at r/silabs!

If you encounter an issue you can also submit it to the project issues.

Resources for the supported boards

Arduino Nano Matter BLE Matter

Product page | Overview & guide | Pinout diagram

SparkFun Thing Plus Matter MGM240P BLE Matter

Product page | Overview & guide

Pinout diagram

xG24 Explorer Kit BLE Matter

Product page | User guide

Pinout diagram

xG24 Dev Kit BLE Matter

Product page | User guide

Pinout diagram

xG27 Dev Kit BLE

Product page | User guide

Pinout diagram

BGM220 Explorer Kit BLE

Product page | User guide

Pinout diagram

Ezurio Lyra 24P 20dBm Dev Kit BLE

Product page

Pinout diagram

Seeed Studio XIAO MG24 (Sense) BLE Matter

Product page

Issue reporting, feature requests and discussions

We're encouraging the community to report any issues encountered using the core. You're also welcome to submit feature requests if you have a concrete idea on new features or improvements.

Please always use the appropriate templates when filing these in order to be accepted.

You can also open a Discussion if you have general or usability questions, or you'd like to share your project/ideas. Please, do not to open issues for general questions - always use Discussions instead.

Core development

Contributing

Currently the development is in-house with each release open-sourced at publication. We're currently committed and working towards opening up the development for the community - we're going to get there soon - but unfortunately at the moment we can't yet accept community PRs into this repository. Until we open things up feel free to submit feature requests, bug reports and ideas for improvement.

Environment setup

If you want to clone the core and develop with it you'll need to perform a few set up steps after cloning.

The core builds on Arduino's Core-API which is a submodule of this project under extra/core-api.

First, initialize the submodules with: git submodule update --init --recursive

You'll need to create a symlink to extra/core-api/api in the cores/silabs/ folder.

There's a script which does all this for you on macOS/Linux:

cd package
./bootstrap.sh

Silabs <3 Arduino

Made with ❤ī¸ at Silicon Labs & Arduino