Commit Graph
100 Commits
Author SHA1 Message Date
Bao Hong De 7fc071e133 Merge branch 'feature/high_level_interrupt_in_bluetooth' into 'master'
Bluetooth: High level interrupt in bluetooth

See merge request espressif/esp-idf!11156
2021-09-10 09:50:39 +00:00
baohongde 006a10b050 components/doc: Update doc about high-level interrupt
some bugfix.
2021-09-09 20:40:09 +08:00
baohongde 57eeb4d953 components/driver: support static allocation of FreeRTOS queues used by ISR routine 2021-09-09 11:29:19 +08:00
baohongde e2fb413329 components/bt: add config option to choose Bluetooth intterupt level. 2021-09-09 11:29:17 +08:00
baohongde 6d63fe06fa components/os: add config option to choose system check intterupt level. 2021-09-09 11:29:12 +08:00
baohongde 8a4696d25a components/os: Fix live lock int bt isr using ocd multicore debug
components/os: Fix live lock in bt isr immediately
2021-09-09 11:29:08 +08:00
baohongde d1db2df316 components/bt: High level interrupt in bluetooth
components/os: Move ETS_T1_WDT_INUM, ETS_CACHEERR_INUM and ETS_DPORT_INUM to l5 interrupt

components/os: high level interrupt(5)

components/os: hli_api: meta queue: fix out of bounds access, check for overflow

components/os: hli: don't spill registers, instead save them to a separate region

Level 4 interrupt has a chance of preempting a window overflow or underflow exception.
Therefore it is not possible to use standard context save functions,
as the SP on entry to Level 4 interrupt may be invalid (e.g. in WindowUnderflow4).

Instead, mask window overflows and save the entire general purpose register file,
plus some of the special registers.
Then clear WindowStart, allowing the C handler to execute without spilling the old windows.
On exit from the interrupt handler, do everything in reverse.

components/bt: using high level interrupt in lc

components/os: Add DRAM_ATTR to avoid feature `Allow .bss segment placed in external memory`

components/bt: optimize code structure

components/os: Modify the BT assert process to adapt to coredump and HLI

components/os: Disable exception mode after saving special registers

To store some registers first, avoid stuck due to live lock after disabling exception mode

components/os: using dport instead of AHB in BT to fix live lock

components/bt: Fix hli queue send error

components/bt: Fix CI fail

# Conflicts:
#	components/bt/CMakeLists.txt
#	components/bt/component.mk
#	components/bt/controller/bt.c
#	components/bt/controller/lib
#	components/esp_common/src/int_wdt.c
#	components/esp_system/port/soc/esp32/dport_panic_highint_hdl.S
#	components/soc/esp32/include/soc/soc.h
2021-09-09 11:29:06 +08:00
Bao Hong De 315e3b55de Merge branch 'bugfix/fix_esp32s3_ble_init_failed' into 'master'
Fixed ESP32S3 BLE controller init failed

See merge request espressif/esp-idf!14283
2021-07-06 13:00:24 +00:00
baohongde 721a0c3415 components/bt: Delete BLE ADV priority high 2021-05-17 17:07:14 +08:00
baohongde 5ebbc17b9a components/bt: Set discoverable after create server 2021-03-25 17:28:35 +08:00
baohongde 77fc60ede1 components/bt: Synchronize multiple branch of bt lib 2021-03-25 14:39:28 +08:00
baohongde 36b89a9f0b components/bt: Fix assert without sw coexist enabled 2021-03-25 14:39:07 +08:00
baohongde 7c2ff2ad3f component/coex: Decouple Wi-Fi and bluetooth with coexist to reduce binary file size 2021-03-25 14:39:07 +08:00
baohongde 33df1358ef Fix issues during light sleep and DFS 2021-03-09 13:49:59 +08:00
baohongde df146f5cd9 Fix controller task watchdog in Wi-Fi test 2021-03-05 11:25:03 +08:00
baohongde 2e7405e8aa components/bt: Fix crash in Bluetooth when esp_restart 2021-03-01 14:39:35 +08:00
baohongde f8d85768b0 components/coex: Fix bcn timeout with MAC BB power down 2021-02-05 14:30:04 +08:00
baohongde eef66789d4 Mac BB power down in light sleep
components/bt: Do not use feature: timer support isr dispatch method

disable controller after wake up finished.

protect critical section of power down

