boards: st: nucleo_wb09ke: add support for Nucleo-WB09KE board

This commit adds support for the ST Nucleo-WB09KE board.

Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
This commit is contained in:
Mathieu Choplain 2024-05-28 12:18:02 +02:00 committed by Carles Cufí
parent 2867aaaa16
commit 30abd595d0
10 changed files with 328 additions and 0 deletions

View file

@ -0,0 +1,5 @@
# Copyright (c) 2024 STMicroelectronics
# SPDX-License-Identifier: Apache-2.0
config BOARD_NUCLEO_WB09KE
select SOC_STM32WB09XX

View file

@ -0,0 +1,28 @@
/*
* Copyright (c) 2024 STMicroelectronics
*
* SPDX-License-Identifier: Apache-2.0
*/
/ {
arduino_header: connector {
compatible = "arduino-header-r3";
#gpio-cells = <2>;
gpio-map-mask = <0xffffffff 0xffffffc0>;
gpio-map-pass-thru = <0 0x3f>;
/* Most pins are not connected to the Arduino
* connector in default hardware configuration.
* Only the connected pins are provided here.
*/
gpio-map = <14 0 &gpiob 15 0>, /* D8 */
<16 0 &gpioa 9 0>, /* D10 */
<17 0 &gpioa 11 0>, /* D11 */
<18 0 &gpioa 8 0>, /* D12 */
<19 0 &gpiob 3 0>, /* D13 */
<20 0 &gpiob 7 0>, /* D14 */
<21 0 &gpiob 6 0>; /* D15 */
};
};
arduino_serial: &usart1 {};

View file

@ -0,0 +1,5 @@
# SPDX-License-Identifier: Apache-2.0
board_runner_args(stm32cubeprogrammer "--port=swd" "--reset-mode=sw")
include(${ZEPHYR_BASE}/boards/common/stm32cubeprogrammer.board.cmake)
include(${ZEPHYR_BASE}/boards/common/openocd.board.cmake)

View file

@ -0,0 +1,5 @@
board:
name: nucleo_wb09ke
vendor: st
socs:
- name: stm32wb09

Binary file not shown.

After

Width:  |  Height:  |  Size: 43 KiB

View file

@ -0,0 +1,152 @@
.. _nucleo_wb09ke_board:
ST Nucleo WB09KE
################
Overview
********
The Nucleo WB09KE board is a Bluetooth |reg| Low Energy wireless and ultra-low-power
board featuring an ARM Cortex |reg|-M0+ based STM32WB09KEV MCU, embedding a
powerful and ultra-low-power radio compliant with the Bluetooth® Low Energy
SIG specification v5.4.
.. image:: img/nucleo_wb09ke.webp
:align: center
:alt: Nucleo WB09KE
More information about the board can be found on the `Nucleo WB09KE webpage`_.
Hardware
********
Nucleo WB09KE provides the following hardware components:
- STM32WB09KEV in VFQFPN32 package
- ARM |reg| 32-bit Cortex |reg|-M0+ CPU
- 64 MHz maximal CPU frequebct
- 512 KB Flash
- 64 KB SRAM
More information about STM32WB09KEV can be found here:
- `WB09KE on www.st.com`_
- `STM32WB09 reference manual`_
Supported Features
==================
The Zephyr ``nucleo_wb09ke`` board target supports the following hardware features:
+-----------+------------+-------------------------------------+
| Interface | Controller | Driver/Component |
+===========+============+=====================================+
| NVIC | on-chip | nested vector interrupt controller |
+-----------+------------+-------------------------------------+
| UART | on-chip | serial port-polling; |
| | | serial port-interrupt |
+-----------+------------+-------------------------------------+
| PINMUX | on-chip | pinmux |
+-----------+------------+-------------------------------------+
| GPIO | on-chip | gpio |
+-----------+------------+-------------------------------------+
| FLASH | on-chip | internal flash memory |
+-----------+------------+-------------------------------------+
Other hardware features are not yet supported on this Zephyr port.
The default configuration can be found in the defconfig file:
:zephyr_file:`boards/st/nucleo_wb09ke/nucleo_wb09ke_defconfig`
Connections and IOs
===================
Default Zephyr Peripheral Mapping:
----------------------------------
- USART1 TX/RX : PA1/PB0 (ST-Link Virtual COM Port)
- BUTTON (B1) : PA0
- BUTTON (B2) : PB5
- BUTTON (B3) : PB14
- LED (LD1/BLUE) : PB1
- LED (LD2/GREEN) : PB4
- LED (LD3/RED) : PB2
For more details, please refer to the `Nucleo WB09KE board User Manual`_.
Programming and Debugging
*************************
Nucleo WB09KE board includes an ST-LINK-V3EC embedded debug tool interface.
Applications for the ``nucleo_w09ke`` board target can be built and flashed
in the usual way (see :ref:`build_an_application` and :ref:`application_run`
for more details).
Flashing
========
The board is configured to be flashed using the west `STM32CubeProgrammer`_ runner,
so :ref:`it must be installed <stm32cubeprog-flash-host-tools>` beforehand.
Alternatively, OpenOCD can also be used to flash the board using the
``--runner`` (or ``-r``) option:
.. code-block:: console
$ west flash --runner openocd
Flashing an application to Nucleo WB09KE
----------------------------------------
Connect the Nucleo WB09KE to your host computer using the USB port,
then run a serial host program to connect with your Nucleo board:
.. code-block:: console
$ minicom -D /dev/ttyACM0
Now build and flash an application. Here is an example for
:ref:`hello_world`.
.. zephyr-app-commands::
:zephyr-app: samples/hello_world
:board: nucleo_wb09ke
:goals: build flash
You should see the following message on the console:
.. code-block:: console
Hello World! nucleo_wb09ke/stm32wb09
Debugging
=========
You can debug an application in the usual way. Here is an example for the
:ref:`hello_world` application.
.. zephyr-app-commands::
:zephyr-app: samples/hello_world
:board: nucleo_wb09ke
:maybe-skip-config:
:goals: debug
.. _`Nucleo WB09KE webpage`:
https://www.st.com/en/evaluation-tools/nucleo-wb09ke.html
.. _`WB09KE on www.st.com`:
https://www.st.com/en/microcontrollers-microprocessors/stm32wb09ke.html
.. _`STM32WB09 reference manual`:
https://www.st.com/resource/en/reference_manual/rm0505-stm32wb09xe-ultralow-power-wireless-32bit-mcu-armbased-cortexm0-with-bluetooth-low-energy-and-24-ghz-radio-solution-stmicroelectronics.pdf
.. _`Nucleo WB09KE board User Manual`:
https://www.st.com/resource/en/user_manual/um3345-stm32wb09-nucleo64-board-mb1801-and-mb2032-stmicroelectronics.pdf
.. _STM32CubeProgrammer:
https://www.st.com/en/development-tools/stm32cubeprog.html

