We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
I am develop an application that will store data into a SD. I am having problems with times of record using the FlashFS. After record some LOGs, recording new entries is very slow. I am using: LPC1768 @ CCLK = 100 MHz RL-ARM 4.1 4GB SDHC Class 10 SD Card
Below my function for record:
void Record_Event (unsigned char log_type, unsigned int id) { char f_name[30]; FILE *logs_file; sprintf(f_name,"%2.2d%2.2d%2.2d%2.2d%2.2d%2.2d.LOG",LPC_RTC->DOM,LPC_RTC->MONTH,LPC_RTC->YEAR,LPC_RTC->HOUR,LPC_RTC->MIN,LPC_RTC->SEC); logs_file = fopen (f_name, "wb"); /* open a file for writing */ if (logs_file == NULL) { return; } fputc (log_type, logs_file); fputc ((id) & 0xFF,logs_file); fputc ((id >> 8) & 0x00FF,logs_file); fclose (logs_file); /* close the output file */ }
The recording time for up to 60 files is less than 1 second, but when already exist more than 60 files in SD Card, the new recordings are slower. The times for new recordings are: up to 60 files = 1s or less 60-70 = 1,5s 70-100 = 3s 100-150 = 5s
does anyone know why? any help is welcome.
may I refer you to this
I had a similar problem
http://www.keil.com/forum/19536/
I got around the issue with a different approach to the problem.
I have not tried repeating the old method off logging data and continue to work with what I now use