Keil™, An ARM® Company

RL-ARM User's Guide

Memory Organization

The memory organization of a Flash Device is divided into flash sectors. The Flash Sector is typically a 64 KB memory page and is written cell after cell. The memory cell size depends on the device architecture and is 8-bit wide (byte), 16-bit wide (half word) or 32-bit wide (word). When you want to erase the flash data, you need to erase the whole flash sector at once. Flash Sectors are named Blocks in RL-FlashFS.

Each block contains its own allocation information on top of memory. The filenames and file content are on lower memory. If the file is bigger and does not fit into a single block, it is stored in several blocks. Several smaller files are stored into a single Block. The file allocation information is written to the File allocation table located at the top of the Flash Block.

Block storage

When the content of the file is modified, the old file content is invalidated and the new memory block is allocated. The Flash Block is erased when all the data stored in the Flash Block is invalidated.