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.

CCS/CC3200: Non - volatile memory issue and SD card

Part Number: CC3200

Tool/software: Code Composer Studio

Hi,

I am facing the issue to store the data from SD card in buffer.

Actually, I am working on an application to store the data into SD card and send onto the server. I am using the file pointer to send the chunks of data on to the server. Also, the issue is some times the device get reset due to some reasons. So, I tried with the SD card to store the file pointer value if the power off or reset will happen the data will post from that present position only not from the first position. The issue is that if reset or power off will happen, the data will post from first position because of all these issue the file pointer become zero. The non-volatile memory is not in the CC3200.

I can do this successfully. But, my concern is, when reset or power is happening the data from the SD card is not storing into the buffer to post the data on to the server. The file pointer is incrementing. 

Suppose, the file pointer is 0, data is storing into buffer from SD card but suppose when the power off or reset happens at 1000th position and when device will open the file pointer value is same but the storing of data is not happening.

If I am not storing the file pointer into SD card. Everything is working fine. But, I want to use this condition because of power off or reset.

I am getting the value FR_INVALID_OBJECT into the f_read(). That's why the buffer value is NULL here.

void SDCard(unsigned int n)
{
	    FIL fp,fq;
		FATFS fs;
		FRESULT res;
		DIR dir;
		UINT Size,S;
		HTTPCli_Struct httpClient;
		static int ind;
    res = f_open(&fp,"Device.txt",FA_READ);
    	strcpy(post_data,SD_START);
		res = f_lseek(&fp,n);
		res = f_read(&fp, file_data1,sizeof(file_data1),&Size);
		strcat(post_data,file_data1);
		strcat(post_data, SD_END);
		res = f_close(&fp);
		send_session(5, httpClient, ind);
}