-
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
Uploads and runs ok, but does not run after power cycle #1074
Comments
After reading this post I connected ESP8266 GPIO05 (nodeMCU=D1) to GND. Now I can program the NodeMCU and the program continues to run after a power cycle. But when I open a serial connection via the USB serial interface on the NodeMCU the sketch stops processing and I don't' get any output on the serial interface. I use the serial interface for debugging. |
Also I , my program work with stable , with new staging blocked after 1/4min , serial dead. Waiting reply Sent from my iPhone
|
To add a little more to this case. With ESP8266 GPIO05 (nodeMCU=D1) connected to GND I can program the NodeMCU. After its done uploading but before I restart the NodeMCU I can see the output/debugging info on the USB serial port. If I cycle power but do not connect to the USB serial port. The device operates as expected. If i program without the ESP8266 GPIO05 (nodeMCU=D1) connected to GND. Then when I cycle power, regardless if I connect via USB Serial. the device will lose its sketch and will not operate as expected. I am using the Blink Sketch from the ESP8266 example code folder while doing my tests. |
I Think you board is corrupted. Sent from my iPhone
|
If i program without the ESP8266 GPIO05 (nodeMCU=D1) connected to GND. Then when I cycle power, regardless if I connect via USB Serial. the device will lose its sketch and will not operate as expected. are you sure that you not in bootloader mode? |
I suspect the problem occurs because you have connected an led, short or other component from one of the GPIO pins, that is also connected to the External Flash memory on the ESP12-E module that the NodeMCU uses, to ground. If any of the GPIO pins that are also connected to the flash chip are pulled low then the program will not load from the flash memory when the power cycles. If you want to connect additional components to these pins then add these to the high side. For example to add an LED connect it from Vdd to the GPIO pin (ideally via a current limiting resistor). GPIO0 (nodeMCU=D3) is connected to the external flash. |
I just thought I would add my experience of this problem. I have 2 Geekcreit ESP12E DEVKIT V2s, both bought fro Banggood but at different times so they may be different batches. One would run the downloaded program, without the USB cable being connected, after power cycling the other wouldn't. Both worked perfectly with the USB cable connected. I tried adding a 2200uf electrolytic and 0,1uF disc capacitor to the external 5V to no avail. I could sometimes get the faulty one to run by applying 5V to the device (it would not run) and then quickly disconnecting and re-applying the 5V. Maybe something on the board was charging up, and if power was re-applied while still charged, it ran. Sometimes this worked consistently, sometime not at all ????? |
hi guys. vcc - vcc(3,3v) |
Hi ajinkyaw, Once programmed, you need to connect GPIO0 to 3.3v. Your uploaded code should then run on powerup. As per https://github.com/esp8266/Arduino/blob/master/doc/boards.md#boot-messages-and-modes |
@grissk : Your solution worked. thanks a ton. |
Note GPIO0 should be pulled up to 3.3V via a 10k resistor. As per https://github.com/esp8266/Arduino/blob/master/doc/boards.md#boot-messages-and-modes. It should not be directly connected to 3.3V. If directly connected to 3.3V and the program tries to pull the pin low you will effectively short the power supply. |
@bennthomsen "Note GPIO0 should be pulled up to 3.3V via a 10k resistor." This made my day, ESP kept resetting after I turned of the power or pushed the reset button!! Many thanks |
I also have NodeMCU devkit 0.9 (off of Ebay with the CH340G TTL-USB chip) and I'm still having this problem despite having the correct pull up resistor on GPIO0. Flashing works fine and it runs the sketch after it's programmed but not when power cycled via USB. For some reason, if I power cycle without USB data (by plugging in USB partially in so data lines aren't connected) the board starts up properly and runs the sketch. If I plug in the USB, it doesn't run the sketch. Something to do with the usb data perhaps? I tried another board and it has the same problem. The 26 MHZ oscillation is present on GPIO0 when the sketch isnt running. Really scratching my head on this one. If you plug the USB cable in slowly it seems to work. lol? |
Hi |
Hi there,
|
Hi all, |
Found something that helped me. Ok. I figured out my problem. I was using BUILTIN_LED as a flasher to |
Hi, I am a newbie to ESP8266, and would really appreciate some help here. Problem : Whenever the board is power cycled, it seems to lose the program on its flash. My connections are: (NodeMCU pins) ( Equipment) Procedure I am following and what I observe :
With the pull-up 10K resistor connected, D3 always stays at about 2.7V. I dont disconnect / reconnect this at any time. The Vin pin when connected in step#7 receives about 3.3V also. What could possibly be the problem ? Sketch used:int ledpin = 5; void setup() { } void loop() { digitalWrite(ledpin, HIGH);
|
Hello again, I figured out the way to contain the program on the flash over a restart. The 3.3V to the corresponding pins must be going via a 10K pull-up resistor. Sorry, if I am spamming. |
After uploading the program, Connect GPIO0 to Vcc via 10K resistor |
@JanuaryThomas removing all connection and than connecting GPIO 0 to VCC with 10k Resistor ? |
Closing per #3655 . |
Anybody still having issues with normal boot, please read this first: TLDR: don't use GPIO0 (D3), GPIO2 (D4) and GPIO15 (D8) unless you understand how... |
Also ran into this issue. Found out that in my case, I was writing to an undefined (array out of bound) flash address and therefore corrupting the application program in flash. I think I was overwriting some code in the bootloader which explains why my program would not run after a reboot. |
For anyone looking for the document referenced above, here is the updated link: https://github.com/esp8266/Arduino/blob/master/doc/boards.rst#boot-messages-and-modes Or via read the docs: https://arduino-esp8266.readthedocs.io/en/latest/boards.html#boot-messages-and-modes (The link change seems obvious to me now, but it took me a few tries from my phone. Hopefully this will save others some effort.) |
I have found if you connect a button to the between the reset button and GND and reset the serial will work perfectly. |
@skjolddesign There are two versions of TTGO and many erroneous pinout graphics, surely you have this one: GPIO4 have nothing to do with boot. SUA really is SDA but have a serigraphy error. |
I know this is an older thread.. |
Hello
I have a NodeMCU devkit 0.9 that I am programming with the Arduino IDE using the ESP8266 library.
I can upload the blink sketch to the NodeMCU, and after its done uploading the blink sketch works without an issue. But when I power cycle the board the the NodeMCU doesn't run blink sketch. It looks like it loses its program...
I can reprogram the board over and over again and it works until I power cycle the board.
Any thoughts on what might be causing this ?
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.
The text was updated successfully, but these errors were encountered: