Keil Logo

RL-ARM: USING RL-FLASH FS WITH SECTOR SIZES LESS THAN 256 BYTES


Information in this knowledgebase article applies to:

  • RL-ARM Flash File System

SYMPTOM

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?

CAUSE

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.

RESOLUTION

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:

\keil\ARM\RL\FlashFS\Flash\AT45DB642D

MORE INFORMATION

FORUM THREADS

The following Discussion Forum threads may provide information related to this topic.

Last Reviewed: Thursday, January 21, 2010


Did this article provide the answer you needed?
 
Yes
No
Not Sure
 
  Arm logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.

Change Settings

Privacy Policy Update

Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers
of your data.