-->
Page 1 of 2

No flash restart after power loss?

PostPosted: Tue Jul 14, 2015 7:57 pm
by Samighi11
I am not exactly a newbie to the esp8266. I have had it for a long time and successfully did things like cloud updates, wifi tie into to spark fun phant,etc.

I recently dusted one off and excited to use arduino die 1.6.5 to natively flash blink to it. I got it to work right off the bat. However, the flash doesn't restart the blink sketch. That is after power loss and repowering.

I can reset and reload the flash and blink works. But never restarts.

Can you help me debug?

Re: No flash restart after power loss?

PostPosted: Tue Jul 14, 2015 8:09 pm
by kolban
You betcha we will try and help. Can you post some pictures of your breadboard setup as well as descriptions of your circuit configurations?

Re: No flash restart after power loss?

PostPosted: Tue Jul 14, 2015 8:25 pm
by Samighi11
Sketch is Standard Blink with Pin 2

Code: Select all#define LED 2
// the setup function runs once when you press reset or power the board
void setup() {
  // initialize digital pin 13 as an output.
  pinMode(LED, OUTPUT);
  Serial.begin(115200);
}

// the loop function runs over and over again forever
void loop() {
  digitalWrite(LED, HIGH);   // turn the LED on (HIGH is the voltage level)
  delay(100);              // wait for a second
  Serial.println("LOOP");
  digitalWrite(LED, LOW);    // turn the LED off by making the voltage LOW
  delay(100);              // wait for a second
}


I am using Arduino 1.6.5

using Manager URL = http://arduino.esp8266.com/package_esp8 ... index.json

Install Board Manager ESP6288

----

Sketch uses 203,120 bytes (38%) of program storage space. Maximum is 524,288 bytes.
Uploading 31760 bytes from /var/folders/ng/mxyvxczs5t96qsp0wy47m8l80000gn/T/build6647629209626918089.tmp/sketch_jul14b.cpp_00000.bin to flash at 0x00000000
................................
Uploading 171400 bytes from /var/folders/ng/mxyvxczs5t96qsp0wy47m8l80000gn/T/build6647629209626918089.tmp/sketch_jul14b.cpp_10000.bin to flash at 0x00010000
........................................................................................................................................................................

Flash completes and Blink on GPIO2 is running.

VCC, GND connected
RX,TX connected (obvious)
GPIO2 (LED pin 2) to LED
VCC -> CP_PD (I undo this each time I flash, otherwise receive error)
GND -> GPIO_0 (I assume this again is required for Flashing if i remember correctly.
No connection -> RST

I would sent a picture, but i use similar colors on the pins.

Should I remove or take GPIO_0 to High and RST -> GND to restart it?

Re: No flash restart after power loss?

PostPosted: Tue Jul 14, 2015 8:29 pm
by Samighi11
Ok, well after I wrote it, I guessed the answer.

I need to take GPIO0 to HIGH to avoid re-flash after power loss.



Blink works now after power loss, if I disconnect GPIO0 or take it high Which is something I recalled from before.

Can you confirm?

(can this be marked answered?)