Maximum usable nvs in wroom32

Posts: 16
Joined: Wed Jun 13, 2018 11:48 am

Maximum usable nvs in wroom32

Postby hemant.chaudhari » Thu Jun 21, 2018 5:34 am


I am currently using wroom 32 module for my project. My current partition details is as follows

# Espressif ESP32 Partition Table
# Name, Type, SubType, Offset, Size, Flags

I am need of more nvs, what is maximum amount of nvs I can use for my data storage?
Also kindly elaborate the meaning of each partition name i.e.nvs,phy_init,factory?
out of them where my code lies?

User avatar
Posts: 1683
Joined: Mon Nov 16, 2015 4:43 pm
Location: Texas, USA

Re: Maximum usable nvs in wroom32

Postby kolban » Thu Jun 21, 2018 7:26 am

I'm not sure there is a hard-limit on NVS storage other than the amount of flash available and that you allocate. You may have to move the partition to a different location. If it starts at 0x9000 and the next partition starts at 0xf000 then the difference is 24K. You couldn't (for example) make it 25K AND have it start at 0x9000 as it would then overlap with the next partition.

The partitions you show:

* nvs - Where NVS data lives
* phy_init - Where ESP32 physical device data lives. There is nothing in there for you. It is required by ESP32 / ESP-IDF internals
* factory - Where the "factory loaded" application resides. This is typically your "user" application. If you need versioning of applications, you may also have OTA partitions for versions where the factory then becomes the "restoration" app that runs when all else fails.

If you need more storage for NVS ... might that be because you want to store lots and lots of data records? If so, consider the idea ofusing a flash based file system such as FAT or SPIFFS which includes wear levelling and a good way of organizing and working with such data.
Free book on ESP32 available here:

Posts: 16
Joined: Wed Jun 13, 2018 11:48 am

Re: Maximum usable nvs in wroom32

Postby hemant.chaudhari » Fri Jun 29, 2018 6:40 am

Thanks...I will definitely look for documentation regarding SPIFFS and will try to implement that

Posts: 21
Joined: Fri Jan 12, 2018 9:05 am

Re: Maximum usable nvs in wroom32

Postby mr1000 » Mon Jul 02, 2018 11:01 am

Hello, I have a similar question.

I want to save a 128Kb file (coming from a server via Https) to the internal memory, so it can be read by pieces.
I was thinking to create a partition and saving it there, but I'm not sure if using partitions is too much complexity.

Should NVS do the thing? Increasing the NVS partition by 128Kb and changing its position.

Thanks in advance.
(I'm reading documentation, but I prefer to ask in case I'm overlooking something :oops: )

Edit: after rereading, seems like the partition option should be simple. Just using esp_partition_write() and esp_partition_read() functions.

User avatar
Posts: 488
Joined: Wed Jan 03, 2018 8:33 pm
Location: Orlando, FL

Re: Maximum usable nvs in wroom32

Postby fly135 » Mon Jul 02, 2018 6:03 pm

I found it extremely easy to set up and use a FAT file partition. Check out the esp_vfs_fat_spiflash_mount function. ... fatfs.html

John A

User avatar
Posts: 215
Joined: Sat Jun 10, 2017 9:55 pm
Location: Brazil

Re: Maximum usable nvs in wroom32

Postby urbanze » Tue Jul 03, 2018 12:41 am

I actually use 1MB of flash to store bultin log of embbebed, however, the truth size of log is less than 1MB, but I choose this for wear leveling do some working and rotate addresses... Without OTA partitions, probablly, you can use >=2MB nvs partition

Return to “General Discussion”

Who is online

Users browsing this forum: andrews and 24 guests