Hello All,
I am trying to write data in to a SD Card using a third party FATFS provided by TI(example project), but only 512 bytes of data is being written. The
Subsequent calls to f_write() or f_lseek after the first call to f_write is setting FA_ERROR flag. Also the 512 bytes will be written provided the file is not empty or created using FA_CREATE or FA_CREATE_NEW. Can someone please explain the behavior or the error . Any help will be appreciated. Thank you
f_mount(0,&g_sFatFs);
f_open(&g_sFileObject, "0:/Message.txt", FA_READ | FA_WRITE | FA_OPEN_ALWAYS );
ReadCount = 512;
f_read(&g_sFileObject, line, ReadCount, &Count);
size = (&g_sFileObject)->fsize;
while(count < 10){
fresult = f_lseek(&g_sFileObject,size);
f_write(&g_sFileObject, &DMABuf1, sizeof(DMABuf1),&Count);
count++;
}