Atmel DataFlash
SafeFLASH supports all types of Atmel DataFlash®
Introduction
Atmel DataFlash devices have special characteristics that make them difficult to use in a reliable and failsafe way. In particular, if a page in a sector is written 10K times, then the system must ensure that all pages in that sector have been rewritten during that period. Additionally, a simple copy erase and copyback mechanism is unreliable because if power is lost during this process a random page of data may be lost from the system. HCC has provided a reliable and failsafe driver that manages these issues and ensures that Atmel DataFlash can be used in a reliable file system.
Wear-leveling
Flash devices suffer when over-used. If a particular block is used beyond the manufacturer's specification the block may eventually develop errors. To combat this, wear-level algorithms are implemented to ensure level usage of the blocks. In addition, SafeFLASH’s method of recording changes to the file descriptors ensures that the minimum amount of writing is done.
Reserved Sectors
Sometimes, it may be necessary to reserve sections of a flash device for a particular purpose outside of the file system. This is achieved by specifying, in the driver, which of the available blocks are for "private" use. Standard low-level read/write/erase routines can be used for accessing these blocks.
SPI Sample Drivers
A simple SPI driver is provided with the system. It is the only part that must be ported to the target. The Developer's Guide explains the steps to allow easy porting.
Devices Supported
All Atmel DataFlash types are supported:
-
AT45DB011B
-
AT45DB021B
-
AT45DB041B
-
AT45DB081B
-
AT45DB161B
-
AT45DB161D
-
AT45DB321B
-
AT45DB642
-
AT45DB642B
-
AT45DB642D (including both page modes)
The specific DataFlash device type may be selected through a definition in the driver.
