Wake up device from deep-sleep on interrupt

kishan patel
Posts: 43
Joined: Wed Aug 30, 2017 4:56 am

Wake up device from deep-sleep on interrupt

Postby kishan patel » Sat Apr 14, 2018 7:00 am

Hello,
How can i wake-up the module from the deep_sleep mode,if external interrupt occur?.
Thanks in advance,
Regards,
Kishan Patel.


kishan patel
Posts: 43
Joined: Wed Aug 30, 2017 4:56 am

Re: Wake up device from deep-sleep on interrupt

Postby kishan patel » Mon Apr 16, 2018 7:17 am

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.

Who is online

Users browsing this forum: No registered users and 14 guests