AnsweredAssumed Answered

MQX failing to write SD Card after about 900mb of write. I am using MQX™ RTOS 3.7.0

Question asked by Nilay Das on Apr 24, 2017
Latest reply on Apr 25, 2017 by Nilay Das

I am using MQX™ RTOS 3.7.0. But repeated attempt to write on SD card (of 2GB) constantly failing at about 900MB. I am using different file sizes. And this failure is not related to number of file is written as I have already tried write 160 to 500 files with different sizes. But in all cases it fails exactly around 900MB.

 

Pseudo code:

 

fopen_s(&FileHandle, file_name_and_path, "w");

if( pFileHandle ) {
   Div_Count = Buff_len / 255;
   
while( Div_Count-- ) {
   fprintf(pFileHandle, Sample_Buff_with_255char);
}
fclose(pFileHandle);

OS_Sleep(1000);

 

When I am trying t read the file, the read buffer does not match with written data. This failure happens only after 900MB of write.

Outcomes