9 years, 1 month ago.

mkdir occasionally fails to create the first folder if several are to be created at the same time?

Like stated in the tittle, if I have the following code:

mkdir("/sd/dummy1", 0777);
mkdir("/sd/dummy2", 0777);
mkdir("/sd/dummy3", 0777);

Occasionally, folder dummy1 will be not made, it some file is to be created or saved into that folder, system will hang. This doesn't happen every time, only happened 34 times to me last year. I run my code on my own customized board, but I don't think this has anything to do with my board, because other than this ,SD cards works perfectly.

Did this happen to any of you?

Update:

This issue was tracked down to an occasionally faulty RTC crystal. LPC1768 seems rather picky about load capacitance.

Question relating to:

SDFileSystem FAT, file, SD, System
Be the first to answer this question.