cancel
Showing results for 
Search instead for 
Did you mean: 

Missing stm32wb0x_ble_stack_light.a (light BLE stack) in BLE static libs for WB0 series

vkosuri
Associate III

HI ST Team,

Concerning the GitHub issue https://github.com/STMicroelectronics/STM32CubeWB0/issues/6

 

In AN5289 – "How to build wireless applications with STM32WB MCUs", Table 1 lists multiple BLE stack options for STM32WB5x devices, including:

  • stm32wb5x_BLE_Stack_full_fw.bin
  • stm32wb5x_BLE_Stack_light_fw.bin

vkosuri_1-1750769769143.png

In the current lib https://github.com/STMicroelectronics/STM32CubeWB0/tree/main/Middlewares/ST/STM32_BLE/stack/lib, only these static libs are present:

  • stm32wb0x_ble_stack.a
  • stm32wb0x_ble_stack_controller_only.a

There is no separate stm32wb0x_ble_stack_light.a, which is expected as the lightweight alternative to the full BLE stack.

Clarification Request:

  • Can you please confirm if the *_controller_only.a is the intended lightweight replacement for the missing light.a?
  • If yes, can you kindly update the GitHub folder README or documentation to reflect this equivalence (i.e., "controller only.a is functionally similar to the BLE light stack")?
  • If not, can the missing light.a A variant be added?

This would help developers optimise for RAM-constrained devices like the STM32WB05 (24KB RAM), especially when targeting single-link BLE applications.

Thank you for the clarification and support!

1 ACCEPTED SOLUTION

Accepted Solutions
STTwo-32
ST Employee

Hello @vkosuri 

The STM32WB0 Bluetooth® LE stack v4.x provides the capability to enable/disable, at compile time, the following Bluetooth® LE stack features based on a user-specific application scenario:
1. Enable/disable controller privacy
2. Enable/disable LE secure connections
3. Enable/disable scan capability
4. Enable/disable data length extension (valid only for the device supporting the data length extension feature)
5. Enable/disable LE 2M and LE Coded PHYs features
6. Enable/disable extended advertising and scanning features
7. Enable/disable L2CAP, connection-oriented data service feature (L2CAP-COS)
8. Enable/disable periodic advertising
9. Enable/disable periodic advertising with responses
10. Enable/disable constant tone extension (where applicable)
11. Enable/disable LE Power Control and Path Loss Monitoring
12. Enable/disable the connection capability.
13. Enable/disable the connection subrating
14. Enable/disable the channel classification
15. Enable/disable the broadcast isochronous streams
16. Enable/disable the connected isochronous streams

As consequence, user can define which Bluetooth LE specific features to be used according to application scenario and optimize the overall application memory footprint.

The selection is done through the app_conf.h file and the following define values:

/******************************************************************************
* BLE Stack modularity options
******************************************************************************/
#define CFG_BLE_CONTROLLER_SCAN_ENABLED (0U)
#define CFG_BLE_CONTROLLER_PRIVACY_ENABLED (0U)
#define CFG_BLE_SECURE_CONNECTIONS_ENABLED (1U)
#define CFG_BLE_CONTROLLER_DATA_LENGTH_EXTENSION_ENABLED (0U)
#define CFG_BLE_CONTROLLER_2M_CODED_PHY_ENABLED (1U)
#define CFG_BLE_CONTROLLER_EXT_ADV_SCAN_ENABLED (0U)
#define CFG_BLE_L2CAP_COS_ENABLED (0U)
#define CFG_BLE_CONTROLLER_PERIODIC_ADV_ENABLED (0U)
#define CFG_BLE_CONTROLLER_PERIODIC_ADV_WR_ENABLED (0U)
#define CFG_BLE_CONTROLLER_CTE_ENABLED (0U)
#define CFG_BLE_CONTROLLER_POWER_CONTROL_ENABLED (0U)
#define CFG_BLE_CONNECTION_ENABLED (1U)
#define CFG_BLE_CONTROLLER_CHAN_CLASS_ENABLED (0U)
#define CFG_BLE_CONTROLLER_BIS_ENABLED (0U)
#define CFG_BLE_CONNECTION_SUBRATING_ENABLED (0U)
#define CFG_BLE_CONTROLLER_CIS_ENABLED (0U)

