cancel
Showing results for 
Search instead for 
Did you mean: 

STM32WB BLE configuration / sizing (BLE_MBLOCK_COUNT)

Thomas Roell
Associate III

Ok, a tricky one. 

 

So for services and attributes it's documented that there is 10752 bytes, each service takes up 48 bytes, each attribute 40 bytes, and if you got th number of services and attributes you can compute backwards  BLE_ATT_VALUE_ARRAY_SIZE (after you mapped all characteristics to actual attributes), given the upper limit. Easy enough. (GATT_DB_Size_SRAM_NVM.xlsx)

 

My problem is now BLE_MBLOCK_COUNT. There is this macro:

#define BLE_TOTAL_BUFFER_SIZE(n_link, mblocks_count) \
        (16 + BLE_FIXED_BUFFER_SIZE_BYTES + \
         (BLE_PER_LINK_SIZE_BYTES * (n_link)) + \
         ((BLE_MEM_BLOCK_SIZE + 8) * (mblocks_count)))

What is the limit for BLE_TOTAL_BUFFER_SIZE ? If that is known, I can compute backwards to get "mblock_count" for a known "n_link".

 

Or is the documented 10752 byte number the limit for "BLE_TOTAL_BUFFER_SIZE()" plus the BLE_NUM_GATT_ATTRIBUTES / BLE_NUM_GATT_SERVICES / BLE_ATT_VALUE_ARRAY_SIZE database size ?

0 REPLIES 0