fix(ble): fixed wdt issue when print key controller info on ESP32-C6 and ESP32-H2

This commit is contained in:
zwl 2024-07-23 17:29:26 +08:00
parent 29d8e723b8
commit ba97f7d755
2 changed files with 8 additions and 0 deletions

View File

@ -1281,6 +1281,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]);
}
@ -1288,6 +1291,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);
}
}

View File

@ -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);
}
}