Skip to content

Commit

Permalink
Merge branch 'bugfix/fixed_ble_issues_on_c6_h2_c2_0731' into 'master'
Browse files Browse the repository at this point in the history
Bugfix/fixed ble issues on c6 h2 c2 0731

Closes BLERP-858, BLERP-856, BLERP-772, BLERP-888, BLERP-886, BLERP-884, BLERP-883, BLERP-879, BLERP-877, and BLERP-899

See merge request espressif/esp-idf!32457
  • Loading branch information
Isl2017 committed Aug 6, 2024
2 parents 524d6b1 + ca5cb23 commit ff4f1a2
Show file tree
Hide file tree
Showing 8 changed files with 20 additions and 24 deletions.
4 changes: 2 additions & 2 deletions components/bt/controller/esp32c2/Kconfig.in
Original file line number Diff line number Diff line change
Expand Up @@ -295,12 +295,12 @@ config BT_LE_CONTROLLER_LOG_DUMP_ONLY
Only operate in dump mode

config BT_LE_CONTROLLER_LOG_STORAGE_ENABLE
bool "Storage ble controller log to flash(experimental)"
bool "Store ble controller logs to flash(Experimental)"
depends on !BT_LE_CONTROLLER_LOG_DUMP_ONLY
depends on BT_LE_CONTROLLER_LOG_ENABLED
default n
help
Storage ble controller log to flash.
Store ble controller logs to flash memory.

