boards: shields: Add X-NUCLEO-WB05KN1 BLE expansion board

Add support for X-NUCLEO-WB05KN1 which is a BLE expansion board based on
the BLUENRG-LPS.

Signed-off-by: Ali Hozhabri <ali.hozhabri@st.com>
This commit is contained in:
Ali Hozhabri 2024-04-10 17:41:15 +02:00 committed by Anas Nashif
commit 4067b0d311
8 changed files with 240 additions and 0 deletions

View file

@ -0,0 +1,33 @@
# Copyright (c) 2024 STMicroelectronics
# SPDX-License-Identifier: Apache-2.0
if SHIELD_X_NUCLEO_WB05KN1_UART || SHIELD_X_NUCLEO_WB05KN1_SPI
if BT
config SPI
default y
depends on SHIELD_X_NUCLEO_WB05KN1_SPI
config SPI_STM32_INTERRUPT
default y
depends on SPI
config BT_SPI
default y
depends on DT_HAS_ST_HCI_SPI_V2_ENABLED
config BT_H4
default y
depends on DT_HAS_ZEPHYR_BT_HCI_UART_ENABLED
config BT_BLUENRG_ACI
default y
# Disable Flow control
config BT_HCI_ACL_FLOW_CONTROL
default n
endif # BT
endif # SHIELD_X_NUCLEO_WB05KN1_UART || SHIELD_X_NUCLEO_WB05KN1_SPI

View file

@ -0,0 +1,8 @@
# Copyright (c) 2024 STMicroelectronics
# SPDX-License-Identifier: Apache-2.0
config SHIELD_X_NUCLEO_WB05KN1_UART
def_bool $(shields_list_contains,x_nucleo_wb05kn1_uart)
config SHIELD_X_NUCLEO_WB05KN1_SPI
def_bool $(shields_list_contains,x_nucleo_wb05kn1_spi)

View file

@ -0,0 +1,24 @@
/*
* Copyright (c) 2024 STMicroelectronics
*
* SPDX-License-Identifier: Apache-2.0
*/
&spi1_sck_pa5 {
/delete-property/ bias-pull-down;
bias-pull-up;
};
&spi1_miso_pg9 {
slew-rate = "high-speed";
};
&spi1_mosi_pb5 {
slew-rate = "high-speed";
};
/ {
chosen {
zephyr,bt-c2h-uart = &usart3;
};
};

View file

@ -0,0 +1,28 @@
/*
* Copyright (c) 2024 STMicroelectronics
*
* SPDX-License-Identifier: Apache-2.0
*/
&spi1_sck_pa5 {
/delete-property/ bias-pull-down;
bias-pull-up;
};
&spi1_miso_pa6 {
slew-rate = "high-speed";
};
&spi1_mosi_pa7 {
slew-rate = "high-speed";
};
&arduino_spi {
pinctrl-0 = <&spi1_sck_pa5 &spi1_miso_pa6 &spi1_mosi_pa7>;
};
/ {
chosen {
zephyr,bt-c2h-uart = &usart1;
};
};

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

View file

@ -0,0 +1,99 @@
.. _x-nucleo-wb05kn1:
X-NUCLEO-WB05KN1: BLE expansion board
#####################################
Overview
********
The X-NUCLEO-WB05KN1 is a Bluetooth Low Energy evaluation board which allows the
expansion of the STM32 Nucleo boards.
The RF module is FCC (FCC ID: YCP-MB203202) and IC certified (IC: 8976A-MB203202).
The X-NUCLEO-WB05KN1 is compatible out of the box with the Arduino UNO R3 connector.
The board interfaces with the host microcontroller via UART (default) or SPI peripheral.
.. image:: img/x-nucleo-wb05kn1.webp
:align: center
:alt: X-NUCLEO-WB05KN1
More information about the board can be found at the
`X-NUCLEO-WB05KN1 website`_.
Configurations
**************
X-NUCLEO-WB05KN1 can be utilized as a Bluetooth Low-Energy controller shield
with a UART or SPI host controller interface (HCI-UART/HCI-SPI).
The UART default settings are:
* Baudrate: 921600 bps
* 8 bits, no parity, 1 stop bit
+----------+-----------------------+
| UART Pin | Arduino Connector Pin |
+==========+=======================+
| RX | D0 |
+----------+-----------------------+
| TX | D1 |
+----------+-----------------------+
.. note::
Please, bear in mind in order to use SPI interface you need to change the shield firmware
to ``DTM_SPI_WITH_UPDATER_CONTROLLER`` according to the SDK provided by ST at `X-CUBE-WB05N`_.
IRQ and reset pins are also necessary in addition to SPI pins.
+----------------+-----------------------+
| SPI Config Pin | Arduino Connector Pin |
+================+=======================+
| SCK | D13 |
+----------------+-----------------------+
| MISO | D12 |
+----------------+-----------------------+
| MOSI | D11 |
+----------------+-----------------------+
| CS | D10 |
+----------------+-----------------------+
| IRQ | A0 |
+----------------+-----------------------+
| RESET | D7 |
+----------------+-----------------------+
More information about X-NUCLEO-WB05KN1 can be found here:
- `X-NUCLEO-WB05KN1 datasheet`_
Programming
***********
Activate the presence of the shield for the project build by adding the
``--shield x_nucleo_wb05kn1_uart`` or ``--shield x_nucleo_wb05kn1_spi`` when you invoke
``west build`` based on UART or SPI interface:
.. zephyr-app-commands::
:zephyr-app: your_app
:board: your_board_name
:shield: x_nucleo_wb05kn1_uart
:goals: build
or
.. zephyr-app-commands::
:zephyr-app: your_app
:board: your_board_name
:shield: x_nucleo_wb05kn1_spi
:goals: build
References
**********
.. target-notes::
.. _X-NUCLEO-WB05KN1 website:
https://www.st.com/en/evaluation-tools/x-nucleo-wb05kn1.html
.. _X-CUBE-WB05N:
https://www.st.com/en/embedded-software/x-cube-wb05n.html
.. _X-NUCLEO-WB05KN1 datasheet:
https://www.st.com/resource/en/datasheet/stm32wb05kn.pdf

View file

@ -0,0 +1,28 @@
/*
* Copyright (c) 2024 STMicroelectronics
*
* SPDX-License-Identifier: Apache-2.0
*/
/ {
chosen {
zephyr,bt-hci = &hci_spi;
};
};
&arduino_spi {
cs-gpios = <&arduino_header 16 GPIO_ACTIVE_LOW>; /* D10 */
hci_spi: wb05n@0 {
compatible = "st,hci-spi-v2";
reg = <0>;
reset-gpios = <&arduino_header 13 GPIO_ACTIVE_LOW>; /* D7 */
irq-gpios = <&arduino_header 0 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>; /* A0 */
spi-cpol; /* CPOL=1 */
spi-cpha; /* CPHA=1 */
spi-hold-cs;
spi-max-frequency = <DT_FREQ_M(8)>; /* the maximum supported SPI speed */
reset-assert-duration-ms = <6>;
status = "okay";
};
};

View file

@ -0,0 +1,20 @@
/*
* Copyright (c) 2024 STMicroelectronics
*
* SPDX-License-Identifier: Apache-2.0
*/
/ {
chosen {
zephyr,bt-hci = &bt_hci_uart;
};
};
&arduino_serial {
current-speed = <921600>;
bt_hci_uart: bt_hci_uart {
compatible = "zephyr,bt-hci-uart";
status = "okay";
};
};