From 119dabaf7382ec66f42565d7cb178c8024fca0c0 Mon Sep 17 00:00:00 2001 From: Alan Carvalho de Assis Date: Thu, 23 Feb 2023 12:26:39 -0300 Subject: [PATCH] esp32c3: Fix WDT incorrect interrupt enable/disable --- arch/risc-v/src/esp32c3/esp32c3_wdt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/risc-v/src/esp32c3/esp32c3_wdt.c b/arch/risc-v/src/esp32c3/esp32c3_wdt.c index fe14f4897c..8e55b43d8b 100644 --- a/arch/risc-v/src/esp32c3/esp32c3_wdt.c +++ b/arch/risc-v/src/esp32c3/esp32c3_wdt.c @@ -754,7 +754,7 @@ static int32_t esp32c3_wdt_setisr(struct esp32c3_wdt_dev_s *dev, * then deallocate it. */ - up_disable_irq(wdt->cpuint); + up_disable_irq(wdt->irq); irq_detach(wdt->irq); esp32c3_teardown_irq(wdt->periph, wdt->cpuint); wdt->cpuint = -ENOMEM; @@ -818,7 +818,7 @@ static int32_t esp32c3_wdt_setisr(struct esp32c3_wdt_dev_s *dev, /* Enable the CPU interrupt that is linked to the WDT. */ - up_enable_irq(wdt->cpuint); + up_enable_irq(wdt->irq); } }