Wake up from deep sleep by interrupt?

slaff
Posts: 10
Joined: Fri Mar 06, 2015 7:57 pm

Wake up from deep sleep by interrupt?

Postby slaff » Mon Mar 09, 2015 5:49 pm

As far as I understand at the moment with the current SDK it is not possible to wake up from deep sleep using GPIO, or any other interrupts? Is this shortcoming of the current SDK or the hardware, ESP8266, cannot do this? If it is only the SDK are there any plans to add this feature soon?

costaud
Posts: 138
Joined: Fri Oct 24, 2014 7:40 pm

Re: Wake up from deep sleep by interrupt?

Postby costaud » Wed Mar 11, 2015 1:47 am

slaff wrote:As far as I understand at the moment with the current SDK it is not possible to wake up from deep sleep using GPIO, or any other interrupts? Is this shortcoming of the current SDK or the hardware, ESP8266, cannot do this? If it is only the SDK are there any plans to add this feature soon?


Actually, esp8266 can be waked-up by an external GPIO by connecting the reset pin of esp8266 to the external MCU gpio.
In SDK , the deep-sleep API is system_deep_sleep(uint32 time_in_us);
If the parameter time_in_us==0 , esp8266 will never wake up until an external signal trigger the reset pin.
If time_in_us!=0, GPIO16(connect to the reset pin) will generate a pulse to wake up the chip.
You can use a Wired logic to involve both mode.

slaff
Posts: 10
Joined: Fri Mar 06, 2015 7:57 pm

Re: Wake up from deep sleep by interrupt?

Postby slaff » Wed Mar 11, 2015 8:06 pm

Actually, esp8266 can be waked-up by an external GPIO by connecting the reset pin of esp8266 to the external MCU gpio.
In SDK , the deep-sleep API is system_deep_sleep(uint32 time_in_us);
If the parameter time_in_us==0 , esp8266 will never wake up until an external signal trigger the reset pin.
If time_in_us!=0, GPIO16(connect to the reset pin) will generate a pulse to wake up the chip.
You can use a Wired logic to involve both mode.


But won't the reset pin trigger a full reset of the device? I am quite new to electronics. Would it be possible to provide a picture diagram with the connection of the pins so that I can for example wake up the device using a magnetic reed switch?

costaud
Posts: 138
Joined: Fri Oct 24, 2014 7:40 pm

Re: Wake up from deep sleep by interrupt?

Postby costaud » Sat Mar 14, 2015 12:26 am

slaff wrote:
Actually, esp8266 can be waked-up by an external GPIO by connecting the reset pin of esp8266 to the external MCU gpio.
In SDK , the deep-sleep API is system_deep_sleep(uint32 time_in_us);
If the parameter time_in_us==0 , esp8266 will never wake up until an external signal trigger the reset pin.
If time_in_us!=0, GPIO16(connect to the reset pin) will generate a pulse to wake up the chip.
You can use a Wired logic to involve both mode.


But won't the reset pin trigger a full reset of the device? I am quite new to electronics. Would it be possible to provide a picture diagram with the connection of the pins so that I can for example wake up the device using a magnetic reed switch?


Deep sleep close all the modules,so the entire sleep-wake process is almost the same as reset.
If you want to maintain the connection with router, use light-sleep,which can be waken up via GPIO0-15.

Who is online

Users browsing this forum: No registered users and 7 guests