One of my tasks in a project is responsible for gathering information about values measured from sensors and write information in a .txt file on an SD card. What would be the best way to do this?
Right now, I create a task with 25000 size of stack depth (xTaskCreate(vtaskArchive, (signed char* )"vtaskArchive", 25000, NULL, ( unsigned portBASE_TYPE )2, &vtaskArchiveHandle);
) and I'm gathering information about measurement in a variable char archBuffer[16000];
(16000 is the size of the SD Card) and when size of data in equals 16000, I'm using a sync function to move it to the SD card.
I found information on the FatFs site that performance is the greatest when the application writes the data size of the cluster, but I'm not entirely sure if that's a good way to solve this problem.