GPIO ISR triggers continuously after changing to esp-idf V4 from V3.1

CharlesSeartech
Posts: 19
Joined: Fri Oct 06, 2017 10:27 am

GPIO ISR triggers continuously after changing to esp-idf V4 from V3.1

Postby CharlesSeartech » Fri Nov 06, 2020 7:55 am

Hello,

We are using a WROVER module, silicon revision 1.
I have changed from esp-idf V3.1 to V4.0 and have an issue I can't understand.
I'm using GPIO pins 35, 36, 39 and others, not used now, as digital interrupt inputs. Pins 36 and 39 are not setup for ADC use.
My problem is that the gpio_isr_handler keeps getting triggered by IO 36 and 39.
Hardware wise they both have pullup resistors and are negative edge, GPIO_INTR_NEGEDGE, triggered.
When I run the V3.1 code on the same HW it works correctly.
I tried the peripherals gpio_example_main.c example, changed the IO's to 36 and 39 and it works correctly.
I'm using many of the peripherals, I2C, I2S, SDMMC, WiFi and UART.
What I have seen is that once I start the I2S the gpio interrupts stop and restart when the I2S is disabled again, controlled via the WiFi interface.
I added the tick time to a struct that saves the IO and pin state and I see that the ISR triggers +- every 102ms on both IO 36 and 39.
gpio_isr_handler 36, 1, 2, 20004
gpio_isr_handler 39, 1, 3, 20004
gpio_isr_handler 36, 1, 4, 20106
gpio_isr_handler 39, 1, 5, 20106
gpio_isr_handler 36, 1, 6, 20209
gpio_isr_handler 39, 1, 7, 20209
gpio_isr_handler 36, 1, 0, 20311
gpio_isr_handler 39, 1, 1, 20311
gpio_isr_handler 36, 1, 2, 20414
gpio_isr_handler 39, 1, 3, 20414
gpio_isr_handler 36, 1, 4, 20516
gpio_isr_handler 39, 1, 5, 20516
gpio_isr_handler 36, 1, 6, 20618
gpio_isr_handler 39, 1, 7, 20618
gpio_isr_handler 36, 1, 0, 20721
gpio_isr_handler 39, 1, 1, 20721
gpio_isr_handler 36, 1, 2, 20823
gpio_isr_handler 39, 1, 3, 20823
gpio_isr_handler 36, 1, 4, 20926
gpio_isr_handler 39, 1, 5, 20926
gpio_isr_handler 36, 1, 6, 21028
gpio_isr_handler 39, 1, 7, 21028
gpio_isr_handler 36, 1, 0, 21130
gpio_isr_handler 39, 1, 1, 21130
gpio_isr_handler 36, 1, 2, 21233
gpio_isr_handler 39, 1, 3, 21233
gpio_isr_handler 36, 1, 4, 21335
gpio_isr_handler 39, 1, 5, 21335

I have seen that the delay between triggers can be 30ms to 60ms as well, so it's not consistent.

Any help will be greatly appreciated.

Regards,
Charles

Who is online

Users browsing this forum: Bing [Bot], VinayDand and 142 guests