Skip to content

Commit 8534767

Browse files
Javad Rahimipetroudicarlescufi
authored andcommitted
boards: arm: stm32wb5mm-dk: add basic board support
This patch add the basic board support for the STM32WB5MM-DK Discovery Kit. At the moment only debug UART Debug is ported. Other peripherals will be added in the following patches. Signed-off-by: Javad Rahimipetroudi <[email protected]>
1 parent 32b4388 commit 8534767

File tree

9 files changed

+447
-0
lines changed

9 files changed

+447
-0
lines changed
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# STM32WB5MM-DK Discovery Development board configuration
2+
3+
# Copyright (c) 2024 Javad Rahimipetroudi <[email protected]>
4+
# SPDX-License-Identifier: Apache-2.0
5+
6+
config BOARD_STM32WB5MM_DK
7+
bool "stm32wb5mm-dk Discovery Development Board"
8+
depends on SOC_STM32WB55XX
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# STM32WB5MM-DK Discovery Development board configuration
2+
3+
# Copyright (c) 2024 Javad Rahimipetroudi <[email protected]>
4+
# SPDX-License-Identifier: Apache-2.0
5+
6+
if BOARD_STM32WB5MM_DK
7+
8+
config BOARD
9+
default "stm32wb5mm_dk"
10+
11+
choice BT_HCI_BUS_TYPE
12+
default BT_STM32_IPM
13+
depends on BT
14+
endchoice
15+
16+
endif # BOARD_STM32WB5MM_DK

