Quantcast
Channel: Processors forum - Recent Threads
Viewing all articles
Browse latest Browse all 17527

Starterware/TMDSLCDK138: Having problem with using f_write() to write SD card

$
0
0

Part Number:TMDSLCDK138

Tool/software: Starterware

I am running the sample project "2045.starterware_c6748_mmcsd" on LCDKOMAPL138. Added the following code:

fresult = f_open(&g_sFileObject, g_cTmpBuf, (BYTE)FA_WRITE);
if(fresult != FR_OK)
{
return(fresult);
}
usBytesRead = 7;
strcpy(writeDatBuf, "testing");
fresult = f_write(&g_sFileObject, writeDatBuf, 7,
&usBytesRead);
if(fresult != FR_OK)
{
return(fresult);
}

The f_open() and f_write() always report FR_OK. However, the data was not written into the file (txt file). The f_read() work fine and read back the correct data every time. Please advise.

Thanks.


Viewing all articles
Browse latest Browse all 17527

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>