Hi,
I’m trying to configure 6 external interrupts using the following code:
from machine import ExtInt
def fun(args):
print("Hello")
extint1 = ExtInt(ExtInt.GPIO2, ExtInt.IRQ_FALLING, ExtInt.PULL_PU, fun)
extint2 = ExtInt(ExtInt.GPIO3, ExtInt.IRQ_FALLING, ExtInt.PULL_PU, fun)
extint3 = ExtInt(ExtInt.GPIO6, ExtInt.IRQ_FALLING, ExtInt.PULL_PU, fun)
extint4 = ExtInt(ExtInt.GPIO9, ExtInt.IRQ_FALLING, ExtInt.PULL_PU, fun)
extint5 = ExtInt(ExtInt.GPIO11, ExtInt.IRQ_FALLING, ExtInt.PULL_PU, fun)
extint6 = ExtInt(ExtInt.GPIO12, ExtInt.IRQ_FALLING, ExtInt.PULL_PU, fun)
However, when executing the line of extint6, I get the following error:
Traceback (most recent call last):
File “”, line 15, in
ValueError: Interrupt initialization failed
Is there a limit to the number of external interrupts that can be initialized?
Thanks in advance!
BR,
Víctor