Page 1 of 1

gpio_wakeup_disable has no impact, with test case

Posted: Wed Mar 11, 2020 2:56 pm
by kuhatovuk
Hello, any idea why gpio_wakeup_disable has no impact here ? ESP32 (IDF4) keeps on waking up if I put pin 25 to GND.

Code: Select all

void app_main()
{
    gpio_set_pull_mode(GPIO_NUM_25, GPIO_PULLUP_ONLY);
    gpio_set_direction(GPIO_NUM_25, GPIO_MODE_INPUT);
    gpio_wakeup_enable(GPIO_NUM_25, GPIO_INTR_LOW_LEVEL);
    esp_sleep_enable_gpio_wakeup();

    esp_light_sleep_start();

    // Put pin 25 to GND
    ESP_LOGE("Test", "Wakes as expected");

    gpio_wakeup_disable(GPIO_NUM_25); // <---- has no impact

    while(1) {
        esp_light_sleep_start();

        // Put pin 25 to GND
        ESP_LOGE("Test", "Wakes but shouldn't");
    }
}
Thank you!

Re: gpio_wakeup_disable has no impact, with test case

Posted: Wed Mar 11, 2020 3:40 pm
by kuhatovuk
It's a 4.0 bug where gpio enable calls the RTC function but not disable :

https://github.com/espressif/esp-idf/bl ... pio.c#L470

Re: gpio_wakeup_disable has no impact, with test case

Posted: Tue Mar 17, 2020 5:10 am
by ESP_houwenxiang
Hi, kuhatovuk

Thanks for reporting this issue. We will fix it soon.