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.

  • Majenko's answer applies to esp8266 modules. But the question "why on the NodeMcu" remains? Can the NodeMcu Lua firmware use it? – Juraj Jun 5 at 4:39
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.

| improve this answer | |
  • +1. That said, I do find it silly to breakout those pins on consumer-targeted devboards... – dandavis Jun 4 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 Jun 4 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 Jun 4 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 Jun 4 at 20:08
  • @dandavis, only NodeMcu dev board has this pins. Does the NodeMcu Lua firmrware use it? I doubt that. – Juraj Jun 5 at 4:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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