The modular configuration can be handled through the CubeMX STM32_BLE tab when user generates his application.

You could refer to the following documents for detailed information about this key capability:

PM0274: Section 3.1 Bluetooth® Low Energy stack library framework

AN5977: Section 4.1.2.1 Bluetooth® LE host stack, Section 5.3 How to build STM32_BLE applications with STM32CubeMX.

Wiki.

This framework allows to target typical Bluetooth LE applications as Beacon, peripheral/gatt server or central/gatt client with optimized memory footprint and within the STM32WB05 memory layout. OnSTM32CubeWB0 Sw package, you can find a full set of BLE applications (Projects\NUCLEO-WB05KZ\Applications\BLE).
You can refer to the AN5977: Table 6. Library footprints for memory footprint related to BLE Beacon, Hearth Rate, p2pserver which are fully in line with WB05 memory layout.

Best regards.

STTwo-32

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

View solution in original post

5 REPLIES 5
STTwo-32
ST Employee

Hello @vkosuri 

The AN5289 is applicable for the STM32WB MCU series and not the STM32WB0 MCUs (STM32WB and WB0 are not the same and they don't have the same implementations).

Best Regards.

STTwo-32

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

Hi @STTwo-32 Is there any similar document for STM32WB0 MCUs?

and could you please share some information on how to optimise for RAM https://www.st.com/en/microcontrollers-microprocessors/stm32wb05kz.html as it had only 24KB RAM especially when targeting single-link BLE applications no audio.

 

For example what is the recommended app_config.h

The major problem we are facing when we build the image with a release build it's going around 80% and debug it's going beyond 90%

Release Build

 

vkosuri_1-1751218510958.png

Debug Build

vkosuri_2-1751218533292.png

app_conf.h

/* USER CODE BEGIN Header */
#ifndef APP_CONF_H
#define APP_CONF_H

/* Includes ------------------------------------------------------------------*/
#include "stm32wb0x.h"
/* USER CODE BEGIN Includes */

/* USER CODE END Includes */

/**
 * Define to 1 if LSE is used, otherwise set it to 0.
 */
#define CFG_LSCLK_LSE                       (1)

/******************************************************************************
 * Application Config
 ******************************************************************************/
/**< generic parameters ******************************************************/
/**
 * Define Tx Power Mode
 */
#define CFG_TX_POWER_MODE                   (0) /* Tx normal power mode */

/**
 * Define Tx Power
 */
#define CFG_TX_POWER                        (0x18) /* 0x18 <=> 0 dBm */

/**
 * Define Advertising parameters
 */
#define CFG_PUBLIC_BD_ADDRESS               (0x0280E1AAABAC)
#define CFG_BD_ADDRESS_TYPE                 HCI_ADDR_STATIC_RANDOM_ADDR
#define CFG_BLE_PRIVACY_ENABLED             (0)

#define ADV_INTERVAL_MIN                    (0x0080)
#define ADV_INTERVAL_MAX                    (0x00A0)
#define ADV_LP_INTERVAL_MIN                 (0x0640)
#define ADV_LP_INTERVAL_MAX                 (0x0FA0)
#define ADV_TYPE                            (HCI_ADV_EVENT_PROP_LEGACY|HCI_ADV_EVENT_PROP_CONNECTABLE|HCI_ADV_EVENT_PROP_SCANNABLE)
#define ADV_FILTER                          HCI_ADV_FILTER_NONE

/**
 * Define IO Authentication
 */
#define CFG_BONDING_MODE                    (1)
#define CFG_FIXED_PIN                       (111111)
#define CFG_ENCRYPTION_KEY_SIZE_MAX         (16)
#define CFG_ENCRYPTION_KEY_SIZE_MIN         (8)

/**
 * Define IO capabilities
 */
#define CFG_IO_CAPABILITY                   GAP_IO_CAP_DISPLAY_YES_NO

/**
 * Define MITM modes
 */
#define CFG_MITM_PROTECTION                 GAP_MITM_PROTECTION_REQUIRED

/**
 * Define Secure Connections Support
 */
#define CFG_SC_SUPPORT                      GAP_SC_OPTIONAL

/**
 * Define Keypress Notification Support
 */
#define CFG_KEYPRESS_NOTIFICATION_SUPPORT   GAP_KEYPRESS_NOT_SUPPORTED

/**
 * Appearance of device set into BLE GAP
 */
#define CFG_GAP_APPEARANCE                  (GAP_APPEARANCE_UNKNOWN)

/* USER CODE BEGIN Generic_Parameters */

/* USER CODE END Generic_Parameters */

/**< specific parameters */
/*****************************************************/

/* USER CODE BEGIN Specific_Parameters */

/* USER CODE END Specific_Parameters */

/******************************************************************************
 * BLE Stack initialization parameters
 ******************************************************************************/

/**
 * Maximum number of simultaneous radio tasks. Radio controller supports up to
 * 128 simultaneous radio tasks, but actual usable max value depends on the
 * available RAM.
 */
#define CFG_BLE_NUM_RADIO_TASKS                         (CFG_NUM_RADIO_TASKS)

/**
 * Maximum number of attributes that can be stored in the GATT database in addition to the attributes number already defined for the GATT and GAP services
 * (BLE_STACK_NUM_GATT_MANDATORY_ATTRIBUTES value on STM32_BLE middleware, ble_stack.h header file).
 */
#define CFG_BLE_NUM_GATT_ATTRIBUTES                     (7)

/**
 * Maximum number of concurrent Client's Procedures. This value must be less
 * than or equal to the maximum number of supported links (CFG_BLE_NUM_RADIO_TASKS).
 */
#define CFG_BLE_NUM_OF_CONCURRENT_GATT_CLIENT_PROC      (2)

/**
 * Maximum supported ATT MTU size [23-1020].
 */
#define CFG_BLE_ATT_MTU_MAX                             (247)

/**
 * Maximum duration of the connection event in system time units (625/256 us =~
 * 2.44 us) when the device is in Peripheral role [0-0xFFFFFFFF].
 */
#define CFG_BLE_CONN_EVENT_LENGTH_MAX                   (0xFFFFFFFF)

/**
 * Sleep clock accuracy (ppm).
 */
#if CFG_LSCLK_LSE
/* Change this value according to accuracy of low speed crystal (ppm). */
#define CFG_BLE_SLEEP_CLOCK_ACCURACY                    (100)
#else
/* This value should be kept to 500 ppm when using LSI. */
#define CFG_BLE_SLEEP_CLOCK_ACCURACY                    (500)
#endif

/**
 * Number of extra memory blocks, in addition to the minimum required for the
 * supported links.
 */
#define CFG_BLE_MBLOCK_COUNT_MARGIN                     (32)

/**
 * Maximum number of simultaneous EATT active channels. It must be less than or
 * equal to CFG_BLE_COC_NBR_MAX.
 */
#define CFG_BLE_NUM_EATT_CHANNELS                       (0)

/**
 * Maximum number of channels in LE Credit Based Flow Control mode [0-255].
 * This number must be greater than or equal to CFG_BLE_NUM_EATT_CHANNELS.
 */
#define CFG_BLE_COC_NBR_MAX                             (1)

/**
 * The maximum size of payload data in octets that the L2CAP layer entity is
 * capable of accepting [0-1024].
 */
#define CFG_BLE_COC_MPS_MAX                             (247)

/**
 * Maximum number of Advertising Data Sets, if Advertising Extension Feature is
 * enabled.
 */
#define CFG_BLE_NUM_ADV_SETS                            (1)

/**
 * Maximum number of Periodic Advertising with Responses subevents.
 */
#define CFG_BLE_NUM_PAWR_SUBEVENTS                      (16)

/**
 * Maximum number of subevent data that can be queued in the controller.
 */
#define CFG_BLE_PAWR_SUBEVENT_DATA_COUNT_MAX            (8U)

/**
 * Maximum number of slots for scanning on the secondary advertising channel,
 * if Advertising Extension Feature is enabled.
 */
#define CFG_BLE_NUM_AUX_SCAN_SLOTS                      (0)

/**
 * Maximum number of slots for synchronizing to a periodic advertising train,
 * if Periodic Advertising and Synchronizing Feature is enabled.
 */
#define CFG_BLE_NUM_SYNC_SLOTS                          (0)

/**
 * Two's logarithm of Filter Accept, Resolving and Advertiser list size.
 */
#define CFG_BLE_FILTER_ACCEPT_LIST_SIZE_LOG2            (0)

/**
 * Maximum number of Antenna IDs in the antenna pattern used in CTE connection
 * oriented mode.
 */
#define CFG_BLE_NUM_CTE_ANTENNA_IDS_MAX                 (0)

/**
 * Maximum number of IQ samples in the buffer used in CTE connection oriented mode.
 */
#define CFG_BLE_NUM_CTE_IQ_SAMPLES_MAX                  (0)

/**
 * Maximum number of slots for synchronizing to a Broadcast Isochronous Group.
 */
#define CFG_BLE_NUM_SYNC_BIG_MAX                        (1U)

/**
 * Maximum number of slots for synchronizing to a Broadcast Isochronous Stream.
 */
#define CFG_BLE_NUM_SYNC_BIS_MAX                        (2U)

/**
 * Maximum number of slots for broadcasting a Broadcast Isochronous Group.
 */
#define CFG_BLE_NUM_BRC_BIG_MAX                         (1U)

/**
 * Maximum number of slots for broadcasting a Broadcast Isochronous Stream.
 */
#define CFG_BLE_NUM_BRC_BIS_MAX                         (2U)

/**
 * Maximum number of Connected Isochronous Groups.
 */
#define CFG_BLE_NUM_CIG_MAX                             (2U)

/**
 * Maximum number of Connected Isochronous Streams.
 */
#define CFG_BLE_NUM_CIS_MAX                             (2U)

/**
 * Size of the internal FIFO used for critical controller events produced by the
 * ISR (e.g. rx data packets).
 */
#define CFG_BLE_ISR0_FIFO_SIZE                          (256)

/**
 * Size of the internal FIFO used for non-critical controller events produced by
 * the ISR (e.g. advertising or IQ sampling reports).
 */
#define CFG_BLE_ISR1_FIFO_SIZE                          (768)

/**
 * Size of the internal FIFO used for controller and host events produced
 * outside the ISR.
 */
#define CFG_BLE_USER_FIFO_SIZE                          (2600)

/**
 * If 1, Peripheral Preferred Connection Parameters Characteristic is added in GAP service.
 */
#define CFG_BLE_GAP_PERIPH_PREF_CONN_PARAM_CHARACTERISTIC  (0)

/**
 * If 1, Encrypted Key Material Characteristic is added in GAP service.
 */
#define CFG_BLE_GAP_ENCRYPTED_KEY_MATERIAL_CHARACTERISTIC  (0)

/**
 * Number of allocated memory blocks used for packet allocation.
 * The use of BLE_STACK_MBLOCKS_CALC macro is suggested to calculate the minimum
 * number of memory blocks for a given number of supported links and ATT MTU.
 */
#define CFG_BLE_MBLOCKS_COUNT           (BLE_STACK_MBLOCKS_CALC(CFG_BLE_ATT_MTU_MAX, CFG_BLE_NUM_RADIO_TASKS, CFG_BLE_NUM_EATT_CHANNELS) + CFG_BLE_MBLOCK_COUNT_MARGIN)

/**
 * Macro to calculate the RAM needed by the stack according the number of links,
 * memory blocks, advertising data sets and all the other initialization
 * parameters.
 */
#define BLE_DYN_ALLOC_SIZE (BLE_STACK_TOTAL_BUFFER_SIZE(CFG_BLE_NUM_RADIO_TASKS,\
                                                        CFG_BLE_NUM_EATT_CHANNELS,\
                                                        CFG_BLE_NUM_GATT_ATTRIBUTES,\
                                                        CFG_BLE_NUM_OF_CONCURRENT_GATT_CLIENT_PROC,\
                                                        CFG_BLE_MBLOCKS_COUNT,\
                                                        CFG_BLE_NUM_ADV_SETS,\
                                                        CFG_BLE_NUM_PAWR_SUBEVENTS,\
                                                        CFG_BLE_PAWR_SUBEVENT_DATA_COUNT_MAX,\
                                                        CFG_BLE_NUM_AUX_SCAN_SLOTS,\
                                                        CFG_BLE_FILTER_ACCEPT_LIST_SIZE_LOG2,\
                                                        CFG_BLE_COC_NBR_MAX,\
                                                        CFG_BLE_NUM_SYNC_SLOTS,\
                                                        CFG_BLE_NUM_CTE_ANTENNA_IDS_MAX,\
                                                        CFG_BLE_NUM_CTE_IQ_SAMPLES_MAX,\
                                                        CFG_BLE_NUM_SYNC_BIG_MAX,\
                                                        CFG_BLE_NUM_BRC_BIG_MAX,\
                                                        CFG_BLE_NUM_SYNC_BIS_MAX,\
                                                        CFG_BLE_NUM_BRC_BIS_MAX,\
                                                        CFG_BLE_NUM_CIG_MAX,\
                                                        CFG_BLE_NUM_CIS_MAX,\
                                                        CFG_BLE_ISR0_FIFO_SIZE,\
                                                        CFG_BLE_ISR1_FIFO_SIZE,\
                                                        CFG_BLE_USER_FIFO_SIZE))

