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.

C6748 SYSBIOS FATFS

各位好,

     我使用C6748和Processor SDK4.0构建了一个数据采集系统,数据采集系统实时进行数据采集计算并且使用FATFS存储在SD卡中。整个程序中除了存储部分运行一直正常。把FATFS存储部分加进去后,每隔一段时间程序就会进入idle task出不来,而主任务程序运行在另外一个task的while()中,FATFS使用的是Processor SDK中的fatfs,下面是存储部分的代码

            char filename[40]={0};
            char dirname[20]="0:";

            //GateKey = GateSwi_enter(Gateswi);
            RTCTime_Read();
            RTCCalendar_Read();

            strcat(dirname,calendarstr);
            fresultRead = f_opendir(&Dir,dirname);
            if(fresultRead != FR_OK)
            {
                fresultRead = f_mkdir(dirname);
                if(fresultRead != FR_OK)
                {
                    UART_puts("Document creat failure\r\n",-2);
                }
            }
            strcat(dirname,"/");
            //TemValue();
            //strcat(timestr,Tread);
            strcat(timestr,".txt");
            strcpy(filename,dirname);
            strcat(filename,timestr);

            UART_puts(filename,-2);
            UART_puts("\r\n",-2);
            fresultRead=f_open(&file,filename,FA_WRITE|FA_CREATE_ALWAYS);
            if(fresultRead != FR_OK)
            {
                UART_printf("Fail to open file!!!!\n");

            }

            unsigned int i,j;
            char data_str[40]={0};
            for(i=0;i<i_step;i++)
            {
                for(j=0;j<AverageTimes;j++)
                {
                    System_sprintf(data_str,"%d %f %f",VolFsr[i][j],RDTime[i][j],FitResidue[i][j]);
                    f_puts(data_str,&file);
                    f_puts("\r\n",&file);
                }
            }

            f_close(&file);
            f_closedir(&Dir);