View file

@ -0,0 +1,103 @@
/*
* Copyright (c) 2024 STMicroelectronics
*
* SPDX-License-Identifier: Apache-2.0
*/
/dts-v1/;
#include <st/wb0/stm32wb09Xe.dtsi>
#include <st/wb0/stm32wb09kevx-pinctrl.dtsi>
#include <zephyr/dt-bindings/input/input-event-codes.h>
#include "arduino_r3_connector.dtsi"
/ {
model = "STMicroelectronics STM32WB09KE-NUCLEO board";
compatible = "st,stm32wb09ke-nucleo";
#address-cells = <1>;
#size-cells = <1>;
chosen {
zephyr,console = &usart1;
zephyr,shell-uart = &usart1;
zephyr,sram = &sram0;
zephyr,flash = &flash0;
};
leds: leds {
compatible ="gpio-leds";
blue_led_1: led_0 {
gpios = <&gpiob 1 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;
};
green_led_1: led_1 {
gpios = <&gpiob 4 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;
};
red_led_1: led_2 {
gpios = <&gpiob 2 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;
};
};
gpio_keys {
compatible = "gpio-keys";
user_button_1: button_0 {
label = "SW1";
gpios = <&gpioa 0 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;
zephyr,code = <INPUT_KEY_0>;
};
user_button_2: button_1 {
label = "SW2";
gpios = <&gpiob 5 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;
zephyr,code = <INPUT_KEY_1>;
};
user_button_3: button_2 {
label = "SW3";
gpios = <&gpiob 14 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;
zephyr,code = <INPUT_KEY_2>;
};
};
aliases {
led0 = &blue_led_1;
led1 = &green_led_1;
led2 = &red_led_1;
sw0 = &user_button_1;
sw1 = &user_button_2;
sw2 = &user_button_3;
};
};
&pwrc {
smps-mode = "RUN";
smps-bom = <3>;
};
&clk_lse {
status = "okay";
};
&clk_hse {
status = "okay";
};
&clk_hsi {
status = "okay";
};
&pll {
status = "okay";
};
&rcc {
clocks = <&pll>;
clock-frequency = <DT_FREQ_M(64)>;
clksys-prescaler = <1>;
slow-clock = <&clk_lse>;
};
&usart1 {
pinctrl-0 = <&usart1_tx_pa1 &usart1_rx_pb0>;
pinctrl-names = "default";
current-speed = <115200>;
status = "okay";
};

View file

@ -0,0 +1,14 @@
identifier: nucleo_wb09ke
name: ST Nucleo WB09KE
type: mcu
arch: arm
toolchain:
- zephyr
- gnuarmemb
- xtools
ram: 64
flash: 512
supported:
- gpio
- arduino_gpio
vendor: st

View file

@ -0,0 +1,11 @@
# SPDX-License-Identifier: Apache-2.0
# Enable GPIO
CONFIG_GPIO=y
# Enable UART driver
CONFIG_SERIAL=y
# Enable console
CONFIG_CONSOLE=y
CONFIG_UART_CONSOLE=y

View file

@ -0,0 +1,5 @@
source [find interface/stlink-dap.cfg]
transport select "dapdirect_swd"
source [find target/stm32wb0x.cfg]