Cannot program ESP8266

依然范特西╮ 提交于 2019-12-03 15:57:04

The cause can be one of two things:

  1. Insufficient power. Try to power the ESP8266 from an external 3.3V power supply such as a lab supply. Two fully charged AA batteries should do the trick too. Make sure your serial adapter's GND pin is also connected to the ESP's GND pin in order to provide a common ground.

  2. ESP8266 is not in programming mode. Make sure GPIO0 is attached to GND and turn the ESP off and on again. It will then boot into programming mode. Once programmed, you can take it off GND.

EDIT:

Since this post, I've actually encountered a third, more notorious reason. Some ESP8266 modules (especially the ESP-12 packages) actually come with alternative non-core firmware on them. In this case, you have to update the firmware on the ESP. Here is a great tutorial on how to do this. I highly recommend you use the ESP Flash Download tool which is Windows-only unfortunately, but is less error prone than doing it in a serial terminal. But before you embark on this journey, make sure the cause isn't #1 or #2.

When you connect it up to your serial port, set the baud to 74880, and apply power you should see the initial debug info dumped out to the serial.

You should see something like this:

 ets Jan  8 2013,rst cause:2, boot mode:(3,6)

 load 0x40100000, len 29936, room 16 
 tail 0
 chksum 0xee
 load 0x3ffe8000, len 2304, room 8 
 tail 8
 chksum 0x51
 load 0x3ffe8900, len 8, room 0 
 tail 8
 chksum 0x9e
 csum 0x9e

If you are holding GPIO down on boot (to enter flash mode) you should see this

ets Jan  8 2013,rst cause:2, boot mode:(1,6)

Notice the change from (3,6) to (1,6)

If you not see anything displayed then double check your TX <> RX and GND connections.

I had the same problem at first but resolved later.
I have provided link at the end of the answer. Just follow it.

Things to remember when working with ESP8266-01:

  1. You must need a good 3.3VDC power source for ESP8266 to get it work. Do not provide 3.3V from Arduino instead use LM1117-3.3 voltage regulator to provide ESP power. It is also crucial that LM1117-3.3 voltage regulator must have input voltage higher than 7V or 9V. Do not feed Arduino's 5V to this regulator.
  2. R1 should be 1K and R2 should be 2K. For more information, please refer the schematic I have provided in following article for ESP8266-01.
  3. Pin configuration for flashing/programming ESP8266-01, refer following article.

Just follow my article's section "Deploy -> ESP8266-01 Sketch": https://www.hackster.io/AnuragVasanwala/windows-10-iot-core-hydroflyer-f83190

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!