Page 1 of 1

read ADC result will trigger other GPIO Pin's interrupt

Posted: Mon Apr 02, 2018 7:08 pm
by adherent
Hi all,

I encountered a very weird issue.

I am using esp wrover as development kit.

I registered ISR for 4 GPIO pins to respond to falling and rising edge, simplified code as following:

Code: Select all

    //install gpio isr service
    gpio_install_isr_service(ESP_INTR_FLAG_DEFAULT);

    //hook isr handler for specific gpio pin
    gpio_isr_handler_add(34, gpio_isr_handler, (void*) 34);
    gpio_isr_handler_add(35, gpio_isr_handler, (void*) 35);
    gpio_isr_handler_add(36, gpio_isr_handler, (void*) 36);
    gpio_isr_handler_add(39, gpio_isr_handler, (void*) 39);
And I observed that as soon as I try to read one ADC channel, ISR gpio_isr_handler is triggered, whatever GPIO pin it is. e.g.:

Code: Select all

    int temp;
    adc2_get_raw( ADC2_CHANNEL_2, ADC_WIDTH_12Bit, &temp);
Here ADC2_CHANNEL_2 is GPIO2, I tried also with other channels, e.g. channel7(GPIO27), channel8(GPIO25), the behavior is the same.

Only GPIO36 and GPIO39 have the weird behavior, 34, 35 seem ok. And the level of GPIO36 and 39 remain high, no level change at all, but still the ISR is triggered.

Any idea or hint will be highly appreciated!

Re: read ADC result will trigger other GPIO Pin's interrupt

Posted: Mon Apr 02, 2018 7:22 pm
by ESP_krzychb
Hi adherent,
adherent wrote:Any idea or hint will be highly appreciated!
Ref: https://github.com/espressif/esp-idf/issues/1096

Re: read ADC result will trigger other GPIO Pin's interrupt

Posted: Mon Apr 02, 2018 8:08 pm
by adherent
krzychb wrote:Hi adherent,
adherent wrote:Any idea or hint will be highly appreciated!
Ref: https://github.com/espressif/esp-idf/issues/1096
Thank a lot for the hint.