STM32WW Wi-Fi® – X-CUBE-WW4 Overview

Revision as of 16:08, 22 February 2024 by Registered User

back to main page Please understand this is draft, thank you


1. X-CUBE-WW4 Pack content

The X-Cube Firmware is organized in the typical way as most of packs delivered by STM.
This Wiki page will focus on the part of the pack specific to the Wi-Fi, giving a brief description of the Middlewares and Applications folder organization.
Third party Middlerewas (LWIP, MbedTLS, FreeRTOS, etc) are not covered by this page, because their folder structure is inherited from the public code.

2. Middlewares

2.1. WLAN_Driver

It is basically the code allowing the two chips communication (host and ww4) and ww4 fw download.
Umac interface, RPC (Remote Procedure Call) and COM abstraction.
It is provided in source code.
Linux oriented. Folders shared `between MCU host, MPU host and with STM32WW4 device.
It occupies about 10 kb (mw) + 5 kb (sdio) flash (on the host)

2.2. WLAN_Lib and WPA supplicant

WLAN_API, wpa_supplicant, wpa_supplicant MCU customization.
WPA supplicant is given is source code, this comes from Linux distribution.
The customization of the WPA supplicant for MCU devices is given in library.
The WLAN_Lib is a bridge between application, WPA Supplicant, LWIP and WLAN_Driver.
This code is given in libraries.
Part of the WLAN_Lib is given in source code and part as a compiled libraries (.a)

These the principal directories of the WLAN_Lib middleware:
- Api: include files with type definitions and functions prototypes offered by the WLAN_Lib to the application.
- Config: wlan_lib_config_template.h should be copied to the project space and to be used to configure the WLAN_Lib according to the specific project needs.
- Interface: the Wlan_Lib requests via these include files a set of callbacks or functions that the project must provide to allow the Wlan_Lib to be functional. Few examples, a way to allocate memory, a way to log messages, an interface with an IP stack, etc.
- WLAN_Driver_Shim: It is a specific interface WLAN_Lib vs WLAN_Driver.
- wpa_supplicant_bsd3: pubblic WPA supplicant from Linux world.
- wpa_supplicant/ST_customization: Customisation to STM32 MCUs.

Big code size, depends on the config.

3. Applications

3.1. Structure

The application resides on the top, it uses several middleware modules and drivers, some from Third Parties some from ST.

3.2. Applications

Several applications are available in the Projects directories.
Applications are available for U5 and H7 boards.
The above picture shows some of them, the list is still evolving.

Each application has similar structure, the picture below refers to CLI project, but Echo project has similar topology.
The file that differentiates the applications are in the WLAN_Lib/App directory and main_app.c is the one that differentiates one application by the other. The files app_conf.h and credentials_and_ip_static_addr.h are meant to be configuered by users. More details below, because they might depend on specific applications.