Use this forum to chat about hardware specific topics for the ESP8266 (peripherals, memory, clocks, JTAG, programming)

User avatar
By RichardS
#55180 Community Answers.....

Here is an excellent question to ask the community for answers....

The flash chips connect to the ESP8266EX IC either via 2 data line or 4 data lines. 2 data lines is called DIO and 4 data lines is called QIO mode.

Why use QIO mode over DIO, or DIO over QIO?
Is there speed differences? and if yes are they notable? (or is the extra 2 I/O better used)
Why is there an option in Arduino IDE for 40Mhz and 80Mhz flash?
Why does the ESPTOOL.exe or ESPTOOL.py care if there it is DIO or QIO mode, is this not transparent?

Hoping to get community involvement to make clear this interface.

RichardS

PS. Maybe the best answer will be copied to the WIKI :)
User avatar
By picstart
#55229 Well choosing DIO should on the face of it reduce the speed both in flashing and at run time.
Practically it makes little difference since often performance is dictated by the speed of peripherals like sensors.
Now to free the pins that are captured by the default QIO the can needs to be removed and some pins lifted and another shorted to GND.
This is more or less a desperate measure and only taken if there is a definite shortage of pins and then only if you are one or two pins short.
The D9 D10 pins released must also be brought out on the PCB like they are on a 12E.
This means for more pins than two extra the solution lies with a port expander.
User avatar
By martinayotte
#55230 I've seen somewhere the speed differences, but I don't recall where.
DIO is not 50% of QIO, but If I remember, it is around 65%.
Uploader tools need to be aware of DIO or QIO mode not only to tell to the internal ROM bootloader how to access Flash for upload but also to tell this ROM bootloader to save flag saved somewhere how to boot next time it is power up. In other word, the ROM bootloader start booting, probably even in SIO, and when seeing that flag, it knows in which mode the Flash can be accessed, then shift into that mode.
User avatar
By RichardS
#55287 I have noted on some modules that when you program through command line or Arduino IDE it works, but if you take the .bin file and use it with say ESP8266httpUpdate the module on next boot will fail and revert back to the original code... you get a:

Code: Select allload 0x4010f000, len 1384, room 16
tail 8
chksum 0x2d
csum 0x2d
v3de0c112
~ld
system param error
11 20 00 20 22 2c 41 00 00 f4 26 22 08 66 82 08 26 b0 05 c6 e6 ff 66 c0 98 38 f1 0c 14 2d 0c 42
63 14 3d 0d 85 ef ff 58 91 68 f1 0c 04 e2 56 d4 42 66 69 9c 35 2d 0c 3d 0d 45 ee ff 2d 0c 38 91
48 a1 5d 0e 45 c7 ff 96 72 f6 2d 0c 32 c1 10 05 d0 ff 96 c2 f5 6d 0e 4d 0d 38 d1 58 e1 2d 0c 0c
08 72 cc 24 79 11 89 01 0c 07 c5 db ff 56 12 f4 46 d1 ff 00 12 c1 f0


I wonder if somehow this is related?

RichardS