Embedded Access Inc-Products - SFFS Embedded Flash File System Software

By: Embedded Access  09-12-2011
Keywords: Building Blocks, Software Developers, Flash Memory

SFFS is a Safe Flash File System that can support almost any NOR or NAND flash device.  It provides a high degree of reliability and complete protection against unexpected power failure or reset events.  SFFS provides wear leveling, bad block handling and ECC algorithms to ensure you get optimal use out of a flash device. SFFS is pre-integrated with the and allows you to quickly create a a robust file system for an embedded device using on-chip or on-board flash devices.


| | | | | | |


The SFFS Flash File System was specifically designed for embedded systems.  Taking into account the limited memory and real-time response requirement of many embedded applications, SFFS allows embedded software developers to implement a full featured file system that uses flash devices as a storage medium. This means that embedded applications can read and store data into non-volatile and inexpensive flash memory instead of requiring a hard disk drive or other mechanical media. A key requirement of a rugged flash file system is the ability to maintain the file system integrity across unexpected power loss or resets that are common in many embedded devices. SFFS is designed to ensure that the software never risks corrupting the file system or losing stored data.

The SFFS Flash File System has been tested on embedded microprocessor architectures such as Freescale’s ColdFire and Power Architecture architectures. Flash device drivers for flash components commonly used with ColdFire and Power Architecture chips have been integrated with the SFFS file system.  Integration with Freescale’s CodeWarrior tools ensures a great out-of-box experience for SFFS developers using these processor architectures.   SFFS has ben pre-integrated with the MQX RTOS but can also be used with any real-time operating system.

SFFS provides the key features that you would expect from a desktop PC file system such as support for long file names, multiple disk volumes, and directory handling. It also allows multiple files to be open simulatenously and provides a standard API.

The SFFS Flash File System is designed to support both NOR and NAND flash devices.

NOR Flash
NOR flash is one of the building blocks of most embedded systems. It provides non-volatile storage of data and code for systems. It is characterized by having storage that can only be written to if previously erased and erasable blocks with relatively long erase times.

There are literally thousands of NOR flash devices available all with slightly different characteristics while retaining the same base properties. The SFFS Flash file system supports most major manufacturer's devices including:

  • AMD/Fujitsu/Spansion flash chips including MirrorBit technology
  • Intel StrataFlash
  • Atmel devices including the small memory devices
  • Sharp Flash Memory
  • SST including 25 and 39 series
  • Toshiba Flash Memory

NAND Flash
NAND flash is a relatively new flash technology designed to store large amounts of non-volatile data at reduced cost. It is characterized by having storage that can only be written to if previously erased - these blocks erase quicker than on NOR flash but is still quite long. Other features that differentiate it from NOR flash are that it is often shipped with a number of bad-blocks and their reliability is much increased if all single bit errors are detected and fixed.

There are many different NAND flash devices available all with slightly different characteristics while retaining the same base properties. The SFFS Flash file system supports NAND devices from most major manufacturers including devices from::

  • Samsung
  • Hitachi
  • Toshiba
  • Micron
  • ST Micro

Embedded devices do not have the luxury of sophisticated disk recovery programs as PC compatible devices do. If an embedded device file system gets corrupted because an erase or write operation is unexpectedly terminated the result could be lost sectors or a loss of the whole device. A robust flash file system must be designed to restore itself from any situation or system failure.

To achieve this a complete new file system must be available for use before any information is erased. In this way, if the worst happens the system can be rebuilt either in its pre-write form or with the new modifications included. This is not possible to guarantee with a DOS compatible file system and with many other file systems. Efficient implementation of this methodology with flash devices, which require sectors to be erased before writing is complex. Write and erase times can be relatively long on flash devices and it is extremely important to ensure the number of these operations is minimized. The write/erase performance of SFFS is highly optimized to ensure a high-level of performance for a 100% power-file safe system.

In order to verify the reliability of the SFFS Flash File System and ensure that data integrity is always guaranteed extenisve verification is done using thousands of PC simulations of NOR and NAND flash devices and with real-world testing on actual NOR and NAND flash arrays.

Flash devices have special characteristics - in particular their write and erase times may be comparatively long. SFFS is a highly crafted flash file system designed to make the most efficient use of the underlying flash devices. It does not use a flash translation layer - instead it works directly with its knowledge of the devices to give an efficient solution. In particular a sophisticated write caching system has been developed in which only changes to the file descriptor tables are stored in flash. This allows many updates to be performed with an absolute minimum of flash chip usage while always maintaining the 100% power-fail resilience of the system.

Algorithms are also provided to support the use of Erase Suspend/Resume so that blocks that are known to be erasable are erased by an interruptible thread. Additonally logic is included to select pre-erased blocks preferentially while still maintaining efficient wear algorithms. There are many algorithms employed to execute as efficiently as possible without over using the flash - these are done because the file system has direct knowledge of the erase/write structure of the attached devices.

