From f2309f1013386e9f9ef08bbcb4ef4a68446654a3 Mon Sep 17 00:00:00 2001 From: baohongde Date: Thu, 1 Nov 2018 17:33:44 +0800 Subject: [PATCH] components/bt: Point ACL RX buffer ptr to ACL RX buffer if ACL RX buffer ptr is null 1. When WIFI task or other high priority task blocks the Bluetooth task, ACL RX buffer will use up, ACL RX buffer ptr will point to null and will never point to a valid adress. Causing errors in Bluetooth. 2. hcimsgs.h used whether flow control is on or off --- components/bt/bluedroid/hci/hci_hal_h4.c | 2 +- components/bt/lib | 2 +- components/esp32/ld/esp32.rom.ld | 5 +++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/components/bt/bluedroid/hci/hci_hal_h4.c b/components/bt/bluedroid/hci/hci_hal_h4.c index 9df65fce6..84aec2e9c 100644 --- a/components/bt/bluedroid/hci/hci_hal_h4.c +++ b/components/bt/bluedroid/hci/hci_hal_h4.c @@ -25,10 +25,10 @@ #include "hci/hci_layer.h" #include "osi/thread.h" #include "esp_bt.h" +#include "stack/hcimsgs.h" #if (C2H_FLOW_CONTROL_INCLUDED == TRUE) #include "l2c_int.h" -#include "stack/hcimsgs.h" #endif ///C2H_FLOW_CONTROL_INCLUDED == TRUE #define HCI_HAL_SERIAL_BUFFER_SIZE 1026 diff --git a/components/bt/lib b/components/bt/lib index 62cabd5b6..16f95952e 160000 --- a/components/bt/lib +++ b/components/bt/lib @@ -1 +1 @@ -Subproject commit 62cabd5b6f55d5a53eb4c13f628f4fd8139f535e +Subproject commit 16f95952efc63017167c863a7eadd2e8dfd27a61 diff --git a/components/esp32/ld/esp32.rom.ld b/components/esp32/ld/esp32.rom.ld index aaf5a4a07..011664758 100644 --- a/components/esp32/ld/esp32.rom.ld +++ b/components/esp32/ld/esp32.rom.ld @@ -670,6 +670,7 @@ PROVIDE ( ld_acl_tx = 0x4002ffdc ); PROVIDE ( ld_acl_rx_sync = 0x4002fbec ); PROVIDE ( ld_acl_rx_sync2 = 0x4002fd8c ); PROVIDE ( ld_acl_rx_no_sync = 0x4002fe78 ); +PROVIDE ( ld_acl_clk_isr = 0x40030cf8 ); PROVIDE ( ld_sco_modify = 0x40031778 ); PROVIDE ( lm_cmd_cmp_send = 0x40051838 ); PROVIDE ( ld_sco_frm_cbk = 0x400349dc ); @@ -1375,8 +1376,8 @@ PROVIDE ( esp_rom_spiflash_attach = 0x40062a6c ); PROVIDE ( esp_rom_spiflash_config_clk = 0x40062bc8 ); PROVIDE ( g_rom_spiflash_chip = 0x3ffae270 ); -/* -These functions are xtos-related (or call xtos-related functions) and do not play well +/* +These functions are xtos-related (or call xtos-related functions) and do not play well with multicore FreeRTOS. Where needed, we provide alternatives that are multicore compatible. These functions also use a chunk of static RAM, by not using them we can allocate that RAM for general use.