config BT_LE_CONTROLLER_LOG_PARTITION_SIZE
int "size of ble controller log partition(Multiples of 4K)"
Expand Down
21 changes: 11 additions & 10 deletions components/bt/controller/esp32c2/bt.c
Original file line number Diff line number Diff line change
Expand Up @@ -420,18 +420,19 @@ static void esp_bt_controller_log_interface(uint32_t len, const uint8_t *addr, b

void esp_ble_controller_log_dump_all(bool output)
{
if (log_output_mode == LOG_STORAGE_TO_FLASH) {
#if CONFIG_BT_LE_CONTROLLER_LOG_STORAGE_ENABLE
esp_bt_read_ctrl_log_from_flash(output);
#else
portMUX_TYPE spinlock = portMUX_INITIALIZER_UNLOCKED;

portENTER_CRITICAL_SAFE(&spinlock);
esp_panic_handler_reconfigure_wdts(5000);
BT_ASSERT_PRINT("\r\n[DUMP_START:");
ble_log_async_output_dump_all(output);
BT_ASSERT_PRINT(":DUMP_END]\r\n");
portEXIT_CRITICAL_SAFE(&spinlock);
esp_bt_read_ctrl_log_from_flash(output);
#endif // CONFIG_BT_LE_CONTROLLER_LOG_STORAGE_ENABLE
} else {
portMUX_TYPE spinlock = portMUX_INITIALIZER_UNLOCKED;
portENTER_CRITICAL_SAFE(&spinlock);
esp_panic_handler_reconfigure_wdts(5000);
BT_ASSERT_PRINT("\r\n[DUMP_START:");
ble_log_async_output_dump_all(output);
BT_ASSERT_PRINT(":DUMP_END]\r\n");
portEXIT_CRITICAL_SAFE(&spinlock);
}
}
#endif // CONFIG_BT_LE_CONTROLLER_LOG_ENABLED

Expand Down
4 changes: 2 additions & 2 deletions components/bt/controller/esp32c6/Kconfig.in
Original file line number Diff line number Diff line change
Expand Up @@ -343,12 +343,12 @@ config BT_LE_CONTROLLER_LOG_DUMP_ONLY
Only operate in dump mode

config BT_LE_CONTROLLER_LOG_STORAGE_ENABLE
bool "Storage ble controller log to flash(experimental)"
bool "Store ble controller logs to flash(Experimental)"
depends on !BT_LE_CONTROLLER_LOG_DUMP_ONLY
depends on BT_LE_CONTROLLER_LOG_ENABLED
default n
help
Storage ble controller log to flash.
Store ble controller logs to flash memory.

config BT_LE_CONTROLLER_LOG_PARTITION_SIZE
int "size of ble controller log partition(Multiples of 4K)"
Expand Down
4 changes: 2 additions & 2 deletions components/bt/controller/esp32h2/Kconfig.in
Original file line number Diff line number Diff line change
Expand Up @@ -334,12 +334,12 @@ config BT_LE_CONTROLLER_LOG_DUMP_ONLY
Only operate in dump mode

config BT_LE_CONTROLLER_LOG_STORAGE_ENABLE
bool "Storage ble controller log to flash(experimental)"
bool "Store ble controller logs to flash(Experimental)"
depends on !BT_LE_CONTROLLER_LOG_DUMP_ONLY
depends on BT_LE_CONTROLLER_LOG_ENABLED
default n
help
Storage ble controller log to flash.
Store ble controller logs to flash memory.

config BT_LE_CONTROLLER_LOG_PARTITION_SIZE
int "size of ble controller log partition(Multiples of 4K)"
Expand Down
2 changes: 1 addition & 1 deletion components/bt/controller/lib_esp32c2/esp32c2-bt-lib
2 changes: 1 addition & 1 deletion components/bt/controller/lib_esp32c6/esp32c6-bt-lib
2 changes: 1 addition & 1 deletion components/bt/controller/lib_esp32h2/esp32h2-bt-lib
5 changes: 0 additions & 5 deletions components/esp_rom/esp32c2/ld/esp32c2.rom.ld
Original file line number Diff line number Diff line change
Expand Up @@ -583,8 +583,6 @@ r_ble_ll_adv_scan_req_rxd = 0x40000c98;
r_ble_ll_adv_scan_rsp_legacy_pdu_make = 0x40000c9c;
r_ble_ll_adv_scan_rsp_pdu_make = 0x40000ca0;
r_ble_ll_adv_scheduled = 0x40000ca4;
r_ble_ll_adv_set_adv_params = 0x40000cb0;
r_ble_ll_adv_set_enable = 0x40000cb4;
r_ble_ll_adv_set_random_addr = 0x40000cb8;
r_ble_ll_adv_sm_deinit = 0x40000cc4;
r_ble_ll_adv_sm_event_init = 0x40000cc8;
Expand Down Expand Up @@ -689,8 +687,6 @@ r_ble_ll_ctrl_rej_ext_ind_make = 0x40000ec0;
r_ble_ll_ctrl_reject_ind_send = 0x40000ec4;
r_ble_ll_ctrl_rx_chanmap_req = 0x40000ec8;
r_ble_ll_ctrl_rx_conn_param_req = 0x40000ecc;
r_ble_ll_ctrl_rx_conn_param_rsp = 0x40000ed0;
r_ble_ll_ctrl_rx_conn_update = 0x40000ed4;
r_ble_ll_ctrl_rx_enc_req = 0x40000ed8;
r_ble_ll_ctrl_rx_enc_rsp = 0x40000edc;
r_ble_ll_ctrl_rx_feature_req = 0x40000ee0;
Expand Down Expand Up @@ -780,7 +776,6 @@ r_ble_ll_hci_rd_local_version = 0x4000106c;
r_ble_ll_hci_scan_set_enable = 0x40001070;
r_ble_ll_hci_send_adv_report = 0x40001074;
r_ble_ll_hci_send_dir_adv_report = 0x40001078;
r_ble_ll_hci_send_ext_adv_report = 0x4000107c;
r_ble_ll_hci_send_noop = 0x40001084;
r_ble_ll_hci_set_adv_data = 0x40001088;
r_ble_ll_hci_set_le_event_mask = 0x4000108c;
Expand Down

0 comments on commit ff4f1a2

Please sign in to comment.