Discuss here different C compiler set ups, and compiling executables for the ESP8266

User avatar
By kolban
#23537 I seem to be finding that immediately after flashing an application into the ESP8266 it starts running. I would have expected that after flashing the device would be in some kind of halted state waiting for a restart. Here is my loose thinking ... in order to flash the device, we need to pull GPIO 0 low. Now imagine I actually wired it to ground and flashed my application into the ESP8266 and is starts running. Now let us further assume that my logic made GPIO 0 an output pin and set its logic level to high. Would this not create a short or otherwise damage the device?
User avatar
By lethe
#23538 Yes, that's why you should never connect GPIOs directly to VCC or GND. Always use pull-up/down resistors.
When the pin is connected to GND, there might be an internal current limiting resistor, but you really should not rely on that. The datasheet does not mention anything like that and also does not provide an equivalent circuit schematic.
User avatar
By kenn
#23594
kolban wrote:I seem to be finding that immediately after flashing an application into the ESP8266 it starts running. I would have expected that after flashing the device would be in some kind of halted state waiting for a restart. Here is my loose thinking ... in order to flash the device, we need to pull GPIO 0 low. Now imagine I actually wired it to ground and flashed my application into the ESP8266 and is starts running. Now let us further assume that my logic made GPIO 0 an output pin and set its logic level to high. Would this not create a short or otherwise damage the device?


Well, your application could test GPIO0 before using it as an output.

Initially I was using a jumper to pull GPIO0 low to flash, but then I simply added a second pushbutton besides the reset button on my dev board. To flash, I hit both buttons and release the reset first. So I won't have an issue with that.

Given that you have several in/out pins to use, it's usually possible to assign GPOI0 to a use that's compatible with it's second role as the flash signal. And the resistor is a good idea in any event.