boards: st: nucleo_wb05kz: add support for Nucleo-WB05KZ board
Add support for the STMicroelectronics Nucleo-WB05KZ board. Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
This commit is contained in:
parent
6aaa2f8be0
commit
2867aaaa16
10 changed files with 328 additions and 0 deletions
5
boards/st/nucleo_wb05kz/Kconfig.nucleo_wb05kz
Normal file
5
boards/st/nucleo_wb05kz/Kconfig.nucleo_wb05kz
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
# Copyright (c) 2024 STMicroelectronics
|
||||||
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
|
config BOARD_NUCLEO_WB05KZ
|
||||||
|
select SOC_STM32WB05XX
|
||||||
28
boards/st/nucleo_wb05kz/arduino_r3_connector.dtsi
Normal file
28
boards/st/nucleo_wb05kz/arduino_r3_connector.dtsi
Normal 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 {};
|
||||||
5
boards/st/nucleo_wb05kz/board.cmake
Normal file
5
boards/st/nucleo_wb05kz/board.cmake
Normal 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)
|
||||||
5
boards/st/nucleo_wb05kz/board.yml
Normal file
5
boards/st/nucleo_wb05kz/board.yml
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
board:
|
||||||
|
name: nucleo_wb05kz
|
||||||
|
vendor: st
|
||||||
|
socs:
|
||||||
|
- name: stm32wb05
|
||||||
BIN
boards/st/nucleo_wb05kz/doc/img/nucleo_wb05kz.webp
Normal file
BIN
boards/st/nucleo_wb05kz/doc/img/nucleo_wb05kz.webp
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 39 KiB |
152
boards/st/nucleo_wb05kz/doc/index.rst
Normal file
152
boards/st/nucleo_wb05kz/doc/index.rst
Normal file
|
|
@ -0,0 +1,152 @@
|
||||||
|
.. _nucleo_wb05kz_board:
|
||||||
|
|
||||||
|
ST Nucleo WB05KZ
|
||||||
|
################
|
||||||
|
|
||||||
|
Overview
|
||||||
|
********
|
||||||
|
|
||||||
|
The Nucleo WB05KZ board is a Bluetooth |reg| Low Energy wireless and ultra-low-power
|
||||||
|
board featuring an ARM Cortex |reg|-M0+ based STM32WB05KZV MCU, embedding a
|
||||||
|
powerful and ultra-low-power radio compliant with the Bluetooth® Low Energy
|
||||||
|
SIG specification v5.4.
|
||||||
|
|
||||||
|
.. image:: img/nucleo_wb05kz.webp
|
||||||
|
:align: center
|
||||||
|
:alt: Nucleo WB05KZ
|
||||||
|
|
||||||
|
More information about the board can be found on the `Nucleo WB05KZ webpage`_.
|
||||||
|
|
||||||
|
Hardware
|
||||||
|
********
|
||||||
|
|
||||||
|
Nucleo WB05KZ provides the following hardware components:
|
||||||
|
|
||||||
|
- STM32WB05KZV in VFQFPN32 package
|
||||||
|
- ARM |reg| 32-bit Cortex |reg|-M0+ CPU
|
||||||
|
- 64 MHz maximal CPU frequebct
|
||||||
|
- 192 KB Flash
|
||||||
|
- 24 KB SRAM
|
||||||
|
|
||||||
|
More information about STM32WB05KZV can be found here:
|
||||||
|
|
||||||
|
- `WB05KZ on www.st.com`_
|
||||||
|
- `STM32WB05 reference manual`_
|
||||||
|
|
||||||
|
|
||||||
|
Supported Features
|
||||||
|
==================
|
||||||
|
|
||||||
|
The Zephyr ``nucleo_wb05kz`` 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 WB05KZ board User Manual`_.
|
||||||
|
|
||||||
|
Programming and Debugging
|
||||||
|
*************************
|
||||||
|
|
||||||
|
Nucleo WB05KZ board includes an ST-LINK-V3EC embedded debug tool interface.
|
||||||
|
|
||||||
|
Applications for the ``nucleo_w05kz`` 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 WB05KZ
|
||||||
|
----------------------------------------
|
||||||
|
|
||||||
|
Connect the Nucleo WB05KZ 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_wb05kz
|
||||||
|
:goals: build flash
|
||||||
|
|
||||||
|
You should see the following message on the console:
|
||||||
|
|
||||||
|
.. code-block:: console
|
||||||
|
|
||||||
|
Hello World! nucleo_wb05kz/stm32wb05
|
||||||
|
|
||||||
|
|
||||||
|
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_wb05kz
|
||||||
|
:maybe-skip-config:
|
||||||
|
:goals: debug
|
||||||
|
|
||||||
|
.. _`Nucleo WB05KZ webpage`:
|
||||||
|
https://www.st.com/en/evaluation-tools/nucleo-wb05kz.html
|
||||||
|
|
||||||
|
.. _`WB05KZ on www.st.com`:
|
||||||
|
https://www.st.com/en/microcontrollers-microprocessors/stm32wb05kz.html
|
||||||
|
|
||||||
|
.. _`STM32WB05 reference manual`:
|
||||||
|
https://www.st.com/resource/en/reference_manual/rm0529-stm32wb05xz-ultralow-power-wireless-32bit-mcu-armbased-cortexm0-with-bluetooth-low-energy-and-24-ghz-radio-solution-stmicroelectronics.pdf
|
||||||
|
|
||||||
|
.. _`Nucleo WB05KZ board User Manual`:
|
||||||
|
https://www.st.com/resource/en/user_manual/um3343-stm32wb05-nucleo64-board-mb1801-and-mb2032-stmicroelectronics.pdf
|
||||||
|
|
||||||
|
.. _STM32CubeProgrammer:
|
||||||
|
https://www.st.com/en/development-tools/stm32cubeprog.html
|
||||||
103
boards/st/nucleo_wb05kz/nucleo_wb05kz.dts
Normal file
103
boards/st/nucleo_wb05kz/nucleo_wb05kz.dts
Normal file
|
|
@ -0,0 +1,103 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2024 STMicroelectronics
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
/dts-v1/;
|
||||||
|
#include <st/wb0/stm32wb05Xz.dtsi>
|
||||||
|
#include <st/wb0/stm32wb05kzvx-pinctrl.dtsi>
|
||||||
|
#include <zephyr/dt-bindings/input/input-event-codes.h>
|
||||||
|
|
||||||
|
#include "arduino_r3_connector.dtsi"
|
||||||
|
|
||||||
|
/ {
|
||||||
|
model = "STMicroelectronics STM32WB05KZ-NUCLEO board";
|
||||||
|
compatible = "st,stm32wb05kz-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";
|
||||||
|
};
|
||||||
14
boards/st/nucleo_wb05kz/nucleo_wb05kz.yaml
Normal file
14
boards/st/nucleo_wb05kz/nucleo_wb05kz.yaml
Normal file
|
|
@ -0,0 +1,14 @@
|
||||||
|
identifier: nucleo_wb05kz
|
||||||
|
name: ST Nucleo WB05KZ
|
||||||
|
type: mcu
|
||||||
|
arch: arm
|
||||||
|
toolchain:
|
||||||
|
- zephyr
|
||||||
|
- gnuarmemb
|
||||||
|
- xtools
|
||||||
|
ram: 24
|
||||||
|
flash: 192
|
||||||
|
supported:
|
||||||
|
- gpio
|
||||||
|
- arduino_gpio
|
||||||
|
vendor: st
|
||||||
11
boards/st/nucleo_wb05kz/nucleo_wb05kz_defconfig
Normal file
11
boards/st/nucleo_wb05kz/nucleo_wb05kz_defconfig
Normal 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
|
||||||
5
boards/st/nucleo_wb05kz/support/openocd.cfg
Normal file
5
boards/st/nucleo_wb05kz/support/openocd.cfg
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
source [find interface/stlink-dap.cfg]
|
||||||
|
|
||||||
|
transport select "dapdirect_swd"
|
||||||
|
|
||||||
|
source [find target/stm32wb0x.cfg]
|
||||||
Loading…
Reference in a new issue