Commit Graph

102 Commits

Author SHA1 Message Date
gengyuchao
2d85f00244 Add more log for hci issue 2021-01-06 14:29:13 +08:00
liu zhifu
59b1f8bc89 Fix WiFi TX issue during after esp_restart
1. Delay 1us when reset WiFi/BT mac
2. Stop BT first before esp_restart
3. Update libphy.a to 4185
2021-01-06 14:29:12 +08:00
gengyuchao
0def2cfd1b Add diag log for bt need restart 2021-01-06 14:28:53 +08:00
gengyuchao
50abb981d2 1.Change the save location of err bit,in case it can not be saved when assert
2.Add bit to check connect and disconnect state.
2021-01-06 14:28:52 +08:00
gengyuchao
bfa79648cd Fix HCI timeout 0x40F by handling the pairing busy status. 2021-01-06 14:22:49 +08:00
gengyuchao
e148f41d79 Fix close rmt log cause some coredump information optimized issue 2021-01-06 14:22:22 +08:00
baohongde
b20d8cb16c component/hli: Fix hli queue send error 2021-01-06 14:22:08 +08:00
gengyuchao
6903865b9c Fix the int_enable_flag may not compile without bt problem 2021-01-06 14:21:54 +08:00
gengyuchao
1f286c2ba9 Add debug log for int enable 2021-01-06 14:21:40 +08:00
gengyuchao
7f6c5585e2 Fix hci opcode check problem and add ble inten check 2021-01-06 14:21:40 +08:00
gengyuchao
b04afa39fe Add more check for hci timeout 2021-01-06 14:21:25 +08:00
baohongde
f1412a2799 components/bt: add bugfix for some risk item 2021-01-06 14:21:24 +08:00
gengyuchao
b6f67aebb3 Add more debug info for lmp and isr. 2020-07-20 17:10:10 +08:00
gengyuchao
1e25c373c1 Close RMT Debug log temporary 2020-07-20 17:10:09 +08:00
gengyuchao
9b28e15688 Reduce rmt debug log size to 4k 2020-07-20 17:10:08 +08:00
gengyuchao
c534295225 Init log function in esp_bt_controller_init 2020-07-20 17:10:08 +08:00
gengyuchao
f51a055736 Add save log function and API for rmt debug info 2020-07-20 17:10:07 +08:00
baohongde
7552f9cad9 components/bt: Fix crash in ld_acl_tx
add fixed bug record into coredump
2020-07-20 17:10:07 +08:00
baohongde
8a074d7b40 components/bt: Add debug for HCI timeout 2020-07-20 17:10:06 +08:00
baohongde
3b3467b884 components/bt: Make sleep available in hli 2020-07-20 17:10:06 +08:00
gengyuchao
d3c1530745 Fixed rare bug in the ble mesh run outof btc queue. Change the task_post abort to abort_with_coredump. 2020-07-20 17:10:05 +08:00
baohongde
07dbcee626 components/bt: assert in host, to coredump param 2020-07-20 17:10:05 +08:00
baohongde
a3188d7fd9 Fix live lock in bt isr immediately 2020-07-20 17:10:04 +08:00
baohongde
5e6824e3ea Revert "fix live lock in bt isr immediately"
This reverts commit dd086a332315dedf5e326050c6dbed5e6a7eed18.
2020-07-20 17:10:04 +08:00
gengyuchao
2f911d84db Add bt alive Checker. 2020-07-20 17:10:02 +08:00
baohongde
8e15c53631 components/bt: update bt version log 2020-07-20 17:10:01 +08:00
baohongde
a77867d302 fix live lock in bt isr immediately
fix too many live lock
2020-07-20 17:10:01 +08:00
baohongde
d1027a0514 Fix assert 524288 2020-07-20 17:10:01 +08:00
baohongde
79db8df354 components/bt: Fix disconnect due to sniff with error Dsniff 2020-07-20 17:10:00 +08:00
baohongde
176c02a9fe components/bt: optimize code structure
Move some var to DRAM
2020-07-20 17:10:00 +08:00
weitianhua
552524e43a Fix oppo r15 sniff mode issue
change bt version log
2020-07-20 17:09:50 +08:00
baohongde
d5f02c8302 add DRAM_ATTR & add logs 2020-07-20 17:09:49 +08:00
baohongde
a172605af4 components/bt: using high level interrupt in lc 2020-04-17 23:16:59 +08:00
baohongde
7cc89bf83a components/coex: Fix wakeup delay with DFS 2020-04-17 21:40:43 +08:00
Xia Xiaotian
9592346090 Coexist: fix some coexist bugs
1. Fix high beacon and broadcast packets loss ratio of WiFi to make
   MDNS test pass.
2. Improve stability of WiFi performance with a little
   sacrifice of throughput.
3. Improve BLE advertising and connection performance with dynamic
   priority. It sacrifices a little WiFi throughput, but achieves balance
   between WiFi and Bluetooth.
4. fix bug bb reset lock flag to avoid bb reset lock unhandle
5. fix bug wifi reset mac cause task watch dog timeout
6. fix bug wifi reset mac position
2019-10-29 17:18:12 +00:00
Tian Hao
cabe66195c fix bug that semaphore may schedule out in Critical Section
1. Since BLE full-scan feature for BLE mesh change the controller code cause this problem,
it cause coex semaphore take in "interrupt disable", then it may cause task schedule
and cause crash in freertos
2. Fix newlib lock ISR context and critical section check
3. Fix bt controller ISR context and critical section check
2019-10-29 14:43:00 +08:00
Tian Hao
3ca82d5923 bugfix btdm sleep twice after wakeup request
This problem may cause HCI send command timeout.

