3

I have an ESP32 development board and a NodeMCU board here. Both breaking out the pins for the SPI flash of the ESP. These pins are mentioned in standard pinout descriptions as must/should not connect. This pinout description states, that they

are not recommended for other uses. So, don’t use these pins in your projects

The answer to this question suggests, that you can somehow connect other SPI devices to the same bus as the SPI flash. The linked documentation from that answer states, that in that case you cannot control the chip select for the additional SPI device via a digital pin, but have to let the "hardware arbiter" (whatever that is) decide, when to connect to the additional SPI device.

That is the only use of these pins, that I could find, and even this seems pretty niche. It doesn't seem to be a standard way of usage for the pins and also rather difficult.

Considering the very limited and difficult use of the SPI Flash pins, why do ESP boards break these out to the user? Why aren't they just kept internal, making the board a little smaller?

Maybe there is another use of the pins or I just underestimate the importance of adding additional SPI devices to the bus.

1
  • Majenko's answer applies to esp8266 modules. But the question "why on the NodeMcu" remains? Can the NodeMcu Lua firmware use it?
    – Juraj
    Commented Jun 5, 2020 at 4:39

1 Answer 1

3

Considering the very limited and difficult use of the SPI Flash pins, why do ESP boards break these out to the user? Why aren't they just kept internal, making the board a little smaller?

The ESP32 is not designed specifically for Arduino. There are other boot modes, such as SD card boot, whereby the internal flash is not directly used. In this situation you are free to use those pins as you wish (given that there is a flash chip attached to them).

The "ESP32 Development Board" was not primarily designed for Arduino. Instead it's a generic board designed by Espressif (and copied many times), and is usable with the Arduino core as one of many options.

In short: the pins aren't there for Arduino users, they're there for other users.


Addendum:

The SPI flash pins can also be used for (and are most commonly used for):

  • Adding more SPI flash chips which then get integrated into the normal memory space and with the internal caching system, and
  • Adding PSRAM to increase the RAM memory space.

A good example of the latter is the ESP32-CAM which has an SPI-connected PSRAM chip for framebuffering and image analysis connected to the SPI pins.

You can think of them not so much as SPI pins but as the EBI pins of the PIC32MZ or the EMB of the ATMega2560, etc. Used for expanding the memory rather than for adding random peripherals.

7
  • +1. That said, I do find it silly to breakout those pins on consumer-targeted devboards...
    – dandavis
    Commented Jun 4, 2020 at 19:59
  • @dandavis What's a "consumer-targeted devboard"? A devboard by definition is not consumer targeted. It's developer targeted. A consumer would never see one.
    – Majenko
    Commented Jun 4, 2020 at 20:03
  • Fair point, I meant something like a Wemos D1, ESP-CAM, and other's you can buy on consumer sites like ebay/amazon/ali, compared to "pro" dev things from digikey, mouser, TI, and the like...
    – dandavis
    Commented Jun 4, 2020 at 20:06
  • Most of those are cheap chinese copies of the original Espressif devboard. You may want them, so they give them. Why not? If you don't need them just ignore them. If you do need them then they're there for you. The more people that the board can appeal to the more people will buy it.
    – Majenko
    Commented Jun 4, 2020 at 20:08
  • Wow, didn't know of the SD card boot. That sounds really interesting. I guess the lines between consumer and developer are a big fuzzy for the field of hobbyists. That explains it for me. @Majenko Thank you for your expertise
    – chrisl
    Commented Jun 5, 2020 at 10:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.