Read() MFS

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

Read() MFS

1,426 次查看
amleng
Contributor IV

I have a 200Kbyte file on sd card. I use the following code on MQX 3.8 to read the file read (log_fp, data,3); using this code I can only read the first 900 bytes of the file. I have problem to  read the rest of the file correctly! I tried fread() and fgetc() I got the same issue. Any suggestion for me?

Thnaks

标签 (1)
4 回复数

1,233 次查看
netra
Contributor IV

How to check whether there is a sector problem or file system problem??

0 项奖励
回复

1,233 次查看
pavel_chromy
NXP Employee
NXP Employee

At first, please make sure that the issue is not caused by a damaged SD card or corrupted filesystem on it.

Try to read the file on PC and also try a different newly formatted SD card with a file of the desired size.

If the problem persists, please provide us with more details. Such erratic behaviour of MFS read function was not observed so far, so the actual reason cannot be identified with the brief description provided.

1,233 次查看
timias
Contributor IV

I understand amleng is asking for help for a specific problem, but I would like tools, and or APIs to verify a disk functionally so that logic can be built to heal issues that might occur in the field.

0 项奖励
回复

1,233 次查看
amleng
Contributor IV

That's true. It was sd card problem. Sounds a few bad sectors issue! Thanks

0 项奖励
回复