I am extending the snip / bluetooth / bt_dualmode_server for my own needs. While creating threads, I noticed 2 strange behaviours.
1) In initialize(&sWrap) function, I create 3 threads and if I give a delay later on, the system gets stuck. If I comment out the delay, threads run fine
wiced_rtos_delay_milliseconds(100); // comment out this and threads run fine, otherwise system gets stuck
2) When I enable the bluetooth stack, some of the threads fail to start, I solved this error by decreasing the stack size to 5000 from the default value. Is this normal or do I miss some other thing? I have 3 threads and my platform is redbear duo and I am using SDK 3.7.0
wiced_bt_stack_init( bt_dualmode_server_management_cback, &wiced_bt_cfg_settings, wiced_bt_cfg_buf_pools );
I would be happy if you can guide me about this
Could you kindly try with the latest version of WICED which is 5.1. There is a high probability that you might not see this issue with the newer versions.