Migration guide Bluetooth® LE application from STM32WB to STM32WBA


Migrating a Bluetooth® LE application from STM32WB to STM32WBA is very feasible, but it is not a simple recompile. The two product lines differ in architecture, BLE stack integration, middleware organization, security model, low-power handling, and project generation flow. This guide provide a practical migration for an STM32Cube-based application.

1. Executive summary

The main architectural change between STM32WB and STM32WBA is the transition from a dual-core system to a single-core application architecture.

On STM32WB, the application must coordinate with CPU2 for wireless stack execution, clocking, low-power handling, flash access, and shared resources.

On STM32WBA, these responsibilities are mostly handled by the WBA framework and its system services.

As a result, migration is mainly about:

  • removing dual-core assumptions
  • replacing mailbox and CPU2 control flows with framework services
  • adapting initialization, low-power, memory, clock, and flash handling
  • preserving the application logic while restructuring the platform layer
Migration from STM32WB to STM32WBA

2. Software architecture comparison

STM32WB uses a dual-core architecture with CPU1 and CPU2. This architecture requires intercore communication, mailbox handling, shared memory coordination, and CPU2 firmware management.

In contrast, STM32WBA uses a more integrated single-core model based on Cortex-M33, with wireless services, system utilities, and platform features exposed through the WBA framework.

As a result, migration from STM32WB to STM32WBA generally involves removing dual-core assumptions, replacing transport and synchronization logic with framework services, and adapting the application structure to the more modular STM32WBA architecture.

For more information, refer to the STM32CubeWBA SW Architecture and STM32CubeWBA System modules wiki pages.

The central idea is that the migration does not require a complete rewrite of the Bluetooth® Low Energy (BLE) application. The migration mainly affects the parts that change when moving from dual-core STM32WB to single-core STM32WBA.

The BLE application layer remains mostly similar between STM32WB and STM32WBA. Custom BLE logic, services, and application behavior can often be reused with limited modifications.

  • Same host stack: most GATT service logic can remain unchanged
  • Application callbacks might require small updates
  • Some BLE application programming interfaces (APIs) might change, but not significantly

This figure shows where to focus when migrating a BLE application.

Migration from STM32WB to STM32WBA

The most important migration work is in the wireless stack integration, especially:

  • BLE host stack integration
  • Link layer integration
  • Initialization sequence
  • Timing requirements for the new RF and low-level stack

For more information, refer to the STM32CubeWBA SW Architecture wiki page.

3. BLE Application conception

For the safest minimal migration approach from STM32WB to STM32WBA, it is recommended not to port the entire STM32WB project as is; instead, create a fresh STM32WBA BLE project and move over only the application-relevant parts such as your BLE service logic, state machine, and hardware abstraction layers.

A good starting point is the STM32WBA BLE CubeMX wiki page, which provides guidance on configuring and generating a BLE project for STM32WBA. It also helps align the migration with the expected project structure and initialization flow.


The picture shows that migration is not a direct file-by-file port from STM32WB to STM32WBA.

Instead, it illustrates an application reorganization. A large part of the BLE application logic is reused, while the BLE stack and link-layer integration are redesigned for the STM32WBA architecture.

The diagram highlights a smooth transition from STM32WB to STM32WBA with these points:

  • Application and peripheral code are mostly reusable
  • BLE service logic moves closer to the application
  • The wireless architecture changes significantly
  • Some STM32WB wireless middleware files cannot be ported directly
  • STM32WBA uses a new RF IP, a new link layer, and a different integration model
STM32WB & STM32WBA BLE P2P Server application project structure

For more information about the STM32WBA BLE application project structure, refer to the P2P Project description.

If the project does not start from an existing example or an STM32CubeMX .ioc file, isolate the application logic.

  • BLE middleware adaptation
  • application services and state machine
  • hardware abstraction for sensors, LEDs, UART, and related peripherals