/* USER CODE BEGIN BLE_Stack */

/* USER CODE END BLE_Stack */

/******************************************************************************
 * BLE Stack modularity options
 ******************************************************************************/
#define CFG_BLE_CONTROLLER_SCAN_ENABLED                   (0U)
#define CFG_BLE_CONTROLLER_PRIVACY_ENABLED                (0U)
#define CFG_BLE_SECURE_CONNECTIONS_ENABLED                (1U)
#define CFG_BLE_CONTROLLER_DATA_LENGTH_EXTENSION_ENABLED  (1U)
#define CFG_BLE_CONTROLLER_2M_CODED_PHY_ENABLED           (1U)
#define CFG_BLE_CONTROLLER_EXT_ADV_SCAN_ENABLED           (0U)
#define CFG_BLE_L2CAP_COS_ENABLED                         (0U)
#define CFG_BLE_CONTROLLER_PERIODIC_ADV_ENABLED           (0U)
#define CFG_BLE_CONTROLLER_PERIODIC_ADV_WR_ENABLED        (0U)
#define CFG_BLE_CONTROLLER_CTE_ENABLED                    (0U)
#define CFG_BLE_CONTROLLER_POWER_CONTROL_ENABLED          (0U)
#define CFG_BLE_CONNECTION_ENABLED                        (1U)
#define CFG_BLE_CONTROLLER_CHAN_CLASS_ENABLED             (0U)
#define CFG_BLE_CONTROLLER_BIS_ENABLED                    (0U)
#define CFG_BLE_CONNECTION_SUBRATING_ENABLED              (0U)
#define CFG_BLE_CONTROLLER_CIS_ENABLED                    (0U)

