diff --git a/components/bt/controller/esp32c6/bt.c b/components/bt/controller/esp32c6/bt.c index c29f22bc02..e6168af6c5 100644 --- a/components/bt/controller/esp32c6/bt.c +++ b/components/bt/controller/esp32c6/bt.c @@ -1279,6 +1279,9 @@ static void esp_bt_controller_log_interface(uint32_t len, const uint8_t *addr, b esp_bt_controller_log_storage(len, addr, end); #endif //CONFIG_BT_LE_CONTROLLER_LOG_STORAGE_ENABLE } else { + portMUX_TYPE spinlock = portMUX_INITIALIZER_UNLOCKED; + portENTER_CRITICAL_SAFE(&spinlock); + esp_panic_handler_reconfigure_wdts(1000); for (int i = 0; i < len; i++) { esp_rom_printf("%02x ", addr[i]); } @@ -1286,6 +1289,7 @@ static void esp_bt_controller_log_interface(uint32_t len, const uint8_t *addr, b if (end) { esp_rom_printf("\n"); } + portEXIT_CRITICAL_SAFE(&spinlock); } } diff --git a/components/bt/controller/esp32h2/bt.c b/components/bt/controller/esp32h2/bt.c index 3311b4eb53..f921fa910a 100644 --- a/components/bt/controller/esp32h2/bt.c +++ b/components/bt/controller/esp32h2/bt.c @@ -1247,6 +1247,9 @@ static void esp_bt_controller_log_interface(uint32_t len, const uint8_t *addr, b esp_bt_controller_log_storage(len, addr, end); #endif //CONFIG_BT_LE_CONTROLLER_LOG_STORAGE_ENABLE } else { + portMUX_TYPE spinlock = portMUX_INITIALIZER_UNLOCKED; + portENTER_CRITICAL_SAFE(&spinlock); + esp_panic_handler_reconfigure_wdts(1000); for (int i = 0; i < len; i++) { esp_rom_printf("%02x ", addr[i]); } @@ -1254,6 +1257,7 @@ static void esp_bt_controller_log_interface(uint32_t len, const uint8_t *addr, b if (end) { esp_rom_printf("\n"); } + portEXIT_CRITICAL_SAFE(&spinlock); } }