-
Notifications
You must be signed in to change notification settings - Fork 13.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ESP.deepSleep hangs after wakeup - ESP12F (Working on older chips) #6007
Comments
Hi, |
Hi @fsommer1968. Thanks for the suggestion. |
In addition check the correct SPI flash mode for the flash rom! |
Hi @fsommer1968, we already try QIO and DIO, and check with esptool. |
@petrilloa the fact that the same pcb and code work ok with one batch and not with another is a strong hint that the second batch is likely bad somehow. Some hints for you:
Consider this: void deepSleep(uint64_t time_us, RFMode mode = RF_DEFAULT);
void deepSleepInstant(uint64_t time_us, RFMode mode = RF_DEFAULT);
Also: Closing as not a core issue. |
@devyte, I understand that you close it for apparently not being a specific problem of CORE, however I will continue to add information, since in different posts, on different platforms (not only GITHUB) I have seen this error, and never with a specific resolution ( taking out cases where there was a clear problem in the hardware connection)
void deepSleep(uint64_t time_us, RFMode mode = RF_DEFAULT);
Also: -I suggest looking at the pulse coming out of gpio16 (connected to RST) with an osc, and compare the signal from the good batch vs. the new bad batch. -I seem to remember reading somewhere that the pulse coming out of gpio16 on sleep expiration sometimes required some delay or some timing or something. I don't remember the details, and I didn't find the reference after a quick search. I mention this because you said you are resetting by RST, which is the same thing the gpio16 pulse is supposed to be doing, which would make me suspect either timing or signal strength. I read the same https://www.esp8266.com/viewtopic.php?f=6&t=17975 But, i it seems to be a different board ESP12S... maybe the same problem? |
That sounds like the same problem i remember, but I'm pretty sure it's not the post i saw, and it wasn't a 12s but rather a clone board of a 12F. |
I'm having the same issue with my newly arrived ESP12-F (ESP12MOD, containing ESP8266EX) boards. The chip does not wake up from deepsleep properly. Also, even when resetting by shorting rst to gnd there is no proper reset. Reset consistently works when "pressing the rst button" twice. Therefore I'd assume this is not a problem of the signal given by GPIO16 but something else? |
Hi @WillowBeard, i think so. I also noticed that some times the bad chips needs pressing the reset button twice. I'm waiting for the factory for a replacement (we bought 150 pcs of them... So we are very worry about this). We are thinking that maybe are a cheaper clone of the original ones. I will have news soon. |
Hi @petrilloa, thanks for the quick reply. I also bought 15 of these. Really hoping to find a solution to this since the deep sleep functionality is crucial to most of my projects. Would you care to compare the exact labelling of the chips? Mine says "ESP8266EX, 492018, UB00PK7F11. The chip is marked with the espressif logo. |
Hi @WillowBeard, |
Yes, I removed the shielding. I see, if you need to send them back you obviously can't do that... Do you think they will notice if one is missing? (Just kidding...) |
@WillowBeard, can you check the ESP12 circuit (not the ESP8266) for this:
Image from this post: Also, do you have an osciloscope? According to the same post, there is a difference on the RESET pulse. I can´t check that in my batch. |
Hi @petrilloa, I am definitely going to do this. I have access to a scope, but it's a pretty old model. I will attempt to measure it and let you know when I got the result (likely on Wednesday). I will also try and short the series resistor (if present) to check if this is the reason for the trouble. |
Short update: I didn't manage to look at the signal on the rst pin yet. However I measured there is a 470 kΩ resistor between the rst pad and the rast pin. I tried putting a 470 Ω in parallel, which had no effect. There is also a 12 kΩ pull-up resistor on the rst pin and some capacitor. So the circuit looks ver much like in the post linked above. Since the capacitor should be responsible for slowing the voltage change down, I tried to remove the capacitor. This didn't lead to any change. I contacted the seller (on aliexpress) and was granted a refund without further ado. This looks to me like they know about this problem... |
I've used a bunch of ESP-12S's with deep sleep and they've worked ok, though they were all bought at least a year ago so its possible something has been changed. Would you try adding WAKE_NO_RFCAL to the deepSleep call - |
hi @torntrousers, |
Hi @WillowBeard, I also detect the voltage oscillation on GPIO0 when is in "zombie mode". Somewhere i read about the internal clock signal from the ESP. https://www.esp8266.com/viewtopic.php?f=160&t=16248 The older ones, don't have this issue neithe Our supplier is sending a new batch of ESP12F (from AI as the said). I´m going to post news when them arrive. My biggest concern is how to identify devices with this behavior in advance. If it is a problem of the different factories that produce the ESP8266, and save money on a couple of simple components, it is an unreliable chip to make products using deepSleep (and not because of Espressif directly, but by those who end up making the ESPXX using his chip). |
Has anyone measured that the capacitor is good? Has anyone tried increasing the 470R a bit or increasing the capacitor to have a bigger delay time to RST? Decreasing to have a shorter delay time? I would use a pot to play with the values. |
hi everyone,
I didn't measure the capacitor directly, however I think the waveform indicates, that it is ok (please correct me if I'm wrong). Another observation I made: The gibberish in the serial monitor, that appears when waking up appears even when GPIO16 is not connected to RST and the board goes into the zombie-like state as well. Might this indicate that the actuall error happens before the reset pulse is performed by GPIO16? |
Hi @WillowBeard . First of all, to get ride of the gibberish in the serial monitor, you can set the serial monitor speed on 74880 bauds. In that way, yo can get the messages that the ESP is sending
The time of the pulse, seems WRONG, according to this https://bbs.espressif.com/viewtopic.php?p=5027#p5027
Also, the level of LOGICAL LOW must be between like this So, i think the issue is with the DURATION of the pulse. Can you check the pulse, with one of the GOOD chips? |
I will check this, however I excluded this explanation (that the pulse is too short) since grounding RST even for seconds also leads to a false start into "zombi mode". |
I have ESP-01 which works perfectly with deep sleep. Recently I got Lolin V0.1(ESP-12E) and it did not wake up. I removed metalic shield from Lolin and found that it has 460ohm in series of rst before filter. This is how the reset pulse looks on oscillator on EXT_RSTB pin(RESET). Yellow shorter one is on ESP-01. White on Lolin. |
Hi @girtskagis can you tell us what picture/logo has the esp12E shield? (Espressif, AI). Thanks! |
This is what I get on first, normally working boot:
Then, when the deepsleep timer expires, I only get this:
If i remove the connections from GPIO16 to RST, I get this instead:
I am wondering, if this could have something to do with faulty flash memory or something like that? |
FWIW Here is a schematic for the ESP-12S that shows no 470 Ohm resistor in series with JP1 to EXT_RSTB. I also noticed that CHIP_EN now has a 12K Ohm pull-up. |
The new ESP12F from AI arrived... and they WORK! The only thing I have left to think is that the other chips were clones and they did not have the internal components necessary to handle wakeup pulse correctly. However, in the post of @girtskagis, we see that he could reproduce the problem with a LOLIN board (within a recognized manufacturer). It is strange that LOLIN uses ESP12 generics or clones. Hopefully you answer to identify if it is ESP of AI or ESPRESSIF. Can you get in touch with LOLIN to talk about the issue? |
@gagabla you say you're connecting with MISO... Which GPIO pin exactly are you referring to? Make sure you're connecting GPIO7, not GPIO12. |
@n89thanh thanks for jumping in, i connected the resistor to the pin labeled with MISO, so i hope this is the correct one since i cannot find the mapping to GPIO7 in the available material for esp12f / esp12e. There were a few images above here in the thread, eg from manj9501 and from sendcard which seem to connect to the same pin on a similar board (and for them it seemed to work!). Any other idea? Do you have an explanation why this resistor is helping for everybody else so i could check what is different for me? |
@gagabla. Here is a plugable solution I designed that allowed me to insert different radios in to a PCB. It is kind of a bed of nails using segmented guitar strings. It is quite effective. This wasn't for a ESP 12, but the idea could be adapted. There were many other plugable solutions discussed in the rest of the [post]. Hope it helps. (https://forum.mysensors.org/topic/11954/most-reliable-best-radio/218?_=1655321080395) |
Without seeing everything you are doing it's impossible to know but here is my fix which has worked for all 8 faulty ones I had. |
@Craig1516 thanks for the tipp, i am quite happy with the pogo pins/clamps though. Not so cheap (20€ on aliexpress ) but very nice to handle for prototyping. Here is how it looks in my setup: @Colkerr yes, i am aware of all the happy users of the MISO workaround above ... just .... for me it is not working consistently :-( (only for one board out of 7)
Thats it! I can reproduce the issue on most of my modules, i need two resets via push-button for EPS8266 to actually start once it is in deepSleep. When resetting while it is running normally, reset works every time. Code is also minimal:
So if only i could understand what motivates the MISO workaround , then i might also be able to find out why it does not work for me ... like i wrote above, i could already observe that when ESP8266 does not wake up properly and goes to zombie mode, MISO pin is permanently going crazy with a square pattern with 300k Hz => seems that communication with flash memory not working normally. |
@ gagabla. These clamps look like what I've wanted for a long time. Just bought several. Thanks for the idea. |
@gagabla. Forgot to mention, Andreas Spiess has a great video on the zombie zone. I've found my projects have drifted there occasionally. Not only does it render your project dysfunctional, it is also a high current event and will kill your battery... if you are using one. |
@Craig1516 just pay attention that you fetch one with the right pin spacing of 2 mm for esp11, for other spacings there are much cheaper offers, but for 2 mm had to by the expensive stuff. Thanks for the hint to the videos from Andreas, I was not aware of those. I checked few which are related to deep sleep but couldn't find any mention of zombie Mode so far, do you remember which video it was? As written in previous comment I can observe two flavors of zombie Mode, first one consumes about 15 mA (although esp is not running) and second flavor of zombie mode ( the one typically observed here in the thread) draws 36 mA. |
I spent some time this evening looking. Never found it. But the basic takeaway I remember is that if the MCU falls in to a lower voltage as indicated by the datasheet the MCU will not recover and sit there churning, as you have found. How to avoid: I remember having a power supply with adequate capacitance and filtering was key. If I come across it I will certainly send your way!
Craig
From: gagabla ***@***.***>
Sent: Friday, June 7, 2024 11:30 PM
To: esp8266/Arduino ***@***.***>
Cc: Craig1516 ***@***.***>; Mention ***@***.***>
Subject: Re: [esp8266/Arduino] ESP.deepSleep hangs after wakeup - ESP12F (Working on older chips) (#6007)
@Craig1516 <https://github.com/Craig1516> just pay attention that you fetch one with the right pin spacing of 2 mm for esp11, for other spacings there are much cheaper offers, but for 2 mm had to by the expensive stuff.
Thanks for the hint to the videos from Andreas, I was not aware of those. I checked few which are related to deep sleep but couldn't find any mention of zombie Mode so far, do you remember which video it was?
As written in previous comment I can observe two flavors of zombie Mode, first one consumes about 15 mA (although esp is not running) and second flavor of zombie mode ( the one typically observed here in the thread) draws 36 mA.
—
Reply to this email directly, view it on GitHub <#6007 (comment)> , or unsubscribe <https://github.com/notifications/unsubscribe-auth/AFHYUHCG2OOMIIJUAK6OZZDZGKQHBAVCNFSM4HHT54AKU5DIOJSWCZC7NNSXTN2JONZXKZKDN5WW2ZLOOQ5TEMJVGU4DGNJWG42Q> .
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
Hello |
Have you had wake up working on another esp8266, to eliminate something you are doing ? |
I had my code working an ESP32 DEv Module. This is my first ESP8266 module, but for the 5 I have it's the same behavior. |
I only know that with GPI016->RST , the resistor connected as shown in my photo above on Jun 5, and the code I posted above on Apr 2nd (which is longer than you need just to prove wakeup), then all my faulty ESP8266's work. |
Ok thankyou for your answer. I will test this again and see. How did you set up the rest of the connections for EN, GPIO15, GPIO0, GPIO2. Do you have pull up resitors ? |
Hello
I also tried to use alternative nk_deep_sleep function from this thread : the boards keep constantly rebooting without staying the deep sleep time (3s in my case) in deep sleep mode. I'm using PlatformIO code from : [esp8266-alternative-deep-sleep](https://github.com/nokxs/esp8266-alternative-deep-sleep.git ) I don't know what to do next... |
I am exactly in the same situation like you , The resistor on the MISO pin helped for one module. which looked like this : Anyone tried on this ESP-12F Module? |
Today I tried to use D1 mini v4.0, I have add 510ohm % D16 and RST, it can’t wake up. I used to do that. May be you can use another d1 miniOn Nov 19, 2024, at 05:28, marcosjl31 ***@***.***> wrote:
Hello
I'm trying to get deep sleep working on two d1 mini pro boards (purchased from 2 different sellers).
I've tried cable/resistor/diode between D0(GPIO16) and RST pins : the board does not wake up stuck at
rst cause:2, boot mode:(3,6)
I also tried to use alternative nk_deep_sleep function from this thread : the boards keep constantly rebooting without staying the deep sleep time (3s in my case) in deep sleep mode.
I'm using PlatformIO code from : [esp8266-alternative-deep-sleep](https://github.com/nokxs/esp8266-alternative-deep-sleep.git )
I don't know what to do next...
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: ***@***.***>
|
Hi, I'm using the D1 mini V4 and all boards with LOLIN in print in white on the backside works, all other won't work. |
same problem no solution |
Hello ! Have (or maybe had) the same issue ( ets Jan 8 2013,rst cause:2, boot mode:(3,6)) with this chip. I was really happy when i came across this solution - but it doesn't work for me :( I used a 10k from GPIO 7 to 3V3 and tried several Resistor values from D0 to RST. My code is super simple also... void setup() { void loop() { delay(100); ESP.deepSleep(5e6); EDIT: i also tried the custom deepsleep function above, but it just resets instantly with some sort of exception. Also i don't think it is a proper reset even. Just feels like it encounters an error and restarts. If there is any solution for that, it would also solve my problem :) |
This issue is related to the Flash memory inside the module. I have several modules, including the ESP-12E and ESP8266MOD; some exhibit this problem while others do not. I've confirmed that modules with the Flash chip model "562A" have this issue. Simply swapping this Flash with the "SY25Q32" Flash from a module that doesn't have the problem causes the previously good module to exhibit the same issue. It appears the problem follows the "562A" Flash chip. Adding pull-up resistors might only resolve the issue for certain Flash chips; adding a pull-up resistor to MISO has no effect on the "562A". |
I tried your solution, and for me it does not work. |
This is my code: https://github.com/jaisor/wifi-climate-sensor/blob/main/src/main.cpp
|
Thank you Jaisor, shame on me, i forgot to do this, and now it's OK !!! |
Basic Infos
Platform
Settings in IDE
Problem Description
A few months ago, we start developing a custom PCB using ESP8266, ESP12F from AI.
esptool.py --port COM14 flash_id
esptool.py v2.6
Serial port COM14
Connecting...
Detecting chip type... ESP8266
Chip is ESP8266EX
Features: WiFi
MAC: cc:50:e3:04:37:7e
Uploading stub...
Running stub...
Stub running...
Manufacturer: 20
Device: 4016
Detected flash size: 4MB
Hard resetting via RTS pin...
After successfully deploy 100 boards, we receive a new batch from a distributor on China. The new chip, looks the same as the old one, except it has an Expressif logo instead of AI logo.
Then, using esptool, we check that was manufactured by other factory
esptool.py --port COM14 flash_id
esptool.py v2.6
Serial port COM14
Connecting...
Detecting chip type... ESP8266
Chip is ESP8266EX
Features: WiFi
MAC: dc:4f:22:5e:93:23
Uploading stub...
Running stub...
Stub running...
Manufacturer: 0e
Device: 4016
Detected flash size: 4MB
Hard resetting via RTS pin...
The PCB was build using all the following design rules and experiences from Espressif, blogs, etc.
Example:
https://www.instructables.com/id/ESP-12F-ESP8266-Module-Minimal-Breadboard-for-Flas/
Also, we using several recomendations from videos of Andreas Spiess. @SensorsIot and read post by @igrr.
Power: 3 x AA Batteries (4,5v)
MCP1700 LDO for 3,3v
Capacitor filters: 1000uF and .1uf - VCC to GND
GPIO0 - pull up 10k resistor - VCC
GPIO2 - pull up 10k resistor - VCC
GPIO15 - pull down 10k resistor - GND
EN - pull up 10k resistor - VCC
RESET - pull up 10k resistor - VCC
HARD WIRED GPIO16 to RESET pin.
The sensor, reads a value, then enter a deepSleep cycle until wakeups.
All was working fine in more than 100 pcb!!!
After receiving the new batch, with the same PCB and CODE, the ESP hangs after wake up.
We already try 10 chips off the new bach, all have the same issue.
Trying this simple sketch:
MCVE Sketch
Debug Messages ON WORKING CHIP
Debug Messages ON NOT WORKING CHIP
Hangs/Freeze until power down, or hard reset (button from RESET to GND).
Things we already try
-Hardwire
-RESISTOR 470, 1k, 10
-Using a diode, schottky
-Adding aditional 10pF capacitor from RESET to GND
Similar ISSUES
#5892
#2768
universam1/iSpindel#59
Please HELP US!!! Can be a faulty batch?
The text was updated successfully, but these errors were encountered: