mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-03 20:54:32 +02:00
Fixed rare bug in the ble mesh run outof btc queue. Change the task_post abort to abort_with_coredump.
This commit is contained in:
@@ -60,6 +60,8 @@
|
|||||||
static xTaskHandle xBtcTaskHandle = NULL;
|
static xTaskHandle xBtcTaskHandle = NULL;
|
||||||
static xQueueHandle xBtcQueue = 0;
|
static xQueueHandle xBtcQueue = 0;
|
||||||
|
|
||||||
|
void bt_abort_with_coredump_log(void);
|
||||||
|
|
||||||
static btc_func_t profile_tab[BTC_PID_NUM] = {
|
static btc_func_t profile_tab[BTC_PID_NUM] = {
|
||||||
[BTC_PID_MAIN_INIT] = {btc_main_call_handler, NULL },
|
[BTC_PID_MAIN_INIT] = {btc_main_call_handler, NULL },
|
||||||
[BTC_PID_DEV] = {btc_dev_call_handler, NULL },
|
[BTC_PID_DEV] = {btc_dev_call_handler, NULL },
|
||||||
@@ -154,7 +156,7 @@ static bt_status_t btc_task_post(btc_msg_t *msg, task_post_t timeout)
|
|||||||
BTC_TRACE_ERROR("Btc Post failed\n");
|
BTC_TRACE_ERROR("Btc Post failed\n");
|
||||||
#ifdef TASK_MONITOR_MODE
|
#ifdef TASK_MONITOR_MODE
|
||||||
ets_printf("!! Btc Post failed.Timeout Abort !!");
|
ets_printf("!! Btc Post failed.Timeout Abort !!");
|
||||||
abort();
|
bt_abort_with_coredump_log();
|
||||||
#endif
|
#endif
|
||||||
return BT_STATUS_BUSY;
|
return BT_STATUS_BUSY;
|
||||||
}
|
}
|
||||||
|
@@ -33,6 +33,8 @@
|
|||||||
#include "osi/mutex.h"
|
#include "osi/mutex.h"
|
||||||
#include "osi/fixed_queue.h"
|
#include "osi/fixed_queue.h"
|
||||||
|
|
||||||
|
void bt_abort_with_coredump_log(void);
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
uint16_t opcode;
|
uint16_t opcode;
|
||||||
future_t *complete_future;
|
future_t *complete_future;
|
||||||
@@ -143,7 +145,7 @@ task_post_status_t hci_host_task_post(task_post_t timeout)
|
|||||||
if (xQueueSend(xHciHostQueue, &evt, timeout) != pdTRUE) {
|
if (xQueueSend(xHciHostQueue, &evt, timeout) != pdTRUE) {
|
||||||
#ifdef TASK_MONITOR_MODE
|
#ifdef TASK_MONITOR_MODE
|
||||||
ets_printf("!! HCI send fail.Timeout Abort !!");
|
ets_printf("!! HCI send fail.Timeout Abort !!");
|
||||||
abort();
|
bt_abort_with_coredump_log();
|
||||||
#endif
|
#endif
|
||||||
HCI_TRACE_ERROR("xHciHostQueue failed\n");
|
HCI_TRACE_ERROR("xHciHostQueue failed\n");
|
||||||
return TASK_POST_FAIL;
|
return TASK_POST_FAIL;
|
||||||
|
@@ -81,7 +81,7 @@ typedef enum {
|
|||||||
#define BTC_TASK_STACK_SIZE (CONFIG_BTC_TASK_STACK_SIZE + BT_TASK_EXTRA_STACK_SIZE) //by menuconfig
|
#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_NAME "btcT"
|
||||||
#define BTC_TASK_PRIO (configMAX_PRIORITIES - 6)
|
#define BTC_TASK_PRIO (configMAX_PRIORITIES - 6)
|
||||||
#define BTC_TASK_QUEUE_LEN 300//60
|
#define BTC_TASK_QUEUE_LEN 500//60
|
||||||
|
|
||||||
#define BTC_A2DP_SINK_TASK_PINNED_TO_CORE (TASK_PINNED_TO_CORE)
|
#define BTC_A2DP_SINK_TASK_PINNED_TO_CORE (TASK_PINNED_TO_CORE)
|
||||||
#define BTC_A2DP_SINK_TASK_STACK_SIZE (CONFIG_A2DP_SINK_TASK_STACK_SIZE + BT_TASK_EXTRA_STACK_SIZE) // by menuconfig
|
#define BTC_A2DP_SINK_TASK_STACK_SIZE (CONFIG_A2DP_SINK_TASK_STACK_SIZE + BT_TASK_EXTRA_STACK_SIZE) // by menuconfig
|
||||||
|
@@ -81,6 +81,8 @@ extern void avdt_rcv_sync_info (BT_HDR *p_buf);
|
|||||||
#include "btm_ble_int.h"
|
#include "btm_ble_int.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
void bt_abort_with_coredump_log(void);
|
||||||
|
|
||||||
//#if (defined(BT_APP_DEMO) && BT_APP_DEMO == TRUE)
|
//#if (defined(BT_APP_DEMO) && BT_APP_DEMO == TRUE)
|
||||||
//#include "bt_app_common.h"
|
//#include "bt_app_common.h"
|
||||||
//#endif
|
//#endif
|
||||||
@@ -267,7 +269,7 @@ task_post_status_t btu_task_post(uint32_t sig, void *param, task_post_t timeout)
|
|||||||
|
|
||||||
#ifdef TASK_MONITOR_MODE
|
#ifdef TASK_MONITOR_MODE
|
||||||
ets_printf("!! Btu Post failed.Timeout Abort !!");
|
ets_printf("!! Btu Post failed.Timeout Abort !!");
|
||||||
abort();
|
bt_abort_with_coredump_log();
|
||||||
#endif
|
#endif
|
||||||
return TASK_POST_FAIL;
|
return TASK_POST_FAIL;
|
||||||
}
|
}
|
||||||
|
@@ -1438,4 +1438,9 @@ void esp_bt_check_need_restart()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void bt_abort_with_coredump_log(void)
|
||||||
|
{
|
||||||
|
__asm__ __volatile__("ill\n");
|
||||||
|
}
|
||||||
|
|
||||||
#endif /* CONFIG_BT_ENABLED */
|
#endif /* CONFIG_BT_ENABLED */
|
||||||
|
Reference in New Issue
Block a user