Skip to content

Commit 4067b0d

Browse files
HoZHelnashif
authored andcommitted
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 <[email protected]>
1 parent 9afc79d commit 4067b0d

File tree

8 files changed

+240
-0
lines changed

8 files changed

+240
-0
lines changed
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# Copyright (c) 2024 STMicroelectronics
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
if SHIELD_X_NUCLEO_WB05KN1_UART || SHIELD_X_NUCLEO_WB05KN1_SPI
5+
6+
if BT
7+
8+
config SPI
9+
default y
10+
depends on SHIELD_X_NUCLEO_WB05KN1_SPI
11+
12+
config SPI_STM32_INTERRUPT
13+
default y
14+
depends on SPI
15+
16+
config BT_SPI
17+
default y
18+
depends on DT_HAS_ST_HCI_SPI_V2_ENABLED
19+
20+
config BT_H4
21+
default y
22+
depends on DT_HAS_ZEPHYR_BT_HCI_UART_ENABLED
23+
24+
config BT_BLUENRG_ACI
25+
default y
26+
27+
# Disable Flow control
28+
config BT_HCI_ACL_FLOW_CONTROL
29+
default n
30+
31+
endif # BT
32+
33+
endif # SHIELD_X_NUCLEO_WB05KN1_UART || SHIELD_X_NUCLEO_WB05KN1_SPI
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Copyright (c) 2024 STMicroelectronics
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
config SHIELD_X_NUCLEO_WB05KN1_UART
5+
def_bool $(shields_list_contains,x_nucleo_wb05kn1_uart)
6+
7+
config SHIELD_X_NUCLEO_WB05KN1_SPI
8+
def_bool $(shields_list_contains,x_nucleo_wb05kn1_spi)
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
/*
2+
* Copyright (c) 2024 STMicroelectronics
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
&spi1_sck_pa5 {
8+
/delete-property/ bias-pull-down;
9+
bias-pull-up;
10+
};
11+
12+
&spi1_miso_pg9 {
13+
slew-rate = "high-speed";
14+
};
15+
16+
&spi1_mosi_pb5 {
17+
slew-rate = "high-speed";
18+
};
19+
20+
/ {
21+
chosen {
22+
zephyr,bt-c2h-uart = &usart3;
23+
};
24+
};
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
/*
2+
* Copyright (c) 2024 STMicroelectronics
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
&spi1_sck_pa5 {
8+
/delete-property/ bias-pull-down;
9+
bias-pull-up;
10+
};
11+
12+
&spi1_miso_pa6 {
13+
slew-rate = "high-speed";
14+
};
15+
16+
&spi1_mosi_pa7 {
17+
slew-rate = "high-speed";
18+
};
19+
20+
&arduino_spi {
21+
pinctrl-0 = <&spi1_sck_pa5 &spi1_miso_pa6 &spi1_mosi_pa7>;
22+
};
23+
24+
/ {
25+
chosen {
26+
zephyr,bt-c2h-uart = &usart1;
27+
};
28+
};
18.6 KB
Loading
Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
.. _x-nucleo-wb05kn1:
2+
3+
X-NUCLEO-WB05KN1: BLE expansion board
4+
#####################################
5+
6+
Overview
7+
********
8+
The X-NUCLEO-WB05KN1 is a Bluetooth Low Energy evaluation board which allows the
9+
expansion of the STM32 Nucleo boards.
10+
The RF module is FCC (FCC ID: YCP-MB203202) and IC certified (IC: 8976A-MB203202).
11+
12+
The X-NUCLEO-WB05KN1 is compatible out of the box with the Arduino UNO R3 connector.
13+
The board interfaces with the host microcontroller via UART (default) or SPI peripheral.
14+
15+
.. image:: img/x-nucleo-wb05kn1.webp
16+
:align: center
17+
:alt: X-NUCLEO-WB05KN1
18+
19+
More information about the board can be found at the
20+
`X-NUCLEO-WB05KN1 website`_.
21+
22+
Configurations
23+
**************
24+
25+
X-NUCLEO-WB05KN1 can be utilized as a Bluetooth Low-Energy controller shield
26+
with a UART or SPI host controller interface (HCI-UART/HCI-SPI).
27+
28+
The UART default settings are:
29+
30+
* Baudrate: 921600 bps
31+
* 8 bits, no parity, 1 stop bit
32+
33+
+----------+-----------------------+
34+
| UART Pin | Arduino Connector Pin |
35+
+==========+=======================+
36+
| RX | D0 |
37+
+----------+-----------------------+
38+
| TX | D1 |
39+
+----------+-----------------------+
40+
41+
.. note::
42+
Please, bear in mind in order to use SPI interface you need to change the shield firmware
43+
to ``DTM_SPI_WITH_UPDATER_CONTROLLER`` according to the SDK provided by ST at `X-CUBE-WB05N`_.
44+
45+
IRQ and reset pins are also necessary in addition to SPI pins.
46+
47+
+----------------+-----------------------+
48+
| SPI Config Pin | Arduino Connector Pin |
49+
+================+=======================+
50+
| SCK | D13 |
51+
+----------------+-----------------------+
52+
| MISO | D12 |
53+
+----------------+-----------------------+
54+
| MOSI | D11 |
55+
+----------------+-----------------------+
56+
| CS | D10 |
57+
+----------------+-----------------------+
58+
| IRQ | A0 |
59+
+----------------+-----------------------+
60+
| RESET | D7 |
61+
+----------------+-----------------------+
62+
63+
More information about X-NUCLEO-WB05KN1 can be found here:
64+
- `X-NUCLEO-WB05KN1 datasheet`_
65+
66+
Programming
67+
***********
68+
69+
Activate the presence of the shield for the project build by adding the
70+
``--shield x_nucleo_wb05kn1_uart`` or ``--shield x_nucleo_wb05kn1_spi`` when you invoke
71+
``west build`` based on UART or SPI interface:
72+
73+
.. zephyr-app-commands::
74+
:zephyr-app: your_app
75+
:board: your_board_name
76+
:shield: x_nucleo_wb05kn1_uart
77+
:goals: build
78+
79+
or
80+
81+
.. zephyr-app-commands::
82+
:zephyr-app: your_app
83+
:board: your_board_name
84+
:shield: x_nucleo_wb05kn1_spi
85+
:goals: build
86+
87+
References
88+
**********
89+
90+
.. target-notes::
91+
92+
.. _X-NUCLEO-WB05KN1 website:
93+
https://www.st.com/en/evaluation-tools/x-nucleo-wb05kn1.html
94+
95+
.. _X-CUBE-WB05N:
96+
https://www.st.com/en/embedded-software/x-cube-wb05n.html
97+
98+
.. _X-NUCLEO-WB05KN1 datasheet:
99+
https://www.st.com/resource/en/datasheet/stm32wb05kn.pdf
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
/*
2+
* Copyright (c) 2024 STMicroelectronics
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
/ {
8+
chosen {
9+
zephyr,bt-hci = &hci_spi;
10+
};
11+
};
12+
13+
&arduino_spi {
14+
cs-gpios = <&arduino_header 16 GPIO_ACTIVE_LOW>; /* D10 */
15+
16+
hci_spi: wb05n@0 {
17+
compatible = "st,hci-spi-v2";
18+
reg = <0>;
19+
reset-gpios = <&arduino_header 13 GPIO_ACTIVE_LOW>; /* D7 */
20+
irq-gpios = <&arduino_header 0 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>; /* A0 */
21+
spi-cpol; /* CPOL=1 */
22+
spi-cpha; /* CPHA=1 */
23+
spi-hold-cs;
24+
spi-max-frequency = <DT_FREQ_M(8)>; /* the maximum supported SPI speed */
25+
reset-assert-duration-ms = <6>;
26+
status = "okay";
27+
};
28+
};
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
/*
2+
* Copyright (c) 2024 STMicroelectronics
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
/ {
8+
chosen {
9+
zephyr,bt-hci = &bt_hci_uart;
10+
};
11+
};
12+
13+
&arduino_serial {
14+
current-speed = <921600>;
15+
16+
bt_hci_uart: bt_hci_uart {
17+
compatible = "zephyr,bt-hci-uart";
18+
status = "okay";
19+
};
20+
};

0 commit comments

Comments
 (0)