Fopen in read mode not working?

Hello

I am using kiel Fs library ported to LPC1788 for SD CARD interfacing .the problem that i am facing is my SD CARD there is file in the name example.csv.what i am doing is opening the file reading the content of this file and closing it.but the problem is for the first two times the file oopens normally but for the third time it is going for hard fault handler while fopen.below is the example of how i am opening the file.

ptr = fopen("M0:example.csv","r");
//
read file content
//
fclose(ptr);

Thanks & regards
Akshay H V

More questions in this forum