SD card writing after ejection

cancel
Showing results for 
Search instead for 
Did you mean: 

SD card writing after ejection

323 Views
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

Labels (1)
Tags (3)
0 Kudos
1 Reply

148 Views
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 Kudos