Post links and attach files for documentation here, also chat about these docs freely

User avatar
By eriksl
#90309 Impossible. The control and data lines required for that are not available on the outside of the chip.

Having said that, it is possible to connect a SPI RAM chip. In theory it would be possible to have it share all SPI lines of the SPI FLASH chip minus the chip select, but I don't think it can work actually, as soon as you connect anything to the lines the FLASH chip stops working.

But you can still connect the RAM chip to the second SPI interface, no problem there. It will just only work on single speed then (the SPI interface that services the FLASH chip can run at 4x speed by combining data lines).

Als you will need to do explicit memory read and write commands to the RAM chip. You won't be able to address memory locations on the RAM chip like you can do on the FLASH chip, where the ESP8266 does the translation and caching to RAM. This makes it a lot less useful.

There is actually hardware support in the ESP8266 for connecting external RAM chip in the same way as an external FLASH chip (with direct addressing), but apparently it's so buggy that you can't really use it.

If you really want to do this, have a look at the ESP32 and only the newest generation dies, they can do it (over SPI). But the ESP32 does have a lot more RAM memory anyway.

The best route to go is to use RAM wisely. There is a LOT of space to be reclaimed if you're programming smartly. There is 80 kbytes available and abouy 64 kbytes of that can be used by you, which is really quite a bit. To start with, don't put text strings in RAM, it's a waste.