ESP-WROOM-02 SPI flash reserved pins

I’m using some ESP-WROOM-02 modules I had lying around for the first time and I’m a little confused about the included SPI flash IC as part of the module and was hoping someone that has used it could clarify for me. I’d like to do OTA updates to the device once I am done as I plan on installing in ways that are not super accessible and thus the OTA would be of most benefit. This is why I want to make sure I have the pins clarified before I have any PCBs made.

On the module schematics page, it seems to indicate that pins 18-23 of the ESP8266EX are connected to the included SPI IC.
However in the interface description table, it states that IO12-15 “Connects to SPI Flash, display screen, and MCU”. This seems to marry up with what’s in the datasheet for the ESP8266EX.

Can someone clarify the correct pins please?

I need an extra 1 or 2 IO pins, but if that means taking away the SPI bus and OTA options, I’ll need to do something more creative.

1 Like

Hi Justin,

While IO12-15 can be used to SPI flash this isn’t use for loading programs, the flash attached to pins 18-23 is. The interface description just mentions some of the uses of the SPI peripheral.


So if I’m using IO12-15, I can still use the SPI flash on the module to program OTA?

Now I’m also confused as the ESP8266EX datasheet says PWM is on IO12, 14, 15 and 4 and the ESP-WROOM-02 says it is on IO12, 13 and 15 yet the schematics show the pins are mapped the same (IO12 > IO12)

Maybe this is why they ended up in my spares box to begin with :sweat_smile:

Looking at the schematic, I think Liam is saying that you could attach additional SPI flash to GPIO12-15, but there is already SPI flash attached elsewhere on the MCU, so there’s no need.

The WROOM datasheet states GPIO12, GPIO15, GPIO13:

Which corresponds with ESP8266EX pins 10, 12 and 13

Which, as you said, conflicts with what’s in the 8266EX datasheet:

This confusion is exactly why I steer clear of ESP32 development, their docs are just not up there with ST or the other big guys.

Personally, I’d make up a breakout PCB for the modules that has standard 0.1" header so that I could use them in whatever going forward, and reconfigure them as you learn exactly how the module behaves.