Page 1 of 1

DIO/QIO Flash Speed

PostPosted: Sun Jun 12, 2016 6:01 am
by torntrousers
Have you ever wondered what sort of difference the flash modes DIO or QIO make?

There's an issue opened about using the extra GPIO9/10 pins by using the DIO flash mode and I wondered if that might make the ESP much slower, so gave it a try with a little test sketch.

The options are using a flash mode of DIO or QIO, a flash speed of 40MHz or 80MHz, and a CPU speed of 80MHz or 160MHz. The results of those reading 160K from flash give:

Time ....Mode ..Flash ......CPU
(ms) ..................Speed .Speed
100 dio 40MHz 80MHz
86 qio 40MHz 80MHz
84 dio 80MHz 80MHz
78 qio 80MHz 80MHz
68 dio 40MHz 160MHz
55 qio 40MHz 160MHz
53 dio 80MHz 160MHz
46 qio 80MHz 160MHz

What does that show? Probably that most of the time with most use cases the flash mode doesn't really matter if you need an extra GPIO. But if you're running something like a webserver with pages in flash it might be worth using QIO mode and 80MHz flash speed and 160MHz CPU speed.

Any other comments?

Re: DIO/QIO Flash Speed

PostPosted: Sun Jun 12, 2016 5:19 pm
by picstart

Re: DIO/QIO Flash Speed

PostPosted: Sun Jun 12, 2016 5:23 pm
by picstart
Yes half speed on DIO versus QIO is expected.Anything beter is good news If you need the extra pins there is no other way to go. An example ...suppose you have an ILI9341 LCD with SPI touch and SPI LCD plus a SPI SD card. AFAIK a good way to get the extra pins is to open the can and lift pins to get to DIO mode so as to free 2 pins. You quickly run out of CS pins for the SPI. You could add an extra IC and effectively multiplex the CS pins but lifting the pins on NodeMCU 12E is easier if you only need an extras two pins.