File Access Efficiency

The efficiency of a read or write operation is increased with the number of sectors able to be accessed in one operation. Due to the necessity to decrease the required memory, Petit FatFS uses single sector access, meaning the access performance is decreased when compared with multiple sector access. An example can be seen in the figure below, which depicts a card's busy time associated with both a multiple sector write and a single sector write. This means the maximum read and write frequencies are decreased substantially.

Figure 1. Multiple vs Single Sector Write

It should also be noted that SDC/MMC storage devices are not byte addressable, so for every partial sector access operation (one byte up to the sector size of 512 bytes), the entire sector needs to be accessed. For example, when reading a sector byte-by-byte, the sector will be read 512 times. The minimum busy time achievable with Petit FatFS is by reading or writing 512 bytes at a time (the size of a sector), so that the sector is only accessed once. Therefore, data may be written or read in as long of a block as possible.