#if CFG_BLE_PRIVACY_ENABLED
#undef CFG_BLE_CONTROLLER_PRIVACY_ENABLED
#define CFG_BLE_CONTROLLER_PRIVACY_ENABLED                (1U)
#endif

/******************************************************************************
 * Low Power
 *
 *  When CFG_FULL_LOW_POWER is set to 1, the system is configured in full
 *  low power mode. It means that all what can have an impact on the consumptions
 *  are powered down.(For instance LED, Access to Debugger, Etc.)
 *
 *  When CFG_LPM_SUPPORTED and CFG_FULL_LOW_EMULATED are both set to 1, the system is configured to
 *  emulate the Deepstop mode without losing the debugger connection and breakpoints nor watchpoints.
 *
 ******************************************************************************/

#define CFG_FULL_LOW_POWER       (0)

#define CFG_LPM_SUPPORTED        (1)

#define CFG_LPM_EMULATED         (0)

/**
 * Low Power configuration
 */
#if (CFG_FULL_LOW_POWER == 1)
  #undef CFG_LPM_SUPPORTED
  #define CFG_LPM_SUPPORTED      (1)
#endif /* CFG_FULL_LOW_POWER */

/* USER CODE BEGIN Low_Power 0 */

/* USER CODE END Low_Power 0 */

