ESP32 Interrupts


#1

I am using a a ESP32 DEV Kit and I am qualifying interrupts.

It appears that I need to qualify both falling and rising edge interrupts or my loop hangs.

code looks like:
pinMode(D23,INPUT_PULLUP)
pinMode(D22, OUTPUT_PUSHPULL)

test_pin=D22.PWM
buttonPin = D23

def pressedLow():
print(‘pressed LOW’)
def pressedHi():
pass
try:
onPinFall(buttonPin,pressedLow,debounce=500)
onPinRise(buttonPin,pressedHi,debounce=200)
except Exception as e:
print(e)

while True:
for period in range(20,500, 10):
for i in range(2,98):
duty = int(i*period/100)
pwm.write(test_pin,period, duty, MICROS)
print(i)
sleep(1000, MILLIS)

if I comment out : onPinRise(buttonPin,pressedHi,debounce=200) the loop hangs.

Is this to be expected?


#2

Hello @NBT,

thanks for reporting the issue. Let us run some tests and get back to you asap.