Introduction
The X-CUBE-OPUS expansion software package for STM32Cube runs on different STM32 MCU families and includes a
firmware example that allows to easily configure and profile Opus encoder and decoder.
The expansion is built on STM32Cube software technology to ease portability across different STM32 microcontrollers.
The software comes with a sample implementation of the drivers running on NUCLEO-F413ZH, NUCLEO-H743ZI, NUCLEO-
F746ZG, NUCLEO-L552ZE-Q or P-NUCLEO-WB55 development boards.
The package provides a Python application to be used together with the STM32 example to create a point-to-point bidirectional
communication. The software allows the user to choose Opus settings, via an intuitive GUI, select different audio input files for
profiling test and receive back results as well as encode/decode data.
The two nodes (the host with Python app and the STM32) communicate through the ST-Link Virtual COM port with a custom
protocol.
The X-CUBE-OPUS expansion software package allows the user to evaluate Opus performance depending on his target
application, facilitating the choice of the correct STM32 and easily integrating the audio codec.
RELATED LINKS
Visit the STM32Cube ecosystem web page on www.st.com for further information
Getting started with the X-CUBE-OPUS audio codec evaluation and profiling
software expansion for STM32Cube
UM2806
User manual
UM2806 - Rev 1 - December 2020
For further information contact your local STMicroelectronics sales office.
www.st.com
1 X-CUBE-OPUS software expansion for STM32Cube
1.1 Overview
The X-CUBE-OPUS software package expands STM32Cube functionality.
The package key features are:
Complete tool to evaluate and profile the advanced Opus audio codec with each possible configuration on
different STM32 MCU families (ARM Cortex-M4, M7, M33)
Firmware example that shows how to use and integrate Opus on different STM32 MCU families
Sample application (compatible with Python 3.7) that allows to configure Opus, send audio data to STM32
Nucleo development boards and receive profiling results
Third-party Opus v1.3.1 (downloadable from https://www.opus-codec.org): an open, royalty-free and highly
versatile audio codec that is standardized by the Internet Engineering Task Force (IETF) as RFC 6716
Custom serial protocol to allow easy communication between the STM32 Nucleo development board and
the Host using dedicated commands
Sample implementation available on NUCLEO-F413ZH, NUCLEO-H743ZI, NUCLEO-F746ZG, NUCLEO-
L552ZE-Q or P-NUCLEO-WB55 development boards
Easy portability across different MCU families, thanks to STM32Cube
Free, user-friendly license terms
1.2 Architecture
This fully compliant software expansion for STM32Cube lets you develop applications based on Opus audio
codec.
The software is based on the STM32CubeHAL hardware abstraction layer for the STM32 microcontroller.
The package extends STM32Cube by providing a Board Support Package (BSP) for each STM32 Nucleo
development board supported, a proprietary middleware that implements a serial communication protocol and
the third-party middleware Opus for audio encoding and decoding.
The software layers used by the application software to access and use the communication channel and manage
user interface are:
STM32Cube HAL layer: the HAL driver layer provides a simple set of generic, multi-instance APIs
(application programming interfaces) to interact with the upper layers (application, libraries and stacks).
These generic and extension APIs are directly built on a common architecture and allow overlying layers like
middleware to implement their functions without depending on specific microcontroller unit (MCU) hardware
information. This structure improves the library code reusability and guarantees easy portability across other
devices.
Board support package (BSP) layer: provides support for the peripherals on the STM32 Nucleo board
(apart from the MCU). This set of APIs provides a programming interface for certain board-specific
peripherals like the LED, the user button etc. This interface also helps you identify the specific board version.
UM2806
X-CUBE-OPUS software expansion for STM32Cube
UM2806 - Rev 1
page 2/21