/**
 * Supported requester to the MCU Low Power Manager - can be increased up  to 32
 * It list a bit mapping of all user of the Low Power Manager
 */
typedef enum
{
  CFG_LPM_APP,
  /* USER CODE BEGIN CFG_LPM_Id_t */

  /* USER CODE END CFG_LPM_Id_t */
} CFG_LPM_Id_t;

/* USER CODE BEGIN Low_Power 1 */

/* USER CODE END Low_Power 1 */

/*****************************************************************************
 * Traces
 * Enable or Disable traces in application
 * When CFG_DEBUG_TRACE is set, traces are activated
 *
 * Note : Refer to utilities_conf.h file in order to details
 *        the level of traces : CFG_DEBUG_TRACE_FULL or CFG_DEBUG_TRACE_LIGHT
 *****************************************************************************/
/**
 * Enable or disable debug prints.
 */
#define CFG_DEBUG_APP_TRACE             (0)

/**
 * Use or not advanced trace module. UART interrupts to be enabled.
 */
#define CFG_DEBUG_APP_ADV_TRACE         (0)

#define ADV_TRACE_TIMESTAMP_ENABLE      (0)

#if (CFG_DEBUG_APP_TRACE == 0)
#undef CFG_DEBUG_APP_ADV_TRACE
#define CFG_DEBUG_APP_ADV_TRACE         (0)
#endif

