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

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

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

641 次查看
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.

标签 (1)
2 回复数

429 次查看
nilaydas
Contributor I

Hi Daniel,

Thank you.

Regards,

Nilay

0 项奖励

429 次查看
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