STMicroelectronics FP-AUD-BVLINKWB1 Quick Start Guide

Quick Start Guide
STM32Cube function pack for STM32WB MCU featuring advanced audio streaming over Bluetooth 5.0 using Opus codec (FP-AUD-BVLINKWB1)
Version 3.0 (Feb 18, 2021)
Agenda
Hardware and Software overview
Documents & Related Resources
STM32 Open Development Environment: Overview
2
Setup & Demo Examples
1- Hardware and Software overview
P-NUCLEO-WB55 pack
Hardware Overview
P-NUCLEO-WB55 Hardware Description:
The P-NUCLEO-WB55 pack is a multi-protocol wireless and ultra-low-power device embedding a powerful and ultra-low-power radio compliant with the Bluetooth® Low Energy (BLE) SIG specification v5.0 and with IEEE
802.15.4-2011.
Key Product on board
STM32WB microcontroller in a VFQFPN68 package
2.4 GHz RF transceiver supporting Bluetooth® specification v5.0 and IEEE 802.15.4-2011 PHY and MAC
Dedicated Arm® 32-bit Cortex® M0+ CPU for real-time Radio layer
Three user LEDs
Three user buttons and one reset button
Board connector: USB user with Micro-B
Board expansion connectors:
• Arduino™ Uno V3
ST morpho
Integrated PCB antenna or footprint for SMA connector
Flexible power-supply options: ST-LINK USB VBUS or external sources
On-board socket for CR2032 battery
On-board ST-LINK/V2-1 debugger/programmer with USB re- enumeration capability: mass storage, virtual COM port and
debug port
Comprehensive free software libraries and examples available with the STM32Cube package
• Support of a wide choice of Integrated Development Environments (IDEs), including IAR™, Keil®, GCC-based IDEs,
Arm® Mbed
Latest info available at www.st.com
P-NUCLEO-WB55
STM32WB5MM-DK
Hardware Overview
STM32WB5MM-DK Hardware Description:
The STM32WB5MM-DK Discovery kit is designed as a complete demonstration and development platform for the STMicroelectronics STM32W5MMG module based on the Arm® Cortex®-M4 and Arm® Cortex®-M0+ cores.
Key Product on board
STM32WB5MMG (1-Mbyte Flash memory, 256-Kbyte SRAM, in Module RF package)
Dual-core 32-bit (Arm® Cortex®-M4 and dedicated M0+ CPU for real-time radio layer)
2.4 GHz RF transceiver supporting Bluetooth® specification V5.2, 802.15.4 with Zigbee®, Thread®, and
proprietary protocols
0.96-inch 128x64 OLED display
128-Mbit Quad-SPI NOR Flash Memory
Temperature sensor
Accelerometer/gyroscope sensor
Time-of-Flight and gesture-detection sensor
Digital microphone
RGB LED Infrared LED
3 push-buttons (2 users and 1 reset) and 1 touch key button
Connectors: STMod+, ARDUINO® Uno V3 expansion connector, USB user Micro-B connector, TAG10 10-pin footprint
Flexible power-supply options: ST-LINK/V2-1 USB connector, 5 V delivered by ARDUINO® or external connector, USB
charger, or USB power
On-board ST-LINK/V2-1 debugger/programmer with USB re-enumeration capability: Virtual COM port and debug port
Comprehensive free software libraries and examples available with the STM32CubeWB MCU Package
Support of a wide choice of Integrated Development Environments (IDEs) including IAR Embedded Workbench®, MDK-
ARM, and STM32CubeIDE
Latest info available at www.st.com
STM32WB5MM-DK
MEMS Microphones Expansion Board (CCA02M2)
Hardware Overview
X-NUCLEO-CCA02M2 Hardware Description
The X-NUCLEO-CCA02M2 expansion board has been designed around MP34DT06J digital MEMS microphone. It is compatible with the ST morpho connector layout and with digital microphone coupon boards such as STEVAL­MIC001V1, STEVAL-MIC002V1 and STEVAL-MIC003V1. The X-NUCLEO-CCA02M2 embeds two MP34DT06J microphones and allows synchronized acquisition and streaming of up to 4 microphones through I²S, SPI, DFSDM or SAI peripherals.
Key Product on board
2 on-board MP34DT06J digital MEMS microphones
6 slots to plug in digital microphone coupon boards such as STEVAL-MIC001V1, STEVAL-MIC002V1 and STEVAL-
MIC003V1
Synchronized acquisition and streaming of up to 4 microphones
Free comprehensive development firmware library and audio capture plus USB streaming sample application
compatible with STM32Cube
Compatible with STM32 Nucleo boards
Equipped with ST morpho connector (upwards and downwards)
Equipped with Arduino UNO R3 connector (upwards) to allow multiple boards
RoHS and WEEE compliant
Latest info available at www.st.com
X-NUCLEO-CCA02M2
FP-AUD-BVLINKWB1
Software Overview
7
FP-AUD-BVLINKWB1 Software Description
FP-AUD-BVLINKWB1 is an STM 32Cube function pack that performs full-duplex voice streaming or stereo music streaming over BLE using the advanced Opus compression algorithm. The application runs on P-NUCLEO-WB55 connected to an
X-NUCLEO-CCA02M2 or on STM32WB5MM-DK.
Key features
Complete firmware to implement full-duplex audio or stereo music streaming over Bluetooth 5.0 using Opus codec for both encoding and decoding
A BlueVoiceOPUS customized profile for audio over BLE, including an easy-to­use set of APIs to exploit advanced Opus functionality (source code available)
Third-party Opus v1.3 (downloadable from http://opus-codec.org/) middleware: an open, royalty-free and highly versatile audio codec that is standardized by the Internet Engineering Task Force (IETF) as RFC 6716
Digital audio signal acquisition and processing
Audio out playback through USB
Compatibility with STBLESensor mobile app, to perform full-duplex audio
streaming at 16 kHz and speech-to-text or to receive stereo music at 48 kHz from devices supporting BLE 4.2 or higher
Free, user-friendly license terms
Overall Software Architecture
FP-AUD-BVLINWB1
Latest info available at www.st.com
2- Setup & Demo Examples
Setup & Application Examples
HW prerequisites for Full-Duplex demo between two STM32WB
9
Full-Duplex audio streaming between two STM32WB (P-NUCLEO-WB55 or STM32WB5MM-DK)
2x P-NUCLEO-WB55 development board + 2x X-NUCLEO-CCA02M2 expansion board; alternatively, 2x STM32WB5MM-DK
Laptop/PC with Windows 7, 8 or 10 and Audacity or other audio recording sw
2x micro-USB cables
Full-Duplex audio streaming between STM32WB (P-NUCLEO-WB55 or STM32WB5MG-DK) and a mobile device
1x P-NUCLEO-WB55 development board + 1x X-NUCLEO-CCA02M2 expansion board; alternatively, 1x STM32WB5MM-DK
Laptop/PC with Windows 7, 8 or 10 and Audacity or other audio recording sw
1x micro-USB cable
1x mobile device running ST BLE Sensor App (v4.9.0 or higher)
Full-Band stereo music streaming:
1x P-NUCLEO-WB55 or 1x STM32WB5MM-DK
Laptop/PC with Windows 7, 8 or 10 and Audacity or other audio recording sw
1x micro-USB cable
1x mobile device running ST BLE Sensor App, supporting BLE 4.2 or higher
Configure the X-NUCLEO-CCA02M2
board as in the picture in order to
acquire only one microphone through
the SAI
Full-Duplex Application Examples
X-NUCLEO-CCA02M2 HW setup
Setup & Application Examples
Software and Other prerequisites
11
STM32 ST-Link Utility
Download and install STSW-LINK004 from www.st.com
FP-AUD-BVLINWB1
Download the FP-AUD-BVLINKWB1 package from www.st.com, copy the .zip file contents into a folder on your PC. The
package contains binaries and source code with project files (Keil, IAR, STM32CubeIDE) based on P-NUCLEO-WB55 or STM32WB5MM-DK.
ST BLE Sensor App for Android or iOS, can be downloaded from relevant store,
Third party software for audio acquisition:
Audacity® is free, open source, cross-platform software for recording and editing sounds. It is available for
Windows®, Mac®, GNU/Linux®; and other operating systems
FP-AUD-BVLINKWB1. Sample applications
Start coding in just a few minutes
12
Download & unpack
1
FP-AUD-BVLINKWB1
Select Function Pack:
2
3
4
5
6
Manage audio recording on your PC or mobile device
www.st.com/stm32ode
Use the pre-compiled binaries or alternative
re-compile the code
FP-AUD-BVLINKWB1 package structure
Docs
BSP, HAL
drivers
BLE service, USB class, PDM2PCM lib, Opus
BVLCentral BVLPeripheral BVLPeripheral_FullBand
2.1- Test Full-Duplex audio streaming
between two STM32WB
FP-AUD-BVLINKWB1. Step by step setup
HW prerequisites for Full-Duplex demo between two STM32WB
14
Peripheral Unit
Audio
compressed
@24kbps
USB out
@16/8kHz
Central Unit
USB
Audacity or other
audio recording sw
P-NUCLEO-WB55
+
X-NUCLEO-CCA02M2
BVLCentral project
BVLPeripheral project
P-NUCLEO-WB55
+
X-NUCLEO-CCA02M2
USB out
@16/8kHz
USB
Audacity or other
audio recording sw
Peripheral Unit
Audio
compressed
@24kbps
USB out
@16/8kHz
Central Unit
USB
Audacity or other
audio recording sw
STM32WB5MM-DK
BVLCentral project BVLPeripheral project
STM32WB5MM-DK
USB out
@16/8kHz
USB
Audacity or other
audio recording sw
OR
15
2
Move JP1 on P-NUCLEO-WB55 or JP2 on STM32WB5MM­DK from USB STL to USB MCU. Plug a micro-USB cable into USB_USER
Both units are recognized as USB Microphone by Windows.
3
4
In Audacity set the default audio settings; open Edit/Preferences and select quality tab, choose 16 kHz as sampling frequency and 16-bit sample format. If you want to hear the audio while recording it, open Edit/Preferences, select Recording tab and
check "Software playthrough of input“. Now select the peripheral or central unit and
click record *
5
Press user button 1 on the board to START streaming, press again to STOP it. Both units can stream at the same time.
Audacity records audio coming from the selected microphone.
6
1
Compile and download BVLCentral application on one unit and BVLPeripheral application on the other (on P-NUCLEO-WB55 move JP1 on USB STL, on STM32WB5MM-DK move JP2 on USB STL)
FP-AUD-BVLINKWB1. Step by step setup
Full-Duplex between two STM32WB demo setup
* In Windows 10, if an error occurs,
please delete the audio driver from device manager and unplug and re­plug the usb cable from Nucleo board
2.2- Test Full-Duplex audio streaming
between STM32WB and mobile device
FP-AUD-BVLINKWB1. Step by step setup
HW prerequisites for Full-Duplex demo between STM32WB and mobile device
17
Peripheral Unit
Audio
compressed
@24kbps
USB out
@16/8kHz
Central Unit
USB
Audacity or other
audio recording sw
P-NUCLEO-WB55
+
X-NUCLEO-CCA02M2
BVLPeripheral project
ST BLE Sensor App
Peripheral Unit
Audio
compressed
@24kbps
USB out
@16/8kHz
Central Unit
USB
Audacity or other
audio recording sw
STM32WB5MM-DK
ST BLE Sensor App
BVLPeripheral project
OR
18
2
Move JP1 on P-NUCLEO-WB55 or JP2 on STM32WB5MM­DK from USB STL to USB MCU. Plug a micro-USB cable into USB_USER
STM32WB is recognized as USB Microphone by Windows.
3
4
In Audacity set the default audio settings; open Edit/Preferences and select quality tab, choose 16 kHz as sampling frequency and 16-bit sample format. If you want to hear the audio while recording it, open Edit/Preferences, select Recording tab and check
"Software playthrough of input“. Now select the STM32Microphone and click record *
5
Open ST BLE Sensor App on your android device and connect to BVL-WB1. Push User button 1 on the board to start audio streaming to the app. You can hear audio from the smartphone speaker.
Enable the Start switch on the app to start audio streaming from the smartphone to the board. Audacity acquires the received audio. To avoid Larsen effect, keep the board and smartphone at minimum 40 cm or connect a headset to your mobile device.
6
1
Compile and download BVLPeripheral application on P-NUCLEO-WB55 (JP1 on USB STL) or on STM32WB5MM-DK (JP2 on USB STL)
FP-AUD-BVLINKWB1. Step by step setup
Full-Duplex between STM32WB and mobile device demo setup
* In windows 10, if an error occurs,
please delete the audio driver from device manager and unplug and re-plug the usb cable from Nucleo board
2.2- Test Full-Band stereo music
streaming
FP-AUD-BVLINKWB1. Step by step setup
HW prerequisites for Full-Band stereo music streaming
20
Peripheral Unit
USB out
stereo
@48kHz
Central Unit
USB
Audacity or other
audio recording sw
P-NUCLEO-WB55
BVLPeripheral project BVLCentral project
OR
Audio
Compressed
96/192 kbps
STM32WB5MM-DK
BLE 4.2 or higher
21
2
Move JP1 on P-NUCLEO-WB55 or JP2 on STM32WB5MM­DK from USB STL to USB MCU. Plug a micro-USB cable into USB_USER
STM32WB is recognized as USB Microphone by Windows.
3
4
In Audacity set the default audio settings; open Edit/Preferences and select quality tab, choose 48 kHz as sampling frequency and 16-bit sample format. If you want to hear the audio while recording it, open Edit/Preferences, select
Recording tab and check "Software playthrough of input“. Now select the
STM32Microphone and 2 Recording Channels and click record *
5
Open ST BLE Sensor App on your device and connect to BVFBAND. Choose a track and press play. (you can import wav file from your device)
Audacity records 48kHz stereo music coming from the Android device.
6
* In windows 10, if an error occurs,
please delete the audio driver from device manager and unplug and re-plug the usb cable from Nucleo board
1
Compile and download BVLPeripheral_FullBand application on P-NUCLEO­WB55 (JP1 on USB STL) or on STM32WB5MM-DK (JP2 on USB STL)
FP-AUD-BVLINKWB1. Step by step setup
Full-Duplex between STM32WB and mobile device demo setup
3- Documents & Related Resources
Documents & Related Resources
FP-AUD-BVLINKWB1:
DB3973: STM32Cube function pack for STM32WB MCU featuring advanced audio streaming over Bluetooth 5.0 using Opus codec – data
brief
UM2614: Getting started with the STM32Cube function pack for STM32WB MCU featuring advanced audio streaming over Bluetooth 5.0 using Opus codec – user manual
P-NUCLEO-WB55:
Gerber files, BOM, Schematic
DB3659: STM32WB Nucleo-68 pack for wireless solutions data brief
UM2435: Bluetooth® Low Energy and 802.15.4 Nucleo pack based on STM32WB Series microcontrollers user manual
STM32WB5MM-DK:
Gerber files, BOM, Schematic
Data Brief: available on www.st.com
User Manual: available on www.st.com
X-NUCLEO-CCA02M2:
Gerber files, BOM, Schematic
DB4016: Digital MEMS microphones expansion board based on MP34DT06-J for STM32 Nucleo data brief
UM2631: Getting started with the digital MEMS microphones expansion board based on MP34DT06-J for STM32 Nucleo user manual
23
All documents are available in the DESIGN tab of the related products webpage
Consult www.st.com for the complete list
4- STM32 Open Development
Environment: Overview
STM32 Open Development Environment
Fast, affordable Prototyping and Development
25
The STM32 Open Development Environment (STM32 ODE) is an open, flexible, easy, and affordable way
to develop innovative devices and applications based on the STM32 32-bit microcontroller family combined with other state-of-the-art ST components connected via expansion boards. It enables fast prototyping with leading-edge components that can quickly be transformed into final designs
For further information, please visit www.st.com/stm32ode
Function Packs
(FP)
STM32Cube
development software
STM32 Nucleo
expansion boards
(X-NUCLEO)
STM32 Nucleo
development boards
STM32Cube
expansion software
(X-CUBE)
© STMicroelectronics - All rights reserved. The STMicroelectronics corporate logo is a registered trademark of the STMicroelectronics group of companies. All other names are the property of their respective owners.
Thank you
Loading...