#if (CFG_DEBUG_APP_ADV_TRACE != 0)

#include "stm32_adv_trace.h"

#define APP_DBG(...)                                      \
{                                                                 \
  UTIL_ADV_TRACE_COND_FSend(VLEVEL_L, ~0x0, ADV_TRACE_TIMESTAMP_ENABLE, __VA_ARGS__); \
}
#else
#define APP_DBG(...) printf(__VA_ARGS__)
#endif

#if (CFG_DEBUG_APP_TRACE != 0)
#include <stdio.h>
#define APP_DBG_MSG             APP_DBG
#else
#define APP_DBG_MSG(...)
#endif

/* USER CODE BEGIN Traces */

/* USER CODE END Traces */

/******************************************************************************
 * Sequencer
 ******************************************************************************/

/**
 * These are the lists of task id registered to the sequencer
 * Each task id shall be in the range [0:31]
 */
typedef enum
{
  CFG_TASK_BLE_STACK,
  CFG_TASK_VTIMER,
  CFG_TASK_NVM,
  /* USER CODE BEGIN CFG_Task_Id_t */
  TASK_LSM6DSO32X_INT,
  TASK_LIS2MDL_INT,
  TASK_BUTTON,
  TASK_USB_DETECT,
  TASK_DATA_TRANSFER_BLE_ID,
  TASK_DATA_TRANSFER_LPUART_ID,
  TASK_DATA_WRITE_FLASH_ID,
  TASK_DATA_READ_FLASH_ID,
  TASK_DATA_ERASE_FLASH_ID,
  TASK_MOTION_DETECTED,
  TASK_STATIONARY_DETECTED,  
  CFG_TASK_DATA_PHY_UPDATE_ID,
  CFG_TASK_CONN_INTERV_UPDATE_ID,
  CFG_TASK_LINK_CONFIG_ID,
  /* USER CODE END CFG_Task_Id_t */
  CFG_TASK_NBR,  /**< Shall be LAST in the list */
} CFG_Task_Id_t;

/* USER CODE BEGIN DEFINE_TASK */

/* USER CODE END DEFINE_TASK */

/**
 * This is the list of priority required by the application
 * Each Id shall be in the range 0..31
 */
typedef enum
{
  CFG_SEQ_PRIO_0,
  CFG_SEQ_PRIO_1,
  /* USER CODE BEGIN CFG_SEQ_Prio_Id_t */

  /* USER CODE END CFG_SEQ_Prio_Id_t */
  CFG_SEQ_PRIO_NBR
} CFG_SEQ_Prio_Id_t;

/**
 * This is a bit mapping over 32bits listing all events id supported in the application
 */
typedef enum
{
  CFG_IDLEEVT_PROC_GAP_COMPLETE,
  /* USER CODE BEGIN CFG_IdleEvt_Id_t */

  /* USER CODE END CFG_IdleEvt_Id_t */
} CFG_IdleEvt_Id_t;

/******************************************************************************
 * RT GPIO debug module configuration
 ******************************************************************************/

#define RT_DEBUG_GPIO_MODULE         (0)

/* USER CODE BEGIN Defines */
/**
 * User interaction
 * When CFG_LED_SUPPORTED is set, LEDS are activated if requested
 * When CFG_BUTTON_SUPPORTED is set, the push button are activated if requested
 */

