[BLE] wiced_bt_stack_init gets stucks

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
user_2112781
Level 4
Level 4
10 likes received 10 likes given 5 likes given

Sometimes the function wiced_bt_stack_init will not call my management callback function. The last output I see is:

00000119 GKI_create_task func=0x4ada75  id=1  name=BTU  stack=0x0  stackSize=6144

00000126 GKI_create_task func=0x4aef21  id=0  name=HCISU  stack=0x0  stackSize=4096

But that's it, if I reboot the board it might work as usual, I get this issue around 20% of the time.

0 Likes
1 Solution
Anonymous
Not applicable

For SDK 4.0.7.58, 20719-B0_Bluetooth, the root cause of the no BTM_ENABLED_EVT issue I encounted was because the value of the maximum bumber of buffer pools was default set to 0 (uninitialized) in the wiced_bt_cfg_settings data structure when it was automatically generated.

We must manually add the code to set the value for .max_number_of_buffer_pools in wiced_bt_cfg_settings as below.

const wiced_bt_cfg_settings_t wiced_bt_cfg_settings =

{

     ...

     /* LE Address Resolution Database Settings */

     .addr_resolution_db_size =    10,

     ...             

+     /* Maximum number of buffer pools */

+     .max_number_of_buffer_pools = 4,

}

After set the value of .max_number_of_buffer_pools, the application worked fine. 🙂

Thanks,

Dudley

View solution in original post

5 Replies