When host call VHCI api to do btdm_wakeup_request, then controller
wakeup process will be handled in ISR and controller task context.
As host task priority is lower than controller task and ISR,
it will cause an incorrect behavior that before VHCI take the
rx_flow_on_semaphore, controller sleep again, then VHCI cannot take
the semaphore and has to wait the automatic wakeup.
2019-07-27 18:07:20 +08:00
XiaXiaotian
b9b401ee39 Decouple WiFi and BT with coexist to reduce bin size
1. Do not link WiFi code when only BT or BLE is used and WiFi is not
used.

2. Do not link coexist code when CONFIG_SW_COEXIST_ENABLE is disabled.
2019-03-05 10:38:14 +08:00
wangmengyang
74eae4b50e component/bt: add more information and description for bluetooth modem sleep
Add remark that "EVED" mode for bluetooth modem sleep is only used for internal test
2018-12-21 19:30:20 +08:00
wangmengyang
561021e7f7 component/bt: use a pm_lock to prevent light sleep when bluetooth is enabled due to current imcompatibility 2018-12-17 19:54:57 +08:00
wangmengyang
b4299433bd component/bt: add DRAM_ATTR attribute to global variables(bss segment) in bt.c which can be accessed in ISR 2018-12-14 11:29:00 +08:00
wangmengyang
59f34461d7 component/bt: bugfix of bluetooth modem sleep not being able to work with Dynamic Frequency Scaling
1. start an esp_timer on entering sleep to acquire pm_lock before wake up from modem sleep
2. decrease the clock division of XTAL fed to bluetooth low power clock from 32us to 2us period to allow to work under 240MHz Max CPU frequency
3. decrease the minimum sleep duration threshold to allow shorter bluetooth modem sleep period, especially for BLE with short connection interval
4. reconfigure bluetooth baseband(BT-BB) settings after PHY/RF init upon waking up from modem sleep to avoid packet RX/TX performance degradation
2018-12-11 16:49:01 +08:00
yulong
0f3eb977cd component/bt: Added the ble full scan supported feature.
1. Add the full scan swith in the menuconfig;
2. Change the bt lib in order to support ble full scan
2018-11-30 20:48:42 +08:00
baohongde
df5839420d components/bt: Reduce IRAM size
libbtdm: 2608B
idf: 924B
2018-10-29 16:54:32 +08:00
zhiweijian
9103a04793 component/bt: add adv packet duplicate in scan duplicate 2018-09-11 02:31:11 +00:00
Hrishikesh Dhayagude
4abe47437f components/bt: Fix broken API esp_bt_mem_release() for parameter ESP_BT_MODE_BTDM
Problem:
The new API esp_bt_mem_release() that was added freed BTDM data to heap from esp_bt_controller_mem_release().
Now with the BT memory optimization commit ee787085f9,
the BTDM data is optimized and reduced to only 32 bytes which is not sufficient amount to be added to heap.
So, using the API leads to assert saying that the region is too small.

Solution:
Modify heap_caps_add_region_with_caps to return ESP_ERR_INVALID_SIZE in case the range is too small to create a new heap.
Do not assert if return value is ESP_ERR_INVALID_SIZE

This also fixes using API esp_bt_controller_mem_release() with ESP_BT_MODE_BTDM

Signed-off-by: Hrishikesh Dhayagude <hrishi@espressif.com>
2018-08-31 14:28:23 +00:00
me-no-dev
afa091fe79 prevent heap_caps_add_region exception if region is empty
Calling `esp_bt_controller_mem_release` or `esp_bt_mem_release` might result in exception if any of the regions returned to heap are empty. This happens usually if BT/BLE is enabled, but not used/linked in the final firmware.
2018-08-17 08:49:48 +02:00
Tian Hao
ee787085f9 component/bt : decrease memory consumption by conn number
1. BLE only with 9(max) connection will decrease 3K DRAM
2. BR/EDR only with 7(max) connection will decrease 16K DRAM
3. Any of BLE or BR/EDR connection number decrease will also decrease DRAM consumption
4. Decrease one BLE connection will save about 1KB DRAM
5. Decrease one BR/EDR ACL connection will save about 1.2KB DRAM
6. Decrease one BR/EDR SCO/eSCO will save 2KB DRAM.
7. fix some definition and kconfig
8. remove 1.2k of vhci tx cache and make .bss & .data to heap about 1.4K
9. modify BT Reserved Memory size and modify example to support new bt kconfig
2018-08-14 02:29:17 +00:00
Angus Gratton
a5ae5ac4b3 soc: Allow components to reserve fixed memory ranges that they need
No longer necessary to keep all reserved addresses in 'soc'.

Means 'soc' does not need to know about 'bt', for example.

Also means that Bluetooth can be enabled in config without any memory being reserved for BT
controller. Only if code calling the BT controller is linked in, will this memory be reserved...
2018-08-06 01:37:55 +00:00
Jiang Jiang Jian
b3dd6ff9fc Merge branch 'bugfix/btdm_controller_deinit' into 'master'
bt : fix bug that bluetooth controller init/disable/enable/disable may cause exception

See merge request idf/esp-idf!2800
2018-07-25 21:00:35 +08:00