cancel
Showing results for 
Search instead for 
Did you mean: 

Firmware for STM32WB05KZV6TR with Sensors and BLE (No Host MCU)

vkosuri
Associate II
Dear Friends,
 
I’m developing firmware for the STM32WB05KZV6TR with these sensors: LIS2MDLTR (magnetometer), LSM6DSO32XTR (accelerometer/gyroscope), and HSFPAR004A (force sensor).
 
My PCB is already printed, and components are installed, so I can’t add a host MCU.
 
I need to implement BLE export (to a mobile device), Flash writing, and sensor data export using only the STM32WB05KZV6TR.
 
Details:
  • MCU: STM32WB05KZV6TR (192 KB Flash, 24 KB RAM).
  • Features: BLE GATT server, sensor data handling, Flash storage.
  • Approach: Bare metal programming (FreeRTOS/Zephyr may be too heavy).
Questions:
  1. Can I fit this functionality within 24 KB of RAM and 192 KB of Flash? Any optimisation tips?
  2. Are there examples or libraries for these sensors with the STM32WB series?
  3. How should I structure the firmware to balance sensor reads and BLE notifications?
  4. Is STM32CubeMX the best tool for configuring peripherals and BLE?
I’d appreciate any advice, code snippets, or example projects!
1 REPLY 1
Saket_Om
ST Employee

Hello @vkosuri 

Below are some optimisation tips: 

  •  RAM Usage:

    • Use static memory allocation where possible.
    • Minimize stack usage by optimizing function calls and avoiding deep recursion.
    • Using efficient data structures and algorithms.
  • Flash Usage:

    • Removing unnecessary code and libraries.
    • Using compiler optimization flags (e.g. size optimization).
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.
Saket_Om