Click here for Bluetooth® LE overview
1. General software architecture
The user can rely on multiple modules and software blocks to create an application. The whole framework is called “Application Firmware Framework”. The architecture is designed over a three-level organization:
- Application firmware
- Bluetooth® LE stack
- Platform resources
1.1. Application firmware
This is the user application. It is based on:
- Peripherals, either from STMicroelectronics or from a third party
- Features developed by STMicroelectronics for short-range protocols, such as Bluetooth® LE profiles and others
- Utilities required by the application and the protocol stacks
- Generic utilities that provide easy access to basic features, such as low power management, sequencer, and others
1.2. Bluetooth® LE stack
The Bluetooth® LE stack is the main interface between the application and the hardware for Bluetooth® LE purposes. Two Bluetooth® LE stack variants are available:
- Bluetooth® LE Host + Controller stack
- The Bluetooth® LE Host + Controller stack manages all Bluetooth® LE stack protocols layers (GAP, GATT, ATT, SM, L2CAP, HCI, link layer, and the interface to the physical layer).
- Bluetooth® LE Controller only stack
- The Bluetooth® LE Controller includes only the HCI layer, the link layer, and the interface to the physical layer.
1.3. Platform resources
The platform resources include all the HALs, BSPs, and drivers that facilitate platform hardware use.
2. Project architecture
2.1. Overview
The project organization differs slightly from the application architecture. This organization is repository-based and split into six different parts:
EWARM project organization | |
---|---|
2.2. Application
Application is the core part of the project. It groups all the main information and actions that define the user application. This section is divided into sub-directories:
EWARM project view | |
---|---|
|
2.3. Common
Common is the core part of the project. It groups all the common information and actions that define the user application. This section is divided into sub-directories:
EWARM common view | |
---|---|
|
2.4. Doc
This section contains only the README.md file.
2.5. Drivers
The drivers are divided into the following component sets:
- STM32WB0x_HAL_Driver (hardware abstraction layer)
- This layer provides the hardware abstraction drivers and the hardware interfacing methods to interact with the upper layers (application, libraries, and stacks). The HAL is composed of:
- The HAL Drivers:
- A set of portable abstraction APIs based on high level services built around standalone processes. The HAL drivers are functionalities oriented.
- Low Layer Drivers:
- A set of basic drivers with direct hardware access with no standalone process, this layer can be called either by applications or by the HAL drivers.
- The HAL Core drivers:
- A set of internal drivers, which might have an additional file containing extended features. Those files end with "_ex".
- BSP Drivers
- This layer contains the high-level board services for the different functionalities offered by the hardware (such as LED, push-buttons, and others) and the drivers for the external components mounted on the used boards (such as IO expander and others).
- CMSIS Drivers
- Cortex Microcontroller Software Interface Standard (CMSIS) drivers that provide a single standard across all Cortex®-Mx processor series vendors. It enables code re-use and code sharing across software projects.
2.6. Middleware
Libraries and protocol-based components (such as Bluetooth® LE stack and others). This directory contains the STM32_BLE Bluetooth® LE middleware framework with associated Bluetooth® LE stack binary libraries (Host + Controller and Controller only images) and related header and source files.
2.7. Utilities
Miscellaneous software utilities that provide additional system and media resources services like sequencer tools box, low power manager, several trace utilities, and standard library services like memory services.
These utilities are not specific to one platform but available to a multitude of STM32 families.