...
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.