read ADC result will trigger other GPIO Pin's interrupt

adherent
Posts: 19
Joined: Mon Jan 15, 2018 9:24 pm

read ADC result will trigger other GPIO Pin's interrupt

Postby adherent » Mon Apr 02, 2018 7:08 pm

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!

User avatar
ESP_krzychb
Posts: 394
Joined: Sat Oct 01, 2016 9:05 am
Contact:

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

Postby ESP_krzychb » Mon Apr 02, 2018 7:22 pm

Hi adherent,
adherent wrote:Any idea or hint will be highly appreciated!
Ref: https://github.com/espressif/esp-idf/issues/1096

adherent
Posts: 19
Joined: Mon Jan 15, 2018 9:24 pm

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

Postby adherent » Mon Apr 02, 2018 8:08 pm

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.

Who is online

Users browsing this forum: No registered users and 113 guests