Hello everyone,
Thanks to everyone for suggesting me in my previous issues.
Now this time i want to write the data into SD Card by using SPI Communication.Its writing perfect by the below code and i am using 5 interrupts parallel and SD CARD data writing in while loop continuously. Here what i am getting the problem is when the data writing into SD CARD,at that time my other interrupts are stop few milliseconds and again it will start immediately. Here what i want is, I do not want to disturb to my other interrupts when the data writing to SD Card. I attach the code below.
//*****************************sdcard *************************************************
iFResult = f_mount(0, &g_sFatFs);
if(iFResult != FR_OK)
{
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);
while(1)
{
strcat(buf_rz,buffer2);
iFResult = f_sync(&g_sFileObject);
iFResult = f_write(&g_sFileObject, new_line, sizeof(new_line) - 1, & ui32BytesWrite);
iFResult = f_sync(&g_sFileObject);
for(g=0;g<=2;g++)
{
for(h=1;h<=500;h++)
{
SysCtlDelay(16000);
}
}
iFResult = f_write(&g_sFileObject, buf_rz, sizeof(buf_rz) - 1, & ui32BytesWrite);
iFResult = f_sync(&g_sFileObject);
}
After debugging my code i found that
iFResult = f_sync(&g_sFileObject); is creating the issue to other my interrupts
Please suggest me how to resolve the issue.
Thanks,
Regards,
Srinu.V