RL-ARM: USING RL-FLASH FS WITH SECTOR SIZES LESS THAN 256 BYTES
Information in this knowledgebase article applies to:
I am using an EEPROM with a small sector size of 256 bytes. I am able to successfully format the EEPROM with the fformat function; however, after the format ffree reports that there are 0 bytes free. This problem seems to be sector size related. Is it possible to use RL-FlashFS on EEPROMs with sector sizes less than 256 bytes?
You are correct, the small sector size is causing the file system to improperly report the amount of free space. The overhead involved in using such small sectors sizes would result in very poor performance and is not directly supported.
Change the device description table in FS_FlashDev.h or FS_SPI_FlashDev.h to create Virtual Sectors containing multiple real sectors. Virtual Sector sizes should be 2k bytes or larger. When using virtual sectors, be sure to update fs_EraseSector or fs_spi_EraseSector so that the entire Virtual Sector is erased.
An example implementation of Virtual Sectors is provided in the following flash driver:
The following Discussion Forum threads may provide information related to this topic.
Last Reviewed: Thursday, January 21, 2010
of your data.