-
-
Notifications
You must be signed in to change notification settings - Fork 348
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
how to hang ESP module #1024
Comments
Hi Are you saying System.restart is not working as expected? |
Exactly. I didn't expect that module hang forever. Try yourself ... below advanced program I used. Basic_blink
|
It works as expected! Check your power supply and connections |
@neut2012 thank you for your help. I have been working with hang up problem for more than week without any result. I have checked several modules, I was able to get, and only by your help I think I found the reason. log for programming mode
and below log with run mode
|
also gpio15 should be pulled to ground with something like 4k7 |
With ESP8266-01 except TX and RX I have only two pins availiable. GPIO0 and GPIO2, and when I would like to program module I have to pull down GPIO0 while reset. GPIO0 which in your circuit is permanently pulled high, so you are not able to go into programming mode, which is source of my problems. I don't know how you are able to program module - botloader ? |
I posted this circuit just for illustration.. I simplified it (and I accidentally removed the connection of GPIO15 to ground, like @ADiea noted) just to try and help you.. I program it using a usb-to-ttl adapter with RX, TX, RTS, DTR connected to TX, RX, GPIO0, RESET respectively.
No. Neither! |
|
Do You use oryginal bootloader or rboot?
Original hangs on rx not pulled to ground with resistor.
13.03.2017 9:53 PM "kwis2" <notifications@github.com> napisał(a):
… boot mode (1,X) mean GPIO0 connected to ground. boot mode (3,X) mean
GPIO0 high state. Question is why modules I checked ESP8266-01, ESP8266-01S
and WeMOS show low state of GPIO0 and I measure 3.28 V on pin while
System.restart()
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#1024 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAHOU89NTRNUdiiERWBKippPiJHySDNwks5rlazPgaJpZM4MaSrR>
.
|
If ESP in flasing mode (GPIO0 low) than module willn't start your code but will wait external flashing instead. This is hardware connection issue. Please try reset module by hardware reset button and compare results. |
As you can see module work without reset after flashing. In fact modules work properly after hardware reset, but I would like not to worry about module, so for now I am looking for way how to efficiently reset module by soft reset. |
If you module stay in programming mode how it can start after reset? Bootloader will go to programming mode after soft reset as expected then. So you should check GPIO0 connection. |
@kwis2 The ESP8266 has 3 boot modes which are selected by the state of three pins. So the first two modes are of interest. To allow the GPIO pins to be used by your program, you don't want to tie any to supply rails. Add a resistor (approx. 10K) between the pin and the supply rail that is required for normal run mode, i.e. connect a 10K resistor between GPIO0 and 3.3V, a 10K resistor between GPIO2 and 3.3V and a 10K resistor between GPIO15 and 0V. To allow flashing a new firmware, connect a push to make, non latching switch between GPIO0 and 0V. This may be pressed at power-up to force GPIO0 low and hence put the device in flash update mode. When released, GPIO0 will return to 3.3V and allow normal boot. Your module may not have all of these pins in which case the missing pins will (should) already have the appropriate resistors connected and you will just need to add the ones for the pins that are exposed on your module. Some modules (e.g. NodeMCU) have all the required resistors already. You need to ensure there is no connected components that will force these GPIOs to different values at start-up. It is essential that hardware connected to GPIO0, 2 & 15 do not force their values at boot (other than the resistors described above) otherwise you will experience issues during startup. |
@anakod after programing by pulled low while reset modules I tested normally start to work and after soft reset it looks like module ignore GPIO0 state. |
@kwis2 are you saying that, with GPIO0 pulled high during run-time, when you perform a software reset, the device does not restart? That is not my experience. With a resistor pulling GPIO0 to 3.3V, calling reboot() will correctly restart the application. |
@riban-bw I have 100k pull up resistor connected to GPIO0 and everytime I have |
100k is probably too high a value which will allow noise or capacitance to affect the pin value. Try with 10k which is the maximum recommend value. Also tell us whether you have anything else connected to GPIO0. |
I soldered 1k pull up resistor to GPIO0. Result exactly the same |
Your report says you get the message: rst cause:2, boot mode:(1,6) which means the device was reset with GPIO2 high, GPIO0 low and GPIO15 low and the module is trying to boot from serial at low speed (or high speed for 1,7) so it does look like the module has GPIO0 low during reboot. |
I have absolutelly nothing connected, except pull up resistor connected to module. Testing circuit this is only ESP8266-01 or ESP8266-01S module connected with the simples circuit possible to USB/RS converter. The whole circuit it is GND, VCC, TX, RX connected by jumper wire to converter, CH_PD solder to VCC, and RST and GPIO0 by jumper wire connected by button to gnd. I have tested different USB/RS converters and programmers. The same resuts I got with simple WeMOS module. |
I will try to dig out my ESP-01 and compile a basic Sming firmware for you. You should have 4 resistors (all about 4k7 but anywhere between 1k & 10k should do). These should all be connected to 3.3V with other ends connected to: GPIO0, GPIO2, RESET & CH_PD. (Can probably get away with tying CH_PD directly to 3.3V.) |
According to #1020 there is very simple way to kill ESP with WDT unable to wake up module. I have tested ESP8266-01 and WeMOS modules. Simple program could kill module forever and only hard reset could it awake. Works with any version of Sming from 2.1.5.
The reason is
System.restart()
command.I have written very advanced software which after 10 seconds run
System.restart()
and:and a few minutes later reset button pressed
The text was updated successfully, but these errors were encountered: