[watchdog] Fix WatchdogManager on single core apps (#16074)

This commit is contained in:
Mat931
2026-04-28 17:32:44 +00:00
committed by GitHub
parent 6b3df66bdc
commit 42ff10afe5
+1 -2
View File
@@ -6,7 +6,6 @@
#include <cinttypes>
#include <cstdint>
#ifdef USE_ESP32
#include <soc/soc_caps.h>
#include "esp_idf_version.h"
#include "esp_task_wdt.h"
#endif
@@ -40,7 +39,7 @@ 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 = (1 << SOC_CPU_CORES_NUM) - 1,
.idle_core_mask = (1U << CONFIG_FREERTOS_NUMBER_OF_CORES) - 1U,
.trigger_panic = true,
};
esp_task_wdt_reconfigure(&wdt_config);