Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The driver RAM requirement depends on flash parameters such as block size and run-time configurations such as sector size. For a particular instance, a general formula can give an approximate:

 

where

secs_per_blk

The number of sectors per block.

...

secs_per_blk and sec_cnt can be calculated from more basic parameters :

 

 

where

blk_size

The size of a block on the device, in octets

Take as an example a 16-Mb NOR that is entirely dedicated to file system usage, with a 64-KB block size, configured with a 512-B sector. The following parameters describe the format :

 

and the RAM usage is approximately 

In this example, as in most situations, increasing the sector size will decrease the RAM usage. If the sector size were 1024-B, only 5188-B would have been needed, but a moderate performance penalty would be paid.