Page 1 of 1

Wear Levelling library sector size

Posted: Sat Sep 01, 2018 4:22 pm
by burkulesomesh43
Hi all,
I am comfused about choosing the sector size in wear levelling example.
I want to use near about 250kb of flash for file system so I have to use sector size 512kb because 4096kb sector size rquires minimum 512kb of flash for file system.
but I actually very confused that what is the difference in this sector sizes(CONFIG_WL_SECTOR_SIZE 512kb & 4096kb)?

Re: Wear Levelling library sector size

Posted: Sun Feb 24, 2019 10:43 am
by falke5
as i know its a byte, not kilobytes

Re: Wear Levelling library sector size

Posted: Mon Feb 25, 2019 2:30 am
by Ritesh
burkulesomesh43 wrote:
Sat Sep 01, 2018 4:22 pm
Hi all,
I am comfused about choosing the sector size in wear levelling example.
I want to use near about 250kb of flash for file system so I have to use sector size 512kb because 4096kb sector size rquires minimum 512kb of flash for file system.
but I actually very confused that what is the difference in this sector sizes(CONFIG_WL_SECTOR_SIZE 512kb & 4096kb)?
Yes. ESP32 SPI Flash sector size is 4096 Bytes only. So, You need to erase minimum 4096 bytes to write data into particular section.

So, your assumption is not correct as per your calculation.

Please find below link for more details regarding that.

https://docs.espressif.com/projects/esp ... flash.html

Let me know if you still have any confusion or doubt for that.

Re: Wear Levelling library sector size

Posted: Tue Jun 11, 2019 10:30 am
by burkulesomesh43
Ritesh wrote:
Mon Feb 25, 2019 2:30 am
burkulesomesh43 wrote:
Sat Sep 01, 2018 4:22 pm
Hi all,
I am comfused about choosing the sector size in wear levelling example.
I want to use near about 250kb of flash for file system so I have to use sector size 512kb because 4096kb sector size rquires minimum 512kb of flash for file system.
but I actually very confused that what is the difference in this sector sizes(CONFIG_WL_SECTOR_SIZE 512kb & 4096kb)?
Yes. ESP32 SPI Flash sector size is 4096 Bytes only. So, You need to erase minimum 4096 bytes to write data into particular section.

So, your assumption is not correct as per your calculation.

Please find below link for more details regarding that.

https://docs.espressif.com/projects/esp ... flash.html

Let me know if you still have any confusion or doubt for that.
Got it.
Thank you.