Suppose there are 3 files (abc.jpg, test.bmp and xyz.png) in SD card. When I use the f_readdir function, I understood that it does not retrieve the files in alphabetical order. So in which sequence it is retrieving the file name? Please share your ideas.
random is a good idea. it's also wrong.
it is highly likely that it will be based upon the order in which they are encountered in the directory structure on the card. and that will probably depend upon the order in which they are written to the card in the first place.