#define CFG_LED_SUPPORTED                       (1)
#define CFG_BUTTON_SUPPORTED                    (1)

/**
 * If CFG_FULL_LOW_POWER is requested, make sure LED and debugger are disabled
 */
#if (CFG_FULL_LOW_POWER == 1)
  #undef  CFG_LED_SUPPORTED
  #define CFG_LED_SUPPORTED      (0)
#endif /* CFG_FULL_LOW_POWER */

/* USER CODE END Defines */

#endif /*APP_CONF_H */

 

Hi @STTwo-32 Any suggetions on how do I imporve the RAM and Flash memory sizes of STM32WB05KZ MCU? Do you suggest the any optimal BLE app configuration?

STTwo-32
ST Employee

Hello @vkosuri 

The STM32WB0 Bluetooth® LE stack v4.x provides the capability to enable/disable, at compile time, the following Bluetooth® LE stack features based on a user-specific application scenario:
1. Enable/disable controller privacy
2. Enable/disable LE secure connections
3. Enable/disable scan capability
4. Enable/disable data length extension (valid only for the device supporting the data length extension feature)
5. Enable/disable LE 2M and LE Coded PHYs features
6. Enable/disable extended advertising and scanning features
7. Enable/disable L2CAP, connection-oriented data service feature (L2CAP-COS)
8. Enable/disable periodic advertising
9. Enable/disable periodic advertising with responses
10. Enable/disable constant tone extension (where applicable)
11. Enable/disable LE Power Control and Path Loss Monitoring
12. Enable/disable the connection capability.
13. Enable/disable the connection subrating
14. Enable/disable the channel classification
15. Enable/disable the broadcast isochronous streams
16. Enable/disable the connected isochronous streams

As consequence, user can define which Bluetooth LE specific features to be used according to application scenario and optimize the overall application memory footprint.

The selection is done through the app_conf.h file and the following define values:

/******************************************************************************
* BLE Stack modularity options
******************************************************************************/
#define CFG_BLE_CONTROLLER_SCAN_ENABLED (0U)
#define CFG_BLE_CONTROLLER_PRIVACY_ENABLED (0U)
#define CFG_BLE_SECURE_CONNECTIONS_ENABLED (1U)
#define CFG_BLE_CONTROLLER_DATA_LENGTH_EXTENSION_ENABLED (0U)
#define CFG_BLE_CONTROLLER_2M_CODED_PHY_ENABLED (1U)
#define CFG_BLE_CONTROLLER_EXT_ADV_SCAN_ENABLED (0U)
#define CFG_BLE_L2CAP_COS_ENABLED (0U)
#define CFG_BLE_CONTROLLER_PERIODIC_ADV_ENABLED (0U)
#define CFG_BLE_CONTROLLER_PERIODIC_ADV_WR_ENABLED (0U)
#define CFG_BLE_CONTROLLER_CTE_ENABLED (0U)
#define CFG_BLE_CONTROLLER_POWER_CONTROL_ENABLED (0U)
#define CFG_BLE_CONNECTION_ENABLED (1U)
#define CFG_BLE_CONTROLLER_CHAN_CLASS_ENABLED (0U)
#define CFG_BLE_CONTROLLER_BIS_ENABLED (0U)
#define CFG_BLE_CONNECTION_SUBRATING_ENABLED (0U)
#define CFG_BLE_CONTROLLER_CIS_ENABLED (0U)

The modular configuration can be handled through the CubeMX STM32_BLE tab when user generates his application.

You could refer to the following documents for detailed information about this key capability:

PM0274: Section 3.1 Bluetooth® Low Energy stack library framework

AN5977: Section 4.1.2.1 Bluetooth® LE host stack, Section 5.3 How to build STM32_BLE applications with STM32CubeMX.

Wiki.

This framework allows to target typical Bluetooth LE applications as Beacon, peripheral/gatt server or central/gatt client with optimized memory footprint and within the STM32WB05 memory layout. OnSTM32CubeWB0 Sw package, you can find a full set of BLE applications (Projects\NUCLEO-WB05KZ\Applications\BLE).
You can refer to the AN5977: Table 6. Library footprints for memory footprint related to BLE Beacon, Hearth Rate, p2pserver which are fully in line with WB05 memory layout.

Best regards.

STTwo-32

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.