ARM Technical Support Knowledge Articles

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

Applies to: RealView Real-Time Library

Answer


Information in this knowledgebase article applies to:


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

ATTACHED FILES

Request the files attached to this knowledgebase article.

Article last edited on: 2010-01-21 05:41:33

Rate this article

[Bad]
|
|
[Good]
Disagree? Move your mouse over the bar and click

Did you find this article helpful? Yes No

How can we improve this article?

Link to this article
Copyright © 2011 ARM Limited. All rights reserved. External (Open), Non-Confidential