You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: doc/faq/a01-espcomm_sync-failed.md
+29-25
Original file line number
Diff line number
Diff line change
@@ -28,7 +28,7 @@ Example boards with USB to serial converter build in, that will make your initia
28
28
29
29

30
30
31
-
If you are using a Generic ESP8266 module, separate USB to serial converter and connect them by yourself, please make sure you have the following tree things right:
31
+
If you are using a Generic ESP8266 module, separate USB to serial converter and connect them by yourself, please make sure you have the following three things right:
32
32
1. Module is provided with enough power,
33
33
2. GPIO0, GPIO15 and CH_PD are connected using pull up / pull down resistors,
34
34
3. Module is put into boot loader mode.
@@ -58,9 +58,9 @@ In order to troubleshoot "espcomm_sync failed" error, please proceed step by ste
Basing on selected board type Arduino IDE will apply specific "reset method" to enter the board into boot-loading mode. Reset methods are board specific. Some boards do not have the h/w in place to support reset by Arduino IDE. If this is the case, you need to enter such board into boot loading mode manually.
61
+
Basing on selected board type, Arduino IDE will apply specific "reset method" to enter the board into bootloading mode. Reset methods are board specific. Some boards do not have the h/w in place to support reset by Arduino IDE. If this is the case, you need to enter such board into boot loading mode manually.
62
62
63
-
4. Upload may be also failing due to too high speed. If you have long or poor quality USB cable, try reducing selection under Upload Speed.
63
+
4. Upload may be also failing due to too high speed. If you have long or poor quality USB cable, try reducing selection under *Upload Speed*.
@@ -77,19 +77,19 @@ In order to troubleshoot "espcomm_sync failed" error, please proceed step by ste
77
77
ets Jan 8 2013,rst cause:2, boot mode:(1,7)
78
78
```
79
79
80
-
If you see similar message but different values then decode them using [Boot Messages and Modes](../boards.md#boot-messages-and-modes). The key information is contained in first digit of the boot mode message as shown below.
80
+
If you see similar message but different values then decode them using [Boot Messages and Modes](../boards.md#boot-messages-and-modes). The key information is contained in first digit / three right-most bits of the boot mode message as shown below.
81
81
82
82

83
83
84
84
For instance message ``` boot mode (3,3) ``` indicates that pins GPIO2 and GPIO0 are set HIGH and GPIO15 is set LOW. This is configuration for [normal operation](../boards.md#minimal-hardware-setup-for-running-only) of module (to execute application from flash), not for [boot loading](../boards.md#minimal-hardware-setup-for-bootloading-only) (flash programming).
85
85
86
86
> Note: Without having this step right you will not be able to upload your module over a serial port.
87
87
88
-
2. You have confirmed that module is in boot loading mode but upload still fails. If you are using external USB to serial converter then check of operates correctly by looping it back. This is quite simple check. Just connect TX and RX of your converter together like on picture below. Then open Serial Monitor and type some characters. If everything is fine, then you should see what you type immediately printed back on the monitor. For ESP integrated with USB to serial converter this check may involve breaking some PCB traces. I would not do it unless being desperate. Instead try step below.
88
+
2. You have confirmed that module is in boot loading mode but upload still fails. If you are using external USB to serial converter, then check if it operates correctly by looping it back. This is quite simple check. Just connect TX and RX of your converter together like on picture below. Then open Serial Monitor and type some characters. If everything is fine, then you should see what you type immediately printed back on the monitor. For an ESP with USB to serial converter on board, this check may involve breaking some PCB traces. I would not do it unless being desperate. Instead try steps below.
89
89
90
90

91
91
92
-
3. Next step to try, if not done already, is checking detailed debug messages. Go to File > Preferences, enable *Show verbose output during: upload* and try uploading again. For successful upload this log should look similar to example shown below:
92
+
3. Next step to try, if not done already, is checking detailed debug messages. Go to *File > Preferences*, enable *Show verbose output during: upload* and try uploading again. For successful upload this log should look similar to example shown below:
@@ -152,7 +152,7 @@ In order to troubleshoot "espcomm_sync failed" error, please proceed step by ste
152
152
flush complete
153
153
```
154
154
155
-
This log may be longer depending on number of connection attempts made by esptool. Analyze it for any anomalies to configuration you have selected in Arduino IDE, like different serial port, reset method, baud rate, etc. Resolve all noted differences.
155
+
Upload log may be longer depending on number of connection attempts made by esptool. Analyze it for any anomalies to configuration you have selected in Arduino IDE, like different serial port, reset method, baud rate, etc. Resolve all noted differences.
156
156
157
157
158
158
### Reset Methods
@@ -161,24 +161,26 @@ If you got to this point and still see ``` espcomm_sync failed ```, then now you
161
161
162
162
Connect scope or logic analyzer to GPIO0, RST and RXD pins of the ESP to check what's happening.
163
163
164
-
Then compare your measurements with what is shown on wave-forms collected for circuits below. They document two standard methods of resetting ESP8266 for upload, that you can select in Arduino IDE - [ck](#ck) and [nodemcu](#nodemcu).
164
+
Then compare your measurements with wave-forms collected for circuits below. They document two standard methods of resetting ESP8266 for upload, that you can select in Arduino IDE - [ck](#ck) and [nodemcu](#nodemcu).
165
165
166
166
167
167
#### Ck
168
168
169
-
Circuit below has been prepared to collect wave-forms for ck reset method ([get fzz source](pictures/a01-circuit-ck-reset.fzz)). It is simpler than for [nodemcu](#nodemcu) reset and therefore often used to wire up generic ESP modules on a breadboard. Check it against your wiring when comparing your measurements against wave-forms below.
169
+
Circuit below has been prepared to collect wave-forms for ck reset method ([get fzz source](pictures/a01-circuit-ck-reset.fzz)). It is simpler than for [nodemcu](#nodemcu) reset and therefore often used to wire up generic ESP modules on a breadboard. Check it against your wiring when comparing your measurements against wave-forms below.
170
170
171
171

172
172
173
-
Wave-forms below show voltage signals on GPIO0 and RST pins of the ESP board when uploading the firmware. Close up of ck reset method signal sequence at the beginning of upload is shown below.
173
+
The following wave-forms below show voltage signals on GPIO0 and RST pins of the ESP board when uploading the firmware.
174
+
175
+
Close up of ck reset method signal sequence at the beginning of upload is shown below.
174
176
175
177

176
178
177
-
Next picture shows complete upload of blink.ino example at 921600 baud. This is quite high speed so the upload takes only about 8s.
179
+
Next picture shows complete upload of [Blink.ino](https://github.com/esp8266/Arduino/blob/master/libraries/esp8266/examples/Blink/Blink.ino) example at 921600 baud. This is quite high speed, so the upload takes only about 8s.
Please note that when esptool is not able to initialize upload at the first time, then it retries reset procedure. Case of one such retry is shown on waveform below.
183
+
Please note that when esptool is not able to initialize upload at the first time, then it retries reset procedure. Case of one such retry is shown on wave-form below.
Presented circuit has one important limitation when it comes to work with Arduino IDE. After opening Serial Monitor (Ctrl-Shift-M), both RTS and DTR lines are permanently pulled down. As RTS line is connected to REST input of ESP, the module is hold in reset state / not able to run. Therefore after uploading module, you need to disconnect both lines or use different serial terminal program that is not pulling down RTS and DTR lines. Otherwise the module will get stuck waiting for releasing the REST signal.
201
+
Presented circuit has one important limitation when it comes to work with Arduino IDE. After opening Serial Monitor (Ctrl-Shift-M), both RTS and DTR lines are permanently pulled down. As RTS line is connected to REST input of ESP, the module is hold in reset state / not able to run. Therefore after uploading module, you need to disconnect both lines or use different serial terminal program that is not pulling down RTS and DTR lines. Otherwise the module will get stuck waiting for releasing the REST signal and you will see nothing on the Serial Monitor.
200
202
201
203
As for different serial terminal program you can check Arduino IDE add-on [Serial Monitor for ESP8266]((https://github.com/esp8266/Arduino/issues/1360)) developed by user [@mytrain](https://github.com/mytrain) and discussed in [#1360](https://github.com/esp8266/Arduino/issues/1360).
202
204
@@ -215,33 +217,33 @@ Close up of voltage signals on GPIO0 and RST pins at the beginning of firmware u
215
217
216
218

217
219
218
-
Please note that the reset sequence takes about 10x shorter comparing to [ck](@ck) reset (about 25ms vs. 250ms).
220
+
Please note that the reset sequence is about 10x shorter comparing to [ck](@ck) reset (about 25ms vs. 250ms).
219
221
220
-
Next picture covers complete upload of blink.ino example at 921600 baud. Except for difference of the reset signal sequence, the complete upload looks similar to that of [ck](@ck).
222
+
Next picture covers complete upload of [Blink.ino](https://github.com/esp8266/Arduino/blob/master/libraries/esp8266/examples/Blink/Blink.ino) example at 921600 baud. Except for difference of the reset signal sequence, the complete upload looks similar to that of [ck](@ck).
A sample wave-form below shows another upload of blink.ino example at 921600 baud but with two reset retries.
226
+
A sample wave-form below shows another upload of [Blink.ino](https://github.com/esp8266/Arduino/blob/master/libraries/esp8266/examples/Blink/Blink.ino) example at 921600 baud, but with two reset retries.
If you are interested how noodemcu reset method is implemented, so it does not pull to ground RTS and DTR lines once you open Serial Monitor in Arduino IDE, then check circuit below.
230
+
If you are interested how noodemcu reset method is implemented, then check circuit below. As indicated it does not pull to ground RTS and DTR lines once you open Serial Monitor in Arduino IDE.
229
231
230
232

231
233
232
-
It consists of two transistors and resistors that you can locate on NodeMCU board on right. On left you can see complete circuit and the truth table how RTS and DTR signals of the serial interface are translated to REST and GPIO0 on the ESP. For more details please refer to [nodemcu](https://github.com/nodemcu/nodemcu-devkit) repository on GitHub.
234
+
It consists of two transistors and resistors that you can locate on NodeMCU board on right. On left you can see complete circuit and the truth table how RTS and DTR signals of the serial interface are translated to RST and GPIO0 on the ESP. For more details please refer to [nodemcu](https://github.com/nodemcu/nodemcu-devkit) repository on GitHub.
233
235
234
236
235
237
### I'm Stuck
236
238
237
239
Hopefully at this point you were able to resolve ``` espcomm_sync failed ``` issue and now enjoy quick and reliable uploads of your ESP modules.
238
240
239
-
If this is still not the case then review once more all discussed steps in the checklist below.
241
+
If this is still not the case, then review once more all discussed steps in the checklist below.
240
242
241
243
**Initial Checks**
242
244
*[ ] Is your module connected to serial port and visible in IDE?
243
245
*[ ] Is connected device responding to IDE? What is exact message in debug window?
244
-
*[ ] Have you selected correct ESP module type in "Board" menu? What is the selection?
246
+
*[ ] Have you selected correct ESP module type in *Board* menu? What is the selection?
245
247
*[ ] Have you tried to reduce upload speed? What speeds have you tried?
246
248
247
249
**Advanced Checks**
@@ -264,17 +266,19 @@ If you are stuck at certain step, then post this list on [ESP8266 Community Foru
264
266
265
267
### Conclusion
266
268
267
-
With variety of available ESP8266 modules and boards as well as possible connection methods troubleshooting of upload issues may take several steps.
269
+
With variety of available ESP8266 modules and boards, as well as possible connection methods, troubleshooting of upload issues may take several steps.
268
270
269
-
If you are beginneruse boards with integrated power supply and USB to serial converter. Check carefully message in debug window and act accordingly. Select your exact module type in IDE and try to adjust upload speed. Check is board is indeed entering boot loading mode. Double check your USB to serial converter. Analyze detailed upload log for inconsistencies with IDE settings.
271
+
If you are a beginner, then use boards with integrated power supply and USB to serial converter. Check carefully message in debug window and act accordingly. Select your exact module type in IDE and try to adjust upload speed. Check if board is indeed entering boot loading mode. Check operation of your USB to serial converter with loop back. Analyze detailed upload log for inconsistencies with IDE settings.
270
272
271
-
Double check your confection diagram and wave-form for consistency with selected reset method.
273
+
Verify your connection diagram and wave-form for consistency with selected reset method.
272
274
273
-
If you get stuck ask [community](http://www.esp8266.com/) for support providing summary of all completed checks.
275
+
If you get stuck, then ask [community](http://www.esp8266.com/) for support providing summary of all completed checks.
274
276
275
277
276
278

277
279
278
-
Test stand used for checking of ck reset method is shown above. No any ESP module has been harmed during preparation of this FAQ item.
280
+
Test stand used for checking of ck reset method is shown above.
281
+
282
+
No any ESP module has been harmed during preparation of this FAQ item.
0 commit comments