Simple question, but I can't find anything on the internet about it. Why would Espressif not support NAND flash when it is the more economical option? I ask because I'm trying to integrate a 128MByte flash into a project to read audio files from. My BOM would be too expensive with NOR flash on it, so I'm trying to find a way to use NAND flash.

  • \$\begingroup\$ Does it have SDIO interface? At least it has SPI? \$\endgroup\$
    – Justme
    Dec 10, 2020 at 5:49

1 Answer 1


NAND flash wouldn't be supported for the basic program storage, because it's quite a bit more complex to work with. The ESP32 isn't intended for grand expansive projects but to be an inexpensive solution for ordinary ones.

That said, you can use NAND, you just can't use only NAND. Put a cheap small NOR on your board to boot from and use for program storage, and then add a NAND on general GPIOs and write (or more likely find and port) all of the needed flash translation code.

That said, you should really consider compressing your audio. An affordable 32 megabyte NOR flash would hold quite a bit of compressed audio, and decompression libraries are available.

Managed NAND in the form of eMMC and SD cards may be an option as well - quasi-SPI interface to an SD card is going to be a lot easier than dealing with a bare NAND memory yourself, though in doing it yourself you do get to exercise control over the translation algorithm.

  • \$\begingroup\$ Does the ESP32 provide APIs for dealing with SPI NAND flash and running a filesystem on it? There are so many different memory APIs on their documentation that I can't make sense of it. The reason I want to use bare SPI NAND flash is that I'm extremely space constrained and eMMC or SD cards are just too big. \$\endgroup\$ Dec 11, 2020 at 6:10
  • \$\begingroup\$ The ESP32 is hardware, it does not provide any API's at all. As for the ESP-IDF software distribution I'd be a little surprised if it supported NAND, but you'd have to check (try a recursive case-insensitive search?). My guess is you'll have to find NAND management code elsewhere and port it. \$\endgroup\$ Dec 11, 2020 at 6:30
  • 1
    \$\begingroup\$ Example implementation: I am using ESP32-S3 with no PSRAM and an 1 G NAND in the Reflections project. It's an open source hardware/software project for building new mobile story telling experiences. The ESP32-S3 comes with 8 MByte of Flash, no PSRAM, and the NAND provides 1 Gbyte of storage. [Edited by a moderator.] \$\endgroup\$ Aug 7, 2022 at 18:30
  • \$\begingroup\$ one can find a 1Gb C library for NAND SPI here: github.com/squaresausage/WinbondW25N \$\endgroup\$ Feb 26 at 11:11

Your Answer

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

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