From 79531c86a27fb23cd8cf1134ade46b785d76d965 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20J=C3=A4ger?= Date: Wed, 19 May 2021 22:01:43 +0200 Subject: [PATCH] task_wdt: use correct hardware watchdog channel number MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The hardware watchdog was always fed with channel ID 0. This is correct in most cases, but we should still use the actual ID returned from wdt_install_timeout. Signed-off-by: Martin Jäger --- subsys/task_wdt/task_wdt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/subsys/task_wdt/task_wdt.c b/subsys/task_wdt/task_wdt.c index d21086376a0..e4f6068a267 100644 --- a/subsys/task_wdt/task_wdt.c +++ b/subsys/task_wdt/task_wdt.c @@ -71,7 +71,7 @@ static void task_wdt_trigger(struct k_timer *timer_id) #ifdef CONFIG_TASK_WDT_HW_FALLBACK if (channel_id == TASK_WDT_BACKGROUND_CHANNEL) { if (hw_wdt_dev) { - wdt_feed(hw_wdt_dev, 0); + wdt_feed(hw_wdt_dev, hw_wdt_channel); } return; } @@ -202,7 +202,7 @@ int task_wdt_feed(int channel_id) #ifdef CONFIG_TASK_WDT_HW_FALLBACK if (hw_wdt_dev) { - wdt_feed(hw_wdt_dev, 0); + wdt_feed(hw_wdt_dev, hw_wdt_channel); } #endif