This is an automated email from the ASF dual-hosted git repository.
acassis pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git
The following commit(s) were added to refs/heads/master by this push:
new c9a8f96aac xtensa/esp32: set cpuint to initial value after deallocate
c9a8f96aac is described below
commit c9a8f96aace9f63e21e7883c8774330adc4d99ff
Author: Roy Feng <[email protected]>
AuthorDate: Thu Feb 13 13:18:38 2025 +0800
xtensa/esp32: set cpuint to initial value after deallocate
on ESP32, cpuint was allocated when register wdt handler, but not
deallocated when unregister, which cause debug assert when checking
`DEBUGASSERT((*freeints & bitmask) == 0)`, so set cpuint to initial value
after deallocate.
The same issue on ESP32s3 has been fixed by PR#15433
---
arch/xtensa/src/esp32/esp32_wdt.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/xtensa/src/esp32/esp32_wdt.c
b/arch/xtensa/src/esp32/esp32_wdt.c
index cb05892ea2..d29ae20306 100644
--- a/arch/xtensa/src/esp32/esp32_wdt.c
+++ b/arch/xtensa/src/esp32/esp32_wdt.c
@@ -733,6 +733,7 @@ static int esp32_wdt_setisr(struct esp32_wdt_dev_s *dev,
xcpt_t handler,
up_disable_irq(wdt->irq);
esp32_teardown_irq(wdt->cpu, wdt->periph, wdt->cpuint);
irq_detach(wdt->irq);
+ wdt->cpuint = -ENOMEM;
}
goto errout;