diff --git a/components/bt/controller/esp32c5/Kconfig.in b/components/bt/controller/esp32c5/Kconfig.in index d458140efd..79aecce76c 100644 --- a/components/bt/controller/esp32c5/Kconfig.in +++ b/components/bt/controller/esp32c5/Kconfig.in @@ -392,6 +392,10 @@ menu "Controller debug features" config BT_LE_ERROR_SIM_ENABLED bool "Enable controller features for internal testing" default n + + config BT_LE_ASSERT_WHEN_ABNORMAL_DISCONN_ENABLED + bool "When ACL disconnects abnormally, assertion processing is performed(Experimental)" + default n endmenu config BT_LE_LL_RESOLV_LIST_SIZE @@ -757,14 +761,14 @@ config BT_CTRL_SCAN_BACKOFF_UPPERLIMITMAX The value of upperlimitmax needs to be a power of 2. config BT_LE_CTRL_CHAN_ASS_EN - bool "Enable channel assessment" + bool "Enable channel assessment(Experimental)" default n help If this option is enabled, The Controller will records the communication quality for each channel and then start a timer to check and update the channel map every 4 seconds. config BT_LE_CTRL_ADV_DATA_LENGTH_ZERO_AUX - bool "Enable aux packet when ext adv data length is zero" + bool "Enable aux packet when ext adv data length is zero(Experimental)" default y help When this option is enabled, auxiliary packets will be present in the events of diff --git a/components/bt/controller/esp32c5/bt.c b/components/bt/controller/esp32c5/bt.c index 75ad4fb655..888fbd6ff2 100644 --- a/components/bt/controller/esp32c5/bt.c +++ b/components/bt/controller/esp32c5/bt.c @@ -112,6 +112,7 @@ typedef void (*interface_func_t) (uint32_t len, const uint8_t*addr, bool end); */ extern int ble_osi_coex_funcs_register(struct osi_coex_funcs_t *coex_funcs); extern int r_ble_controller_init(esp_bt_controller_config_t *cfg); +extern void esp_ble_controller_info_capture(uint32_t cycle_times); #if CONFIG_BT_LE_CONTROLLER_LOG_ENABLED extern int r_ble_log_init_async(interface_func_t bt_controller_log_interface, bool task_create, uint8_t buffers, uint32_t *bufs_size); extern int r_ble_log_deinit_async(void); @@ -1638,3 +1639,28 @@ int ble_sm_alg_gen_key_pair(uint8_t *pub, uint8_t *priv) #endif // CONFIG_BT_LE_SM_LEGACY || CONFIG_BT_LE_SM_SC #endif // (!CONFIG_BT_NIMBLE_ENABLED) && (CONFIG_BT_CONTROLLER_ENABLED) + +int IRAM_ATTR +ble_capture_info_user_handler(uint8_t type, uint32_t reason) +{ + int i; + + switch(type) { + case 0: + for (i = 0; i < 2; i++) { + esp_ble_controller_info_capture(0x010101); + } + + break; +#if CONFIG_BT_LE_ASSERT_WHEN_ABNORMAL_DISCONN_ENABLED + case 1: + if ((reason == 0x08) || (reason == 0x3d) || (reason == 0x28)) { + osi_assert_wrapper(__LINE__,__func__, type, reason); + } + break; +#endif // CONFIG_BT_LE_ASSERT_WHEN_ABNORMAL_DISCONN_ENABLED + default: + break; + } + return 0; +}