esp32c3: Fix WDT incorrect interrupt enable/disable

This commit is contained in:
Alan Carvalho de Assis 2023-02-23 12:26:39 -03:00 committed by Petro Karashchenko
parent 9340d6e0d7
commit 119dabaf73

View File

@ -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);
}
}