ESP8266 SPI pinout

Hello,
I've an ESP8266 called ESP12-E. As far as I know it has SPI or rather two SPIs. I read that the SPI on the bottom (pins 9-14) is for flashing or something, not typical use.

So I've few questions:

  1. I can't find which ports are designed for standard SPI. Where is "standard" MISO, MOSI, SCK? On google there are few examples but every of them is different.

  2. I'll use two devices using SPI, so I need two CS's pins. Could I use GPIO 4 and 5 for them? I'll use Arduino IDE for ESP.

  3. As I looked, there are many possobilities how people are connecting ESP12x for normal (non-flash) mode. With or without resistors, connecting GPIO0 and GPIO2 to VCC or leaving it in the air. Which version is true?

  4. As I found on one example GPIO15 is "CS pin" but as I heard it need to be connected to GND for normal work. Waht about it?

Currently I've designed that. Should be it okay or remove these resistors?

Thank you!

Studying open source boards will help. SparkFun also publishes full details for their boards.

Thanks for reply.
On site that you've given there is standard ESP-12 which doesn't has SPI pins on the bottom (my first screen in the thread). Also there is no mention about SPI. I've ESP 12-E.

On your site there is link to datasheet by Espressif which I had seenbefore. On sites 18-19 Espressif mentioned about 3 different types of SPI.

As far as I know these from 3.3.3 (bottom) are not interesting for me. But what about the rest of them?
That datasheet is for "chip" ESP8266EX, not entire ESP and there may be problem to determine which pins are used for what.

For instance:
Two pins - GPIO8 and GPIO11 (from 3.3.3) aren't avaible on ESP12-E.

So I've no idea how to connect it properly.

Take a look at this similar but different breakout board. These are the user accessible SPI pins.

GPIO14 SPI SCK
GPIO12 SPI MISO
GPIO12 SPI MISO
GPIO15 SPI SS

https://learn.adafruit.com/assets/46249[\url]

The "other" SPI interface pins are used inside the module for the SPI Flash chip so must not be used.

Okay, thank you. I will take a look on that combination.

If may I ask I have one more ambiguity - there is SS pin on GPIO15. To run and keep ESP on normal, programming mode (not to flash) I need to have it connected to GND (keep it a LOW), hovewer on SPI unused devices have HIGH state, and we are changing it when necessary - to read data from devices.

While searching informations about flashing ESP I found that ESP needs all the time to have certain PINs on LOW/HIGH.

The current mode on ESP isn't determined only when the device is turned ON - during working of ESP we can change it by change stats of PINs. I saw that people just changed the state of ESP when they flashed it using pulldown/pullup buttons. There were holding "flash-button" during flashing (strange idea, what about button bounce?) and then click second button to reset it.

The only odea which I have, is connecting that GPIO15 to GND permanently and use non-SS pins as SS, for instance GPIO4 and GPIO5. Should it be okay? Like in Arduino, where I use standard digital PINs as SS?

I think you should buy an ESP8266 breakout board and use it so you understand how it works before designing your board. If you plan to include a SPI device, prototype everything using breakout boards, if possible.

GPIO15 can be configured as an output and driven high or low as needed. The pull down does not prevent this. If you search for ESP8266 projects using SPI, for example for TFT LCD, GPIO15 is used as the SPI chip select.

I think you are incorrect about changing the state while running. See the instructions for the Huzzah ESP8266. The procedure is press and hold the GPIO0 button to ground this pin. Next press and release the RESET button. Next release the GPIO0 button. Pressing the GPIO0 alone does not put the device in bootload mode. Once the device is in bootload mode, the GPIO0 button can be released.

@gdsports GPIO 0

@juraj

Thanks, you are correct! I will fix my post.