Skip to content

boards: silabs: Add support for xg22_ek2710a board, additional xG22 SoCs #92808

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions boards/silabs/dev_kits/xg22_ek2710a/Kconfig.defconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Copyright The Zephyr Project Contributors
# SPDX-License-Identifier: Apache-2.0

if BOARD_XG22_EK2710A

config LOG_BACKEND_SWO_FREQ_HZ
default 875000
depends on LOG_BACKEND_SWO

if SOC_GECKO_USE_RAIL

config FPU
default y

endif # SOC_GECKO_USE_RAIL

if BT

config FPU
default y

config COMMON_LIBC_MALLOC_ARENA_SIZE
default 8192

config MAIN_STACK_SIZE
default 3072 if PM
default 2304

endif # BT

endif # BOARD_XG22_EK2710A
5 changes: 5 additions & 0 deletions boards/silabs/dev_kits/xg22_ek2710a/Kconfig.xg22_ek2710a
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Copyright The Zephyr Project Contributors
# SPDX-License-Identifier: Apache-2.0

config BOARD_XG22_EK2710A
select SOC_PART_NUMBER_EFR32MG22E224F512IM40
8 changes: 8 additions & 0 deletions boards/silabs/dev_kits/xg22_ek2710a/board.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Copyright The Zephyr Project Contributors
# SPDX-License-Identifier: Apache-2.0

board_runner_args(jlink "--device=EFR32MG22C224F512IM40" "--reset-after-load")
include(${ZEPHYR_BASE}/boards/common/jlink.board.cmake)

board_runner_args(silabs_commander "--device=EFR32MG22E224F512IM40")
include(${ZEPHYR_BASE}/boards/common/silabs_commander.board.cmake)
6 changes: 6 additions & 0 deletions boards/silabs/dev_kits/xg22_ek2710a/board.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
board:
name: xg22_ek2710a
full_name: EFR32xG22 Explorer Kit (xG22-EK2710A)
vendor: silabs
socs:
- name: efr32mg22e224f512im40
133 changes: 133 additions & 0 deletions boards/silabs/dev_kits/xg22_ek2710a/doc/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,133 @@
.. zephyr:board:: xg22_ek2710a

Overview
********

The EFR32xG22E Explorer Kit (xG22-EK2710A) contains
a Wireless System-On-Chip from the EFR32MG22 family built on an
ARM Cortex®-M33 processor with excellent low power capabilities.

Hardware
********

- EFR32MG22E224F512IM40 Mighty Gecko SoC
- CPU core: ARM Cortex®-M33 with FPU
- Flash memory: 512 kB
- RAM: 32 kB
- Transmit power: up to +6 dBm
- Operation frequency: 2.4 GHz
- Crystal for HFXO (38.4 MHz)

For more information about the EFR32MG22 SoC and BRD2710A board, refer to these
documents:

- `EFR32MG22 Website`_
- `EFR32MG22E Datasheet`_
- `EFR32xG22 Reference Manual`_
- `BRD2710A User Guide`_

Supported Features
==================

.. zephyr:board-supported-hw::

Connections and IOs
===================

In the following table, the column **Name** contains Pin names. For example, PA2
means Pin number 2 on PORTA, as used in the board's datasheets and manuals.

+-------+-------------+-------------------------------------+
| Name | Function | Usage |
+=======+=============+=====================================+
| PA4 | GPIO | LED0 |
+-------+-------------+-------------------------------------+
| PC7 | GPIO | Push Button 0 |
+-------+-------------+-------------------------------------+
| PA5 | USART1_TX | UART Console VCOM_TX US0_TX |
+-------+-------------+-------------------------------------+
| PA6 | USART1_RX | UART Console VCOM_RX US0_RX |
+-------+-------------+-------------------------------------+

The default configuration can be found in
:zephyr_file:`boards/silabs/dev_kits/xg22_ek2710a/xg22_ek2710a_defconfig`

System Clock
============

The EFR32MG22E SoC is configured to use the 38.4 MHz external oscillator on the
board, and can operate a clock speeds of up to 76.8 MHz.

Serial Port
===========

The EFR32MG22E SoC has two USARTs and one EUART.
USART1 is connected to the board controller and is used for the console.

Programming and Debugging
*************************

.. zephyr:board-supported-runners::

.. note::
Before using the kit the first time, you should update the J-Link firmware
in Simplicity Studio.

Flashing
========

The sample application :zephyr:code-sample:`hello_world` is used for this example.
Build the Zephyr kernel and application:

.. zephyr-app-commands::
:zephyr-app: samples/hello_world
:board: xg22_ek2710a
:goals: build

Connect the xg22_ek2710a to your host computer using the USB port and you
should see a USB connection.

Open a serial terminal (minicom, putty, etc.) with the following settings:

- Speed: 115200
- Data: 8 bits
- Parity: None
- Stop bits: 1

Reset the board and you'll see the following message on the corresponding serial port
terminal session:

.. code-block:: console

Hello World! xg22_ek2710a/efr32mg22e224f512im40

Bluetooth
=========

To use the BLE function, run the command below to retrieve necessary binary
blobs from the SiLabs HAL repository.

.. code-block:: console

west blobs fetch hal_silabs

Then build the Zephyr kernel and a Bluetooth sample with the following
command. The :zephyr:code-sample:`bluetooth_observer` sample application is used in
this example.

.. zephyr-app-commands::
:zephyr-app: samples/bluetooth/observer
:board: xg22_ek2710a
:goals: build

.. _EFR32MG22 Website:
https://www.silabs.com/wireless/zigbee/efr32mg22-series-2-socs#

.. _EFR32MG22E Datasheet:
https://www.silabs.com/documents/public/data-sheets/efr32mg22e-datasheet.pdf

.. _EFR32xG22 Reference Manual:
https://www.silabs.com/documents/public/reference-manuals/efr32xg22-rm.pdf

.. _BRD2710A User Guide:
https://www.silabs.com/documents/public/user-guides/ug582-brd2710a-user-guide.pdf
47 changes: 47 additions & 0 deletions boards/silabs/dev_kits/xg22_ek2710a/xg22_ek2710a-pinctrl.dtsi
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
/*
* Copyright The Zephyr Project Contributors
*
* SPDX-License-Identifier: Apache-2.0
*/

#include <dt-bindings/pinctrl/silabs/xg22-pinctrl.h>

&pinctrl {
itm_default: itm_default {
group0 {
pins = <GPIO_SWV_PA3>;
drive-push-pull;
output-high;
};
};

i2c0_default: i2c0_default {
group0 {
pins = <I2C0_SCL_PD2>, <I2C0_SDA_PD3>;
bias-pull-up;
drive-open-drain;
};
};

pti_default: pti_default {
group0 {
pins = <PTI_DOUT_PC4>, <PTI_DFRAME_PC5>;
drive-push-pull;
output-high;
};
};

usart1_default: usart1_default {
group0 {
pins = <USART1_TX_PA5>;
drive-push-pull;
output-high;
};

group1 {
pins = <USART1_RX_PA6>;
input-enable;
silabs,input-filter;
};
};
};
Loading
Loading