Tell me what you want, What you really, really want.

Moderator: Mmiscool

User avatar
By loeten
#35130 Hello Mmiscool & others,

First: This "online basic" idea is so phantastic! I love it so much! Go on with it. I will do some tests soon (just preparing my setup).

About the sleep mode: I would like to be able to wake up the device by a change of an an input pin. Now you can say "use the reset" but - if teh reset works like usually, you must release the reset line first before the device starts.

But instead, is it possible to detect a falling or rising edge of an input pin to awake from sleep? i mean the deepest sleep mode, where is consumes almost no power?

Someting like "deepsleep(inputpin[,rising or falling edge])" ?
User avatar
By lethe
#35150 The ESP does not support interrupts in deep sleep. The only way to wake it is by issuing a hardware reset.
If you need the ESP to wake only on an external, I recommend using hardware to control the CH_PD pin or to cut the power entirely.
User avatar
By loeten
#35292 Maybe i misunderstood. I read in Kolbans book:

"To enter deep sleep mode, we can call system_deep_sleep() . This can be supplied with a
suspension time. The device will go to sleep and after the interval has elapsed, the device will
wake up again. In addition to having a timer, we can also awake from a deep sleep by toggling
the value of a signal on a pin.
We can control which mode the device is in by calling wifi_set_sleep_type() ."

Does it mean, the device will wake up from deep sleep, either when CH_PD goes from low to high OR from high to low? Is that true for any gpio pin? Or where does the chip know which pin - can i set it somewhere?

I want to wake it by an external pin change, but only change in one direction - so to prevent the need of a monoflop or something like it..