11 years, 2 months ago.

Cannot read more than 18 files from the FAT FileSystem

Hello everyone;

I am at a loss here : I am working some project in which I need to be able to read audio samples (.wav) from an SD card (4GB). I use the FATFileSystem along with SDHCFileSystem libraries. the SD is formatted in FAT32 (I have tried FAT16 too, though).

The problem is the following : I am using audio files with short names as "startup.wav", "a1.wav", "a2.wav", etc... "aX" files go up to more than 100 files. It works flawlessly for startup.wav, and from "a1.wav" up to "a17.wav", so that's about 18 files. But beyond this one, it stops working. Except for sample "a25.wav", which works fine too. All other samples are unreachable and cause the system to crash after a few reading attempts.

I looked into the FATFileSystem, and so a definition 17 as the maximum number of entries in the root directory. Since my samples were all in the root directory, I tried putting them in separate folders, but this did not solved anything : I still have the first 18 samples working + 25th, and nothing else. Every sample is encoded in the same way.

I am running out of ideas on this one. Any idea why this would happen? Any help and suggestions will be greatly appreciated!!


Be the first to answer this question.