task_wdt: start feeding hardware watchdog immediately after init

Without this, the hardware watchdog would expire if no task watchdogs were
registered within one hardware watchdog period after init. Start the
background channel immediately after init to avoid this.

Signed-off-by: Armin Brauns <armin.brauns@embedded-solutions.at>
This commit is contained in:
Armin Brauns 2023-10-24 12:53:02 +00:00 committed by Henrik Brix Andersen
parent 10156f5f1d
commit fdea851878

View file

@ -147,6 +147,7 @@ int task_wdt_init(const struct device *hw_wdt)
}
k_timer_init(&timer, task_wdt_trigger, NULL);
schedule_next_timeout(sys_clock_tick_get());
return 0;
}