]> granicus.if.org Git - esp-idf/commitdiff
bt component: Fix HCI task stack overflow bug
authorisland <island@espressif.com>
Thu, 23 Mar 2017 09:27:15 +0000 (17:27 +0800)
committerisland <island@espressif.com>
Thu, 23 Mar 2017 09:27:15 +0000 (17:27 +0800)
components/bt/bluedroid/osi/include/thread.h

index 61e9487eaf5cdbed01b40cbf2206d622a3dfeb9f..e88896d8485173b718d61771ac9b60ecc1fd5150 100644 (file)
@@ -43,25 +43,27 @@ enum {
     SIG_BTIF_WORK = 0xff
 };
 
-#define HCI_HOST_TASK_STACK_SIZE       1500
-#define HCI_HOST_TASK_PRIO                     (configMAX_PRIORITIES - 2)
-#define HCI_HOST_TASK_NAME                     "hciHostT"
-#define HCI_HOST_QUEUE_NUM                     40
-
-#define HCI_H4_TASK_STACK_SIZE         1500
-#define HCI_H4_TASK_PRIO                       (configMAX_PRIORITIES - 3)
-#define HCI_H4_TASK_NAME                       "hciH4T"
-#define HCI_H4_QUEUE_NUM                       60
-
-#define BTU_TASK_STACK_SIZE                    4096
-#define BTU_TASK_PRIO                          (configMAX_PRIORITIES - 4)
-#define BTU_TASK_NAME                          "btuT"
-#define BTU_QUEUE_NUM                          50
-
-#define BTC_TASK_STACK_SIZE            CONFIG_BTC_TASK_STACK_SIZE      //by menuconfig
-#define BTC_TASK_NAME                  "btcT"
-#define BTC_TASK_PRIO                  (configMAX_PRIORITIES - 5)
-#define BTC_TASK_QUEUE_NUM             20
+
+#define BT_TASK_EXTRA_STACK_SIZE 512
+#define HCI_HOST_TASK_STACK_SIZE        (2048 + BT_TASK_EXTRA_STACK_SIZE)
+#define HCI_HOST_TASK_PRIO              (configMAX_PRIORITIES - 2)
+#define HCI_HOST_TASK_NAME              "hciHostT"
+#define HCI_HOST_QUEUE_NUM              40
+
+#define HCI_H4_TASK_STACK_SIZE          (2048 + BT_TASK_EXTRA_STACK_SIZE)
+#define HCI_H4_TASK_PRIO                (configMAX_PRIORITIES - 3)
+#define HCI_H4_TASK_NAME                "hciH4T"
+#define HCI_H4_QUEUE_NUM                60
+
+#define BTU_TASK_STACK_SIZE             (3584 + BT_TASK_EXTRA_STACK_SIZE)
+#define BTU_TASK_PRIO                   (configMAX_PRIORITIES - 4)
+#define BTU_TASK_NAME                   "btuT"
+#define BTU_QUEUE_NUM                   50
+
+#define BTC_TASK_STACK_SIZE             (CONFIG_BTC_TASK_STACK_SIZE + BT_TASK_EXTRA_STACK_SIZE) //by menuconfig
+#define BTC_TASK_NAME                   "btcT"
+#define BTC_TASK_PRIO                   (configMAX_PRIORITIES - 5)
+#define BTC_TASK_QUEUE_NUM              20
 
 void btu_task_post(uint32_t sig);
 void hci_host_task_post(void);