choose clk in sleep

components/coex: mac bb power down in light sleep

components/coex: Macro changed

components/os: protect reserved interrupt number

update phy to phy_version 300,6e46ba7,Jan 25 2021

some bugfix
2021-01-28 22:28:04 +08:00
Bao Hong De 64d30fa6c4 Add API to config QoS 2021-01-05 10:32:47 +08:00
baohongde 3b0fc48ab4 components/bt: Shutdown Bluetooth before esp_restart. 2020-12-21 20:08:10 +08:00
baohongde 3b82670a50 components/bt: Fix waking up fail while sleeping 2020-10-14 20:20:57 +08:00
baohongde 3f97f1d67a components/bt: Make sleep avaliable in hli(for future use) 2020-10-13 19:45:03 +08:00
baohongde 628655b6be components/coex: Some bugfix about ble dynamic prio
Rewrite ble dynamic prio to fix ble disconn in conn_param_update/channel_map_update
Rewrite ble dynamic prio in connection establishment
Fix ble dynamic prio with latency
Fix status bit set error when conn fail
2020-09-29 21:08:13 +08:00
baohongde acce9e5fea components/bt: Replace task post with btc_inter_profile_call, when post message from btc_dm to btc_gap 2020-09-27 19:55:12 +08:00
baohongde dac798afbb components/bt: Fix crash in BTM_SetPowerMode after disconnect
Introduced by commit 0583a049
2020-09-27 19:55:12 +08:00
baohongde ecd75ec652 components/bt: Fix clear bond fail when connected without ble included 2020-09-27 19:55:12 +08:00
baohongde 898baf20f8 components/bt: Fix SPP using NULL point with dynamic memory 2020-09-07 15:41:30 +08:00
baohongde 060a36352c components/bt: Add mode change event 2020-08-12 09:20:04 +00:00
baohongde acb835d86f components/sys: Fix build error about livelock when intwdt is disable 2020-07-23 02:21:32 +00:00
baohongde 140b696009 components/bt: Fix ble disconnect due to instant of channel map update is too small 2020-06-17 03:52:32 +00:00
baohongde 75ca740d04 Set AFH in time(075dd35)
Send LMP_channelClassification immediately
Fix first LMP_set_AFH not using host value
2020-06-17 03:52:32 +00:00
baohongde fd8f2c1a32 components/coex: Fix ble connecting fail in coexist 2020-06-17 03:52:32 +00:00
baohongde 95f47a2d4d Coexistence: Add coexist API to enable BLE connection dynamic priority 2020-04-28 16:16:27 +08:00
baohongde 1bcce4e7db components/coex: Fix wakeup delay with DFS 2020-03-20 17:58:05 +08:00
baohongde d2aa4a1e50 components/bt: Fix assert when create conntion cancel 2020-02-28 20:13:41 +08:00
baohongde d11a86076f Fix bugs about role switch
Jitter in FHS
Jitter in first PULL
Receive EDR packet fail after role switch
2020-02-19 20:14:47 +08:00
baohongde 6ca361fd2b components/coex: Fix a2dp stuck after creating anther connection 2020-02-19 07:14:26 +00:00
baohongde 364a9dece0 components/coex: Fix misspell in Kconfig 2020-02-19 11:41:03 +08:00
baohongde 66a01ef490 components/coex: Fix watchdog timeout when sleep enabled
Fix crash without enabling sw coex
2020-02-18 03:35:24 +00:00
baohongde 097777ed66 components/bt: Fix error EIR type in config eir event 2020-01-20 20:46:05 +08:00
baohongde 5ca4c85497 components/bt: Fix connection fail and crash when receive unknown AT cmd 2020-01-20 11:32:26 +08:00
baohongde a2398f0dcc components/esp_wifi: improve coexistence performance according to specific WiFi/BT/BLE scienario
1. Improve WiFi throughput in some Classic BT scienarios(idle, inquire scan,
       connected, sniff, a2dp pause, etc).

    2. Support WiFi + Classic BT + BLE mesh coexistence scienario.

    3. Improve WiFi scan and connect succeed ratio in coexistence scienario.

    4. Do not support to choose software coexistence preference anymore for it is
       determined according to coexistence scienario automatically.

components/lwip: increase TCP send buffer and receive window limitation when TCP window scale is enabled

