[Answered] Physical block size and physical page size of SPI flash for SPIFFs

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

[Answered] Physical block size and physical page size of SPI flash for SPIFFs

Postby kolban » Wed Nov 23, 2016 11:57 pm

I am studying SPIFFs as found here ... https://github.com/pellepl/spiffs/wiki/Configure-spiffs

The first question asked is to determine the physical block size and the physical page size of SPI flash storage. How would we determine these values for the common modules we use? For example, for the ESP-DevKitC where might those values be found?
Last edited by kolban on Thu Nov 24, 2016 4:54 am, edited 1 time in total.
Free book on ESP32 available here: https://leanpub.com/kolban-ESP32

WiFive
Posts: 3529
Joined: Tue Dec 01, 2015 7:35 am

Re: Physical block size and physical page size of SPI flash for SPIFFs

Postby WiFive » Thu Nov 24, 2016 1:28 am

In the datasheet for the flash chip

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

Re: Physical block size and physical page size of SPI flash for SPIFFs

Postby kolban » Thu Nov 24, 2016 2:02 am

That makes sense ... so I'm guessing that the general answer to the question is:

"SPI flash memory devices vary by manufacturers model. The best answer is to find the data sheet for the corresponding flash memory device that is actually the one in use. If you have a physical module, grab a magnifying glass and take a look at the board. If the flash memory chip is not visible (perhaps because it is covered in a shield and you don't want to remove the shield) then try and contact the supplier of the module and see if they can tell you the specs of the flash memory being used. Ideally, if one finds out, post that answer in a forum or newsgroup so that others may find that information in the future. Until one of us actually takes a look at the DevKitC board we don't yet the actual SPI flash memory device employed by Espressif".
Free book on ESP32 available here: https://leanpub.com/kolban-ESP32

ESP_Sprite
Posts: 8921
Joined: Thu Nov 26, 2015 4:08 am

Re: Physical block size and physical page size of SPI flash for SPIFFs

Postby ESP_Sprite » Thu Nov 24, 2016 2:40 am

In general, though, I'd say that a rough estimate of 99.8% of all chips the ESP32 can interface with use the same block/page sizes (256byte page size, 4KiB erase block size)

ESP_Angus
Posts: 2344
Joined: Sun May 08, 2016 4:11 am

Re: Physical block size and physical page size of SPI flash for SPIFFs

Postby ESP_Angus » Thu Nov 24, 2016 4:04 am

kolban wrote:Ideally, if one finds out, post that answer in a forum or newsgroup so that others may find that information in the future. Until one of us actually takes a look at the DevKitC board we don't yet the actual SPI flash memory device employed by Espressif".
The model details of flash chips used (for far) in WROOM32 can be found here:
http://www.esp32.com/viewtopic.php?t=386#p1776

Note that we don't guarantee future modules will use the exact same flash models, but they will be similar.

The summary Sprite gave is good to go on, and probably going to be true in all cases.

An addition piece of inof, the ESP32 SPI flash controller hardware can also issue 32KB Block Erase commands (For 32KB aligned regions). These are faster on most chips than erasing 8x4KB sectors individually.

EDIT: This post said 64KB for a while, but it's 32KB - at least for most flash chips.

Who is online

Users browsing this forum: No registered users and 64 guests