Keil Logo

RL-ARM: RL-FlashFS: Limits of FAT16 file system

Information in this knowledgebase article applies to:

  • RL-ARM Flash File System


In my microcontroller application I store multiple files into the root folder of a SD memory card which is formatted as FAT16. I know that the FAT16 file system limits the number of files in the root folder to 512 but I cannot create more than 255 files. Are there reasons why?


It is correct that the maximum number of file in the root folder of a FAT16 file system is 512. This applies to files with 8.3 filenames. As soon as you use longer filenames, the maximum number decreases to at least 255 or even less depending on the length of the filenames. This is a restriction of the FAT16 file system, not a restriction of FlashFS.

Please note:
RL-ARM FlashFS handles filenames as 8.3 only when the length is not exceeded and when all characters of the filename are all either uppercase or all lowercase. FlashFS then converts the filename to all uppercase characters.
When a filename contains upper- and lower-case characters, the filename must be considered as a 'long' filename and the maximum number of files in the root folder decreases significantly.


In order to use the maximum number of files possible or to bypass this limit, you can do the following things:

  • Use 8.3 filenames with only uppercase characters in the filenames to create up to 512 files in the root folder.
  • Create the files in a sub-folder rather than in the root folder
  • Use FAT32 instead


  • Refer to RL-FlashFS in the RL-ARM User's Guide (MDK v4).


The following Discussion Forum threads may provide information related to this topic.

Last Reviewed: Monday, November 12, 2012

Did this article provide the answer you needed?
Not Sure
  Arm logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.

Change Settings

Privacy Policy Update

Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers
of your data.