components/ble_mesh: Fix some bugs about ble mesh

    1. fix send acl pkt after ble have sent terminate ind modify min adv interval to 10ms.
2020-01-10 16:00:12 +08:00
baohongde f9802da461 components/bt: Fix A2DP stuck when BLE's interval is too small
1. Fix the cumulative time switch from BLE to classic BT
2. Enhance classic BT performance while enable calssic BT and BLE at the same time
2020-01-06 20:22:04 +08:00
baohongde 3977ba7bc6 components/bt: Revert changes of security mask 2019-12-25 20:03:16 +08:00
baohongde e94c2a04c1 components/bt: Fix AVRC metadata length error 2019-12-03 02:44:49 +00:00
baohongde 2e570e78c6 components/bt: Disable some unsupported security mask 2019-11-17 13:42:09 +08:00
baohongde e248a4fe6e components/bt: Fix assert due to no free element from 2019-11-14 06:59:23 +00:00
baohongde 90b18dd4f6 components/bt: Not post message to a2dp ctrl queue from btc queue, just call it. 2019-11-01 14:12:25 +08:00
baohongde a099b6f7e4 components/bt: Fix assert when deinit A2DP while playing music 2019-10-29 19:47:50 +08:00
baohongde ed984cc9b5 components/bt: Add API and EVT for BLE set channels(BLE) 2019-10-25 11:39:35 +08:00
baohongde eaf5f6a319 components/bt: Add API and EVT for set AFH channels(BR/EDR) 2019-10-25 11:39:22 +08:00
baohongde d6201066a3 components/bt: Fix error in checking AVRC connected 2019-10-25 02:50:31 +00:00
baohongde 93f86b8a6d components/bt: Disable BR/EDR GATT 2019-10-25 02:49:51 +00:00
baohongde e1d61d03de components/bt: Fix LMP sniff req timeout 2019-10-14 14:56:07 +08:00
baohongde cb2e1f93d1 components/bt: Fix sending LMP_features_req_ext in a loop
Remove xtensa/xtruntime.h at the same time
2019-09-06 12:00:54 +08:00
baohongde 019067b6ac components/bt: Rename some macros 2019-09-03 10:23:05 +08:00
baohongde 185f47ab7e components/bt: Disable Wide Bond Speech when SCO data path is PCM 2019-09-02 20:50:09 +08:00
baohongde d12503eb55 components/bt: Remove unused macro in menuconfig 2019-08-29 19:58:05 +08:00
baohongde b6fe44b520 Fix 2 bugs in r_ld_fm_sket_isr
1. When remove two elt in the 1st isr, then assert in then 2nd one.
2. When timestamp of first elt is equal to sket_clkn, then crash.
2019-08-29 11:27:57 +08:00
baohongde 38ae31ebc4 components/bt: Fix linking fail with toolchain 8.2.0 2019-08-16 09:54:18 +00:00
baohongde f77a5851bb component/bt: Fix BLE SMP free without init 2019-07-26 14:40:03 +08:00
baohongde 2d1d747cbb component/bt: Avoid A2DP demo to use unallocated memory 2019-07-26 14:40:02 +08:00
baohongde d1f774bc0a component/bt: Avoid PLC to use unallocated memory
Closes https://github.com/espressif/esp-idf/pull/3799
2019-07-26 14:39:50 +08:00
baohongde f048be924c components/bt: Fix AVRCP command will not be executed while playing music 2019-07-16 08:50:36 +00:00
baohongde f8c107fbe3 components/bt: Fix compile error with new toolchain
Closes https://github.com/espressif/esp-idf/issues/3331
Closes https://github.com/espressif/esp-idf/issues/3734
2019-07-09 17:50:43 +08:00
baohongde 60a3f3e09d components/bt: Fix Wrong bt lib from commit "Bluetooth component refactoring" 2019-07-03 04:44:04 +00:00
baohongde 30d7002731 components/bt: Add AVRCP feature about volume 2019-06-30 03:46:15 +00:00
baohongde 84e9e243d0 components/bt: Fix connect fail with some speakers 2019-06-26 14:50:13 +08:00
baohongde 79ba509384 components/bt: Fix fail to config URL in EIR 2019-06-26 11:58:41 +08:00
baohongde 149e07911d components/bt: Optimization and bugfix of previous commits 2019-06-21 11:55:45 +08:00
baohongde 8024fcb296 components/bt: Add more functions for memory debug. 2019-06-20 17:12:04 +08:00
baohongde 9863565a6f components/bt: Optimization and bugfix of previous commit 2019-06-20 17:06:23 +08:00
baohongde 07fef85a23 components/bt: Separation of BT and BLE 2019-06-20 17:06:23 +08:00
baohongde 485c896740 components/bt: Combine A2DP sink task and A2DP source task into btc task 2019-06-20 16:00:55 +08:00
baohongde 930c304a57 components/bt: Combine two hci task into one 2019-06-20 16:00:55 +08:00
baohongde 5fd4cbb9d2 component/bt: Add functions for heap memory debug 2019-06-20 16:00:55 +08:00
baohongde bd9fed4400 component/bt: reduce the size of DRAM
DRAM.data:   506B -->  196B
DRAM.bss : 26857B --> 2170B
2019-06-20 16:00:55 +08:00
baohongde 21cce564ba component/bt: Macor from sdkconfig.h is used only in bt_user_config.h 2019-06-20 11:41:17 +08:00
baohongde faf23df19a component/bt : modify OSI thread of bluedroid
abstract of OSI thread to make bluedroid more compatible with different OS.
2019-06-19 21:20:04 +08:00
baohongde f3aab7d536 components/bt: Fix assert due to alloc LMP TX buffer failed 2019-06-10 15:14:23 +08:00
baohongde 48e32113de component/bt: Allow configuration of default SCO_DATA_PATH in bluetooth controller 2019-06-04 16:31:21 +08:00
baohongde 89e2b48a18 components/bt: Add API to config EIR data 2019-06-03 19:29:54 +08:00
baohongde 13908160fb components/bt: Fix make errors due to macro usage error 2019-05-30 20:19:43 +08:00
baohongde fcf4886172 components/bt: Support EV3 packet type 2019-05-24 17:36:10 +08:00
baohongde dd906a91a5 components/bt: Enable mSBC and add decoder and encoder 2019-05-24 17:36:10 +08:00
baohongde 20758443df components/bt: Add packet loss concealment (PLC) for HFP 2019-05-24 17:33:52 +08:00
baohongde e10d5aaddc component/bt: modify the SBC decoder to support mSBC mode 2019-05-24 17:33:52 +08:00
baohongde f15323b453 component/bt: remove SBC frame scramling 2019-05-24 17:33:52 +08:00
baohongde db6b210a5f components/bt: Fix abort if call esp_spp_deinit without calling esp_spp_init 2019-04-24 11:17:54 +08:00
baohongde 72eb170c4f components/bt: Fix errors caused by rebase 2019-04-10 17:59:23 +08:00
baohongde 88efcdbe35 components/coex: Fix BT disconnecting due to too many reset BB
Update coex version to 1.1.6
2019-04-03 20:42:03 +08:00
baohongde a332bca0c7 components/bt: Fix disconnect with apple device
1. Fix disconnect with apple device
    2. Fix hci_refresh_enc_key_cmd will be ignored
    3. Fix hci_refresh_enc_key_cmd will crash

    Closes https://github.com/espressif/esp-idf/issues/3140
2019-04-03 17:22:01 +08:00
baohongde 59d77660ef components/bt: Fix warning when disable debug logs or in release mode and improve the code structure 2019-03-26 14:37:37 +08:00
baohongde e87d05d81f components/bt: Add precautions for esp_vhci_host_send_packet 2019-01-31 11:47:58 +08:00
baohongde 27235e023f components/bt: Fix crash when inquiry stop 2019-01-31 11:47:41 +08:00
baohongde d601ed8023 components/bt: Fix two bugs about pairing
1. Fix Legacy Pairing failed without remote device name
2. Fix discovery no device after disabling SSP
2018-12-20 11:10:52 +08:00
baohongde 9c48528fcc components/bt: Configure SSP in menuconfig 2018-12-20 11:10:27 +08:00
baohongde 7e142f9d22 components/bt: Move function in interrupt into IRAM
1. Move function in interrupt into IRAM
2. Delete unused code, saving 240B DRAM and some code size
2018-11-22 15:59:53 +08:00
baohongde ac5a3443a4 components/bt: Some errors in comment 2018-11-16 11:27:22 +08:00
baohongde b33cdfc1f5 components/bt: Put function in isr into iram 2018-11-02 16:37:52 +08:00