Your new topic does not fit any of the above??? Check first. Then post here. Thanks.

Moderator: igrr

User avatar
By Erik84750
#95969 Hardware: generic ESP8266 module connected with Arduino IDE over FTDI (TX, RX and DTR).

In the early days of this board definition for Arduino IDE it used to be possible to get the DTR signal (with a litlle hardware modification, see drawing below) to set the ESP8266 in programming modus straight away, and to get out of program modus automatically.

Currently with the version 3.0.0 (I know not the latest but I would like to start from here) there are a few download options that I would like to understand better as well as know how to set these parameters so that I can download to the ESP8266 as before (ie no reset prior to or after a download).

Such as:
Flash mode (DIO, DOUT (compatible), QIO (fast) )
Reset method (no dtr (aka ck), dtr (aka nodemcu), no dtr no_sync)

My question: how must the ESP8266 board definition parameters be set so that I can connect the serial converter (ftdi) and download straight away from the Arduino IDE?

Hardware setup for DTR to get the ESP8266 in programming modus:
esp8266-auto-reset-first-try.jpg
You do not have the required permissions to view the files attached to this post.
User avatar
By btidey
#95971 Flash Mode depends on which flash chip has been used on the module and how it is wired up. Most modules will work with QIO which is fastest as it does 4 bits at a time. Some don't support this and then DOUT is the option to use. So try QIO first and if that doesn't work then use DOUT. Note that a module that needs DOUT may appear to program OK in QIO but then won't actually run as the code has not actually been flashed correctly. So the acid test is that the code actually runs OK after programming. If you have bought a set of modules then it is a fair bet they will all support the same flash mode.

Best Reset method for reliable automatic download and run is to use dtr (aka NodeMCU) but I don't like the hardware bodge method as illustrated. This is because the hardware is trying to separately control the download mode signal (GPIO00) and the reset line using the one DTR signal. This can work but the method uses that 100nF capacitor to try to make a reset pulse from the negative edge of the DTR signal. The module itself can also have a smoothing capacitor to GND on the reset line which means you don't get a clean reset pulse. The NodeMCU modules use both DTR and RTS signals to give separate control over the GPIO00 and reset respectively and this gives a much cleaner reliable result. The snag here with non NodeMCU hardware is that many USB serial adapters don't give easy access to the RTS signal. Some do and for those with fine soldering skills it is possible to pick up the RTS signal internally from adapters that don't. I take the latter approach as it avoids having to use the extra hardware stuff.

I use USB serial adapters that are 3.3V compatible to avoid level problems. I also normally connect the RTS signal to the EN signal rather than reset. That isn't strictly necessary but avoids the reset capacitor and has the same effect as a reset signal.
User avatar
By QuickFix
#95993
btidey wrote:I suspect previous post is an attempt to introduce malware by a hacked copy of balenaetcher used to write SD cards.

I also have my doubts: the URL and product is totally unrelated to the ESP, so handle with care. :idea: