You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Feb 6, 2024. It is now read-only.
I have tried to set up a GPIO interrupt handler the following way:
#[interrupt(gpio)]fngpio_intr(){// do something}#[entry]fnmain() -> ! {enable_interrupt(InterruptType::GPIO);// ...}
Full code here: https://gist.github.com/m1el/41b2c1c210d92b45ff015483c9dd59d8
However, the chip hangs immediately upon receiving an interrupt.
With some help and reading the manuals, it was discovered that the interrupt routine is getting repeatedly called.
This happens because GPIO interrupt status is not getting cleared.
After adding (*target::GPIO::ptr()).gpio_status_w1tc.write(|w| w.bits(0xffff)) to the interrupt handler, the code works as expected.
Since interrupt_trampoline clears interrupt status with xtensa_lx::interrupt::clear(mask), one would expect it to clear GPIO interrupt status as well.