This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Minimum steps for writing files to SD card

I'm using the eZDSP5535 and I'm trying to write a large number (3000+) of files to an SD card using data from the codec.  The CSL examples are helpful, but as the number of files increases, the ATA_fopen takes longer to execute since it searches through the existing files before creating a new file. 

I need to write 10 seconds of data to each file, but due to memory constraints, I write 10 separate 1 seconds chunks to each file.  Right now I open the file, write the 1 second of data, and close the file.  This is repeated 9 more times for each file. This sequence does work properly until there are roughly 700 files on the SD card and the open function bogs down, causing data buffer overruns and lost data.

I tried opening the file once, writing 10 times to the file, and closing the file but ran into some problems.  The file is on the SD card, and Windows reports the correct file size, but the file is empty when I open it in an editor.  Do I need to flush after the writes or am I missing something else?

Thanks!