1 Reply Latest reply on Sep 5, 2017 4:06 AM by yssu

    limitations for threads ?

    riforifo

      Hello,

       

      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

       

       

      void application_start()

      {

         ...

         initialize(&sWrap);

         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 );

       

          initialize(&sWrap);

        }

       

       

      I would be happy if you can guide me about this

      rifo