This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TM4C123GH6PM: SD Card interfacing

Part Number: TM4C123GH6PM


Hi everyone,

My platform is TM4C123g

CCS version 6,

 My problem occur in SD_CARD interfacing.

 Below given code working in separately but when this code using in my solar project code with timer/interrupt then it is not work ...please help me...why this problem is occur.

iFResult = f_mount(0, &g_sFatFs);

if(iFResult != FR_OK)
{
// UARTprintf("f_mount error: %s\n", StringFromFResult(iFResult));
return(1);
}
iFResult = f_open(&g_sFileObject, filename, FA_WRITE|FA_OPEN_ALWAYS| FA_READ);

iFResult=f_lseek(&g_sFileObject, f_size(&g_sFileObject));
do
{

iFResult = f_write(&g_sFileObject, buf2, sizeof(buf2) - 1, & ui32BytesWrite);
iFResult = f_sync(&g_sFileObject);
}while(ui32BytesWrite != sizeof(buf2)-1);

iFResult = f_write(&g_sFileObject, new_line, sizeof(new_line) - 1, & ui32BytesWrite);
iFResult = f_sync(&g_sFileObject);
iFResult = f_write(&g_sFileObject, new_line, sizeof(new_line) - 1, & ui32BytesWrite);
iFResult = f_sync(&g_sFileObject);
do
{

iFResult = f_write(&g_sFileObject, buf1, sizeof(buf1) - 1, & ui32BytesWrite);
iFResult = f_sync(&g_sFileObject);
}while(ui32BytesWrite != sizeof(buf1)-1);

iFResult = f_write(&g_sFileObject, new_line, sizeof(new_line) - 1, & ui32BytesWrite);
iFResult = f_sync(&g_sFileObject);

no error is occur but data write is not also done.