boards/arm/stm32wb5mm_dk/board.cmake

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# SPDX-License-Identifier: Apache-2.0
2+
board_runner_args(pyocd "--target=stm32wb55vgyx")
3+
board_runner_args(stm32cubeprogrammer "--port=swd" "--reset-mode=hw")
4+
5+
include(${ZEPHYR_BASE}/boards/common/stm32cubeprogrammer.board.cmake)
6+
include(${ZEPHYR_BASE}/boards/common/openocd.board.cmake)
7+
include(${ZEPHYR_BASE}/boards/common/pyocd.board.cmake)
42.9 KB
Loading
Lines changed: 226 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,226 @@
1+
.. _stm32wb5mm_dk_discovery_kit:
2+
3+
ST STM32WB5MM-DK
4+
################
5+
6+
Overview
7+
********
8+
9+
The STM32WB5MM-DK Discovery kit is designed as a complete demonstration
10+
and development platform for the STMicroelectronics STM32W5MMG module based
11+
on the Arm |reg| Cortex |reg|-M4 and Arm |reg| Cortex |reg|-M0+ cores. The
12+
STM32 device is a multi-protocol wireless and ultra-low-power device
13+
embedding a powerful and ultra-low-power radio compliant with the
14+
Bluetooth |reg| Low Energy (BLE) SIG specification v5.2 and with
15+
IEEE 802.15.4-2011.
16+
17+
18+
STM32WB5MM-DK supports the following features:
19+
20+
* STM32WB5MMG (1-Mbyte Flash memory, 256-Kbyte SRAM)
21+
- Dual-core 32‑bit (Arm |reg| Cortex |reg|-M4 and M0+)
22+
- 2.4 GHz RF transceiver
23+
- 0.96-inch 128x64 OLED display
24+
- 128-Mbit Quad-SPI NOR Flash Memory
25+
- Temperature sensor
26+
- Accelerometer/gyroscope sensor
27+
- Time-of-Flight and gesture-detection sensor
28+
- Digital microphone
29+
- RGB LED
30+
- Infrared LED
31+
- 3 push-buttons (2 users and 1 reset) and 1 touch key button
32+
* Board connectors:
33+
- STMod+
34+
- ARDUINO |reg| Uno V3 expansion connector
35+
- USB user with Micro-B connector
36+
- TAG10 10-pin footprint
37+
38+
* Flexible power-supply options:
39+
- ST-LINK/V2-1 USB connector,
40+
- 5 V delivered by:
41+
- ARDUINO |reg|,
42+
- external connector,
43+
- USB charger, or USB power
44+
* On-board ST-LINK/V2-1 debugger/programmer with USB re-enumeration
45+
- Virtual COM port and debug port
46+
47+
48+
.. image:: img/STM32WB5MM_DK.jpg
49+
:align: center
50+
:alt: STM32WB5MM-DK
51+
52+
More information about the board can be found at the `` `STM32WB5MM-DK on www.st.com`_.
53+
54+
Hardware
55+
********
56+
57+
STM32WB5MMG is an ultra-low-power and small form factor certified 2.4 GHz
58+
wireless module. It supportsBluetooth |reg| Low Energy 5.4, Zigbee |reg| 3.0,
59+
OpenThread, dynamic, and static concurrent modes, and 802.15.4proprietary
60+
protocols. Based on the STMicroelectronics STM32WB55VGY wireless
61+
microcontroller,STM32WB5MMG provides best-in-class RF performance thanks
62+
to its high receiver sensitivity and output power signal. Its low-power
63+
features enable extended battery life, small coin-cell batteries, and
64+
energy harvesting.
65+
66+
- Ultra-low-power with FlexPowerControl
67+
- Core: ARM |reg| 32-bit Cortex |reg|-M4 CPU with FPU
68+
- Radio:
69+
- 2.4GHz
70+
71+
- RF transceiver supporting:
72+
73+
- Bluetooth |reg| 5.4 specification,
74+
- IEEE 802.15.4-2011 PHY and MAC,
75+
- Zigbee|reg| 3.0
76+
- RX sensitivity:
77+
78+
- -96 dBm (Bluetooth |reg| Low Energy at 1 Mbps),
79+
- -100 dBm (802.15.4)
80+
81+
- Programmable output power up to +6 dBm with 1 dB steps
82+
- Integrated balun to reduce BOM
83+
- Support for 2 Mbps
84+
- Support GATT caching
85+
- Support EATT (enhanced ATT)
86+
- Support advertising extension
87+
- Accurate RSSI to enable power control
88+
89+
- Clock Sources:
90+
91+
- 32 MHz crystal oscillator with integrated
92+
trimming capacitors (Radio and CPU clock)
93+
- 32 kHz crystal oscillator for RTC (LSE)
94+
- Internal low-power 32 kHz (±5%) RC (LSI1)
95+
- Internal low-power 32 kHz (stability
96+
±500 ppm) RC (LSI2)
97+
- Internal multispeed 100 kHz to 48 MHz
98+
oscillator, auto-trimmed by LSE (better than
99+
±0.25% accuracy)
100+
- High speed internal 16 MHz factory
101+
trimmed RC (±1%)
102+
- 2x PLL for system clock, USB, SAI, ADC
103+
104+
More information about STM32WB55RG can be found here:
105+
106+
- `STM32WB5MM-DK on www.st.com`_
107+
- `STM32WB5MMG datasheet`_
108+
109+
Supported Features
110+
==================
111+
112+
The Zephyr STM32WB5MM-DK board configuration supports the following hardware features:
113+
114+
+-----------+------------+-------------------------------------+
115+
| Interface | Controller | Driver/Component |
116+
+===========+============+=====================================+
117+
| UART | on-chip | serial port-polling; |
118+
| | | serial port-interrupt |
119+
+-----------+------------+-------------------------------------+
120+
121+
122+
Other hardware features are not yet supported on this Zephyr port.
123+
124+
The default configuration can be found in the defconfig file:
125+
``boards/arm/stm32wb5mm_dk/stm32wb5mm_dk_defconfig``
126+
127+
Bluetooth and compatibility with STM32WB Copro Wireless Binaries
128+
================================================================
129+
130+
To operate bluetooth on STM32WB5MMG, Cortex-M0 core should be flashed with
131+
a valid STM32WB Coprocessor binaries (either 'Full stack' or 'HCI Layer').
132+
These binaries are delivered in STM32WB Cube packages, under
133+
Projects/STM32WB_Copro_Wireless_Binaries/STM32WB5x/
134+
For compatibility information with the various versions of these binaries,
135+
please check `modules/hal/stm32/lib/stm32wb/hci/README`_
136+
in the hal_stm32 repo.
137+
Note that since STM32WB Cube package V1.13.2, "full stack" binaries are not compatible
138+
anymore for a use in Zephyr and only "HCI Only" versions should be used on the M0
139+
side.
140+
141+
Connections and IOs
142+
===================
143+
144+
145+
Default Zephyr Peripheral Mapping:
146+
----------------------------------
147+
148+
.. rst-class:: rst-columns
149+
150+
- UART_1 TX/RX : PB7/PB6 ( Connected to ST-Link VCP)
151+
- LPUART_1 TX/RX : PA3/PA2
152+
- USB : PA11/PA12
153+
- SWD : PA13/PA14
154+
155+
System Clock
156+
------------
157+
158+
STM32WB5MMG System Clock could be driven by internal or external oscillator,
159+
as well as main PLL clock. By default System clock is driven by HSE clock at 32MHz.
160+
161+
Serial Port
162+
-----------
163+
164+
STM32WB5MM-DK board has 2 (LP)U(S)ARTs. The Zephyr console output is assigned to USART1.
165+
Default settings are 115200 8N1.
166+
167+
168+
Programming and Debugging
169+
*************************
170+
171+
Applications for the ``stm32wb5mm_dk`` board configuration can be built the
172+
usual way (see :ref:`build_an_application`).
173+
174+
Flashing
175+
========
176+
177+
STM32WB5MM-DK has onboard ST-Link to flash and debug the firmware on the
178+
module.
179+
180+
181+
Flashing `hello_world` application to STM32WB5MM-DK
182+
----------------------------------------------------
183+
184+
Connect the STM32WB5MM-DK to your host computer using the USB port (CN11).
185+
Then build and flash an application. Here is an example for the ``hello_world``
186+
application.
187+
188+
Run a serial host program to connect with your STM32WB5MM-DK board:
189+
190+
.. code-block:: console
191+
192+
$ minicom -D /dev/ttyACM0
193+
194+
Then first build and flash the application for the STM32WB5MM-DK board.
195+
196+
.. zephyr-app-commands::
197+
:zephyr-app: samples/hello_world
198+
:board: stm32wb5mm_dk
199+
:goals: build flash
200+
201+
Reset the board and you should see the following messages on the console:
202+
203+
.. code-block:: console
204+
205+
Hello World! stm32w5mm_dk
206+
207+
Debugging
208+
=========
209+
210+
You can debug an application in the usual way. Here is an example for the
211+
`Hello_World`_ application.
212+
213+
.. zephyr-app-commands::
214+
:zephyr-app: samples/hello_world
215+
:board: stm32wb5mm_dk
216+
:maybe-skip-config:
217+
:goals: debug
218+
219+
.. _STM32WB5MM-DK on www.st.com:
220+
https://www.st.com/en/evaluation-tools/stm32wb5mm-dk.html
221+
.. _STM32WB5MMG datasheet:
222+
https://www.st.com/resource/en/datasheet/stm32wb5mmg.pdf
223+
.. _modules/hal/stm32/lib/stm32wb/hci/README:
224+
https://github.com/zephyrproject-rtos/hal_stm32/blob/main/lib/stm32wb/hci/README
225+
.. _Hello_World:
226+
https://docs.zephyrproject.org/latest/samples/hello_world/README.html

0 commit comments

Comments
 (0)