[watchdog] Use default CHECK_IDLE_TASK and PANIC when configuring the watchdog (#16142)

This commit is contained in:
Mat931
2026-04-29 18:41:12 +00:00
committed by GitHub
parent c41f38e16d
commit 59b4cfd07c

View File

@@ -39,9 +39,18 @@ void WatchdogManager::set_timeout_(uint32_t timeout_ms) {
#ifdef USE_ESP32
esp_task_wdt_config_t wdt_config = {
.timeout_ms = timeout_ms,
.idle_core_mask = (1U << CONFIG_FREERTOS_NUMBER_OF_CORES) - 1U,
.trigger_panic = true,
.idle_core_mask = 0,
.trigger_panic = false,
};
#if CONFIG_ESP_TASK_WDT_CHECK_IDLE_TASK_CPU0
wdt_config.idle_core_mask |= (1U << 0U);
#endif
#if CONFIG_ESP_TASK_WDT_CHECK_IDLE_TASK_CPU1
wdt_config.idle_core_mask |= (1U << 1U);
#endif
#if CONFIG_ESP_TASK_WDT_PANIC
wdt_config.trigger_panic = true;
#endif
esp_task_wdt_reconfigure(&wdt_config);
#endif // USE_ESP32