Page 1 of 1

Wake up device from deep-sleep on interrupt

Posted: Sat Apr 14, 2018 7:00 am
by kishan patel
Hello,
How can i wake-up the module from the deep_sleep mode,if external interrupt occur?.
Thanks in advance,
Regards,
Kishan Patel.

Re: Wake up device from deep-sleep on interrupt

Posted: Sat Apr 14, 2018 7:02 am
by WiFive

Re: Wake up device from deep-sleep on interrupt

Posted: Mon Apr 16, 2018 7:17 am
by kishan patel
Thanks,
Finally,i have used as below,and its working fine.I have doubt about it,can i use number of interrupts on EXT0/EXT1.
I want to say that if i use 2 pins on ext0,only one pin is working.So,i have to use 2 different interrupts(EXT0 & EXT1) as below:

ESP_ERROR_CHECK(rtc_gpio_init(GPIO_NUM_2));
ESP_ERROR_CHECK(gpio_pullup_dis(GPIO_NUM_2));
ESP_ERROR_CHECK(gpio_pulldown_en(GPIO_NUM_2));
ESP_ERROR_CHECK(esp_deep_sleep_enable_ext0_wakeup(GPIO_NUM_2, 1));

ESP_ERROR_CHECK(rtc_gpio_init(GPIO_NUM_15));
ESP_ERROR_CHECK(esp_deep_sleep_enable_ext1_wakeup(BIT(GPIO_NUM_15), ESP_EXT1_WAKEUP_ANY_HIGH));

Regards,
Kishan Patel.