4

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.

Niteesh Shanbog
  • 711
  • 7
  • 21
  • `Sizeof(cluster) == 32768` bytes by default for almost all SD card sizes. – Turbo J Jan 17 '17 at 14:52
  • 1
    "I found information on FatFs site that performance is the greatest when..." - Have you found that the performance of your SD card access actually is a problem? If and while you haven't, I strongly recommend to not try to optimize! - Especially, I would need a *very* good reason if I was to allocate **16k** of RAM for *performance* optimization. – JimmyB Jul 15 '17 at 18:08
  • @NiteeshShanbog - the only effect making such an absurdly trivial edit to a bad question that has been abandoned for four years is likely to have is to get it closed. – Chris Stratton Apr 24 '19 at 14:28
  • 4
    I'm voting to close this question as off-topic because it has been abandoned in unanswerable condition for four years – Chris Stratton Apr 24 '19 at 14:28

0 Answers0