Wake-up from light sleep mode
Wake-up from light sleep mode
Postby tve » Tue Jul 07, 2015 5:54 am
Do I understand correctly that the esp8266 can only wake up from light-sleep using the timer or a gpio input change? Does this mean, for example, that it cannot wake up from an incoming character on the UART? Is the UART powered-down during light sleep?
Re: Wake-up from light sleep mode
Postby costaud » Tue Jul 07, 2015 5:07 pm
tve wrote:Do I understand correctly that the esp8266 can only wake up from light-sleep using the timer or a gpio input change? Does this mean, for example, that it cannot wake up from an incoming character on the UART? Is the UART powered-down during light sleep?
It is auto determined whether the chip is able to get into light-sleep.The API just pushes the "enable button"
For now, we can only receive ext-wake-up from GPIO. So the UART data might be lost if the chip is in light-sleep, during which the CPU clock pauses.
You can holde the GPIO before sending UART data.
Re: Wake-up from light sleep mode
Postby tve » Wed Jul 08, 2015 1:08 pm
Is the UART powered down during light sleep? (I don't know whether "CPU clock pauses" means that the UART is also paused.)
If the UART was running then the esp8266 program could find received characters when waking up. Otherwise, besides just triggering wake-up through some other GPIO one also has to synchronize to make sure the esp8266 has had time to wake-up...
If the UART was running then the esp8266 program could find received characters when waking up. Otherwise, besides just triggering wake-up through some other GPIO one also has to synchronize to make sure the esp8266 has had time to wake-up...
Re: Wake-up from light sleep mode
Postby kolban » Thu Jul 09, 2015 8:01 am
Reading here:
https://en.wikipedia.org/wiki/Universal_asynchronous_receiver/transmitter
I get the impression that UART basically is a convention that says the send and receiver agree on a clock rate and the sender is always listening for data. Before a byte of data arrives, a start bit is sent, followed by 8 data bits, followed by a stop bit. The key phrase here is that the sender assumes that the receive is ready. This is where higher level protocols such as RS232 come into the play. With RS232, the serial data transmitter would signal Data Carrier Detect which would wake up the ESP8266 which would signal Data Terminal Ready when it wakes up from a sleep and only then can we start using UART for transmission (I'm being very, very loose in my words here).
So UART is responsible for turning parallel data into serial data and back again, but it is not responsible for the initial hand-shaking of when this should start or happen. That's where the other pins of communication:
o DTR
o RTS
o CTS
o DCD
o ... others
come into play.
So ... when you say "... an incoming character on the UART" ... is there a bigger story here? Do you have an RS232 or other higher level protocol? What is the source of your UART data?
https://en.wikipedia.org/wiki/Universal_asynchronous_receiver/transmitter
I get the impression that UART basically is a convention that says the send and receiver agree on a clock rate and the sender is always listening for data. Before a byte of data arrives, a start bit is sent, followed by 8 data bits, followed by a stop bit. The key phrase here is that the sender assumes that the receive is ready. This is where higher level protocols such as RS232 come into the play. With RS232, the serial data transmitter would signal Data Carrier Detect which would wake up the ESP8266 which would signal Data Terminal Ready when it wakes up from a sleep and only then can we start using UART for transmission (I'm being very, very loose in my words here).
So UART is responsible for turning parallel data into serial data and back again, but it is not responsible for the initial hand-shaking of when this should start or happen. That's where the other pins of communication:
o DTR
o RTS
o CTS
o DCD
o ... others
come into play.
So ... when you say "... an incoming character on the UART" ... is there a bigger story here? Do you have an RS232 or other higher level protocol? What is the source of your UART data?
Re: Wake-up from light sleep mode
Postby tve » Thu Jul 09, 2015 12:30 pm
Thanks for the UART education
, but I can't use DTR/CSR or RTS/CTS because the esp8266 won't wake up from light sleep to those. I could use such signals on the far end and a GPIO pin to wake up. But now I'm using 4 pins for serial comm instead of 2. It's not like the esp8266 has an over-abundance of pins... See, if it could wake up from sleep when the UART receives a character and the UART stayed powered then I'd need only two pins and would have a 128 character buffer for waking up, that would be just so awesome, but sadly that's not the way it works
.


Who is online
Users browsing this forum: No registered users and 31 guests
Login
Newbies Start Here
Are you new to ESP8266?
Unsure what to do?
Dunno where to start?
Start right here!
Latest SDK
Documentation
Complete listing of the official ESP8266 related documentation release by ESPRESSIF!
Must read here!
- All times are UTC+08:00
- Top
- Delete all board cookies
About Us
Espressif Systems is a fabless semiconductor company providing cutting-edge low power WiFi SoCs and wireless solutions for wireless communications and Internet of Things applications. We are the manufacturer of ESP8266EX.