SD card writing after ejection

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

SD card writing after ejection

559 次查看
mircopizzichini
Contributor III

Hi 

I've a problem with SD card writing.

The installation of SD card is ok, from esdhc to mfs over partition, as indicated in \mfs\examples\sdcard\demo.c, and I can write properly a file with the demo command "sd write".

But if I remove and then insert again the SD card, the "sd write" command gives me the answer "Error writing file...". With "sd dir" the file seems to be on the filesystem, but when I restart the device, that file is not there. I also tried to change cache mode with MFS_WRITE_THROUGH_CACHE, but the problem remains.

I saw similar topics about SD card writing, but no one can help me.

Maybe I need to reinstall filesystem again?

Thank you

标签 (1)
标记 (3)
0 项奖励
1 回复

384 次查看
danielchen
NXP TechSupport
NXP TechSupport

Hi

I did a quick check about this demo with Frdm-k64, I can see there is a "SD card uninstalled " info when you remove SD card and "Installing MFS over partition ..." when you reinsert SD card.  So I can write successfully again.

pastedImage_1.png

For your issue, it seems that MFS not installed correctly before you write a file.

Regards

Daniel

0 项奖励