Skip to content

Commit

Permalink
xtensa/esp32: set cpuint to initial value after deallocate
Browse files Browse the repository at this point in the history
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
  • Loading branch information
royfengsss authored and acassis committed Feb 18, 2025
1 parent 05e1cb7 commit c9a8f96
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions arch/xtensa/src/esp32/esp32_wdt.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit c9a8f96

Please sign in to comment.