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.

File write and read in Tiva

Other Parts Discussed in Thread: EK-TM4C123GXL

Hi all,

I am trying to open a text file which has some data values. In my application, I get the data from the text file, do some processing and write the processed data to another text file.

Im doing the following simple file access operations. But the code seams to goto faultISR after executing the fprintf() statement. 

	   FILE * fp;

	   fp = fopen ("file.txt", "rw+");

	   fprintf(fp, "%d",2014);

	   fclose(fp);

The device am using is the TIVA Launchpad EK-TM4C123GXL

In there any way that I can read and write data to a text file in TIVA?? 

Thanks,

Sud

  • Hello Sudarshan,

    The fatfs example supports read and write to an external SD Card. However if you need to do data read and write, you may want to use the EEPROM without File Pointers. The end application is not clear to me so it would make more sense if you can elaborate on what you are doing.

    Regards

    Amit