Flash devices ultimately have limited life spans. Typically manufactures specify a maximum number of write/erase cycles for a device after which failures can be expected. A robust flash file system needs to be able to take this into account to ensure that it maximizes the use of a particular flash component. In addition, embedded devices can have unique requirements in terms of using parts of the the flash for other purposes other than the file system or unique configurations of multiple flash chips in arrays designed to achieve higher performance than a single chip. The SFFS flash file system is designed to maximize the use of the available flash and is flexible enought to use any flash configuration.

Wear-leveling
Flash devices suffer from over-use - if a particular block is used beyond the manufacturer's specification the block may eventually develop errors. To combat this eventuality, wear-level algorithms are implemented in SFFS which ensure an even usage of the blocks. In addition the method of recording changes to the file descriptors ensures that the minimum of writing is done.

Bad-Block Management
Bad blocks may develop in a device over time. These are automatically detected by the SFFS file sytem and are paged out of the file system ensuring that they are never written to or erased.

Reserved Sectors
Developers often require that sections of their flash device are reserved for a particular purpose outside of the file system. This is achieved by specifying in the SFFS driver which of the available blocks are for "private" use. The user can still use the standard low-level read/write/erase routines for accessing these blocks.

Flash Arrays
In embedded hardware designs it is common to use multiple flash devices in a system either in parallel to widen the data bus and acheive higher performance, or in series to increase storage size. This behaviour is fully supported by the SFFS Flash File System and relies only on configuration changes to the drivers.

ECC Algoritms
For NAND flash deivces Error Checking & Correction (ECC) may be implemented either in hardware or software. A highly efficient ECC algorithm is provided with the SFFS file system for NAND flash devices. The algorithm automatically corrects all single bit errors, resulting in substantial increase in the relaibility of these flash devices.

Embedded Access specializes in solutions for ColdFire and Power Architecture processors.  Our engineers have been working with ColdFire and Power Architecture architectures since their launch and with the 68K architecture before that.  This level of understanding for the ColdFire and Power Architecture processor architectures results in the SFFS Flash File System product being specifically optimized and pre-integrated for these platforms. The SFFS file system includes flash device drivers for flash chips that commonly appear on Freescale ColdFire and Power Architecture development boards such as Intel Strata flash and devices from AMD and Atmel. This level of integration ensures a very good out-of-box experience with ColdFire and Power Architecture development boards and easy integration of the SFFS Flash File System with a customer's hardware.

The SFFS Flash File System is licensed and delivered with full source code, so there are no mysteries about how the file system operates.  The source code includes all of the flash device code so that users can quickly adapt it and reuse the provided code to port the file system to their own flash hardware.

The simple SFFS licensing terms ensures there are no legal ambiguities. The SFFS file system installation provides excellent source code without leaving you wondering about potential exposure to the open-source legal issues. Whatever our customers develop is theirs; their proprietary features and code can remain as private as they decide. What's more, the SFFS is licensed without royalties, so it offers a blend of the best of both the professional software world and the open-source world.

The following products enhance the MQX RTOS for more advanced applications:

Keywords: Block Handling, Building Blocks, Desktop Pc, Device Drivers, Disk Drive, Embedded Device, Embedded Microprocessor, embedded software, Embedded Software Developers, File System, Flash Chips, Flash Device, Flash Memory, Hard Disk, Hard Disk Drive, Memory Devices, Microprocessor Architectures, Software Developers, System Supports,

Contact Embedded Access

Email - none provided

Print this page

Other products and services from Embedded Access

09-12-2011

Embedded Access Inc - Embedded Software Products for ColdFire and Power Architecture

The easy-to-use MQX API and great out-of-box experience ensures first-time RTOS users can start developing their application on the first day but is powerful enough for experienced OS developers to easily migrate legacy application code to an MQX-based platform.


09-12-2011

Embedded Access Inc - Products - usb host

The EUSB Embedded USB Host Stack has a multi-layered structure comprised of a Hardware Abstraction Layer, a USB Device Interface and USB Device Enumeration components conforming to the USB 1.1 or 2.0 specifications. The EUSB Host stack includes USB host controller drivers for MCF532x, MCF537x and MCF5222x on-chip device controllers and for the Power Architecture MPC5200 and MPC834x on-chip host controllers.


09-12-2011

Embedded Access Inc - Products - usb device

The EUSB Device stack includes USB device controller drivers for MCF527x, MCF532x, MCF537x and MCF5222x on-chip device controllers and for the Power Architecture MPC834x on-chip device controllers. There has been an explosion of plug-and-play, consumer friendly USB peripherals that has resulted in making USB a standard requirement for embedded device products.


09-12-2011

Embedded Access Inc - Products - rtcs tcpip stack

Taking into account the limited memory and real-time response requirement of many embedded applications, the RTCS TCP/IP stack is designed to provide the fully compliant feature set of networking stacks available on PCs and servers but configurable enough to allow it to fit into the small memory confines of an embedded device.


09-12-2011

Embedded Access Inc - Products - mqx rtos

Taking into account the limited memory and real-time response requirement of many embedded applications, the MQX design created an architecture that provided a RTOS with a full feature set but configurable enough to allow it to fit into very small memory requirements. This level of understanding for the ColdFire and Power Architecture processor architectures results in the MQX RTOS being specifically optimized for these platforms.