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

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

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

617 Views
nilaydas
Contributor I

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.

Labels (1)
2 Replies

405 Views
nilaydas
Contributor I

Hi Daniel,

Thank you.

Regards,

Nilay

0 Kudos

405 Views
danielchen
NXP TechSupport
NXP TechSupport

Hi Nilay:

From your description, it seems a MFS issue.  I believe this issue is fixed in the latest MQX version.

MQX 3.7 is a very old version. I would suggest you update to MQX 4.2.0, and with patch MQX 4.2.0.2 , MFS FAT file system is more stable than that in MQX 3.7.

Regards

Daniel