Hi friends,
What is the writing speed in the SD Card?.
I am using ATSAMD20-XPRO, ATIO1-XPRO, and Base SD/MMC card example with FatFs. I'm recording data every 100ms, is this correct?
Best Regars,
Percy
Hi friends,
What is the writing speed in the SD Card?.
I am using ATSAMD20-XPRO, ATIO1-XPRO, and Base SD/MMC card example with FatFs. I'm recording data every 100ms, is this correct?
Best Regars,
Percy
What is the writing speed in the SD Card?.
Depends on the SDcard. There's different specifications. Faster ones are more expensive.
I am using ATSAMD20-XPRO, ATIO1-XPRO, and Base SD/MMC card example with FatFs. I'm recording data every 100ms, is this correct?
Depends on how much data you're writing.
Ok, Karman.
I need to record data in SD CARD memory every 10ms. What SD CARD memory do you recommend me?.
Thanks,
how much data are you writing every 10ms?
Read https://en.wikipedia.org/wiki/SD...
you can measure how fast it takes to write a given amount of data. This will tell you if the card and system is fast enough.
I need to write 20 bytes every 10 ms, however it takes about 100ms.
I need to write 20 bytes every 10 ms, however it takes about 100ms.
Thanks
https://stackoverflow.com/questi...
Note, if you do fopen,fwrite,fclose then the performance will be slow. But you sort of need to do this to keep the filesystem intact.
Writing only 20 bytes means you need to find the sector, read the sector, add new data then write the sector then update the fat/directory.
You might need to consider other techniques, like only having one allocated file and writing directly to it rather than using fatfs. Once you know the start sector, you can scan through the file to find the first free sector.
Does Atmel has a faster library than Fatfs?.
You propose to consider using another technique, for that reason I would appreciate to indicate me where to locate that information.
What makes you think fatfs is slow? Your choice in using a filesystem adds overhead.
Once you understand where the fundamental limitations are, then you can think about what compromises can be used.
As such, you don’t need a filesystem to write your data - its only needed when you want to read the data on a PC. One compromise as i mentioned earlier is you write one large file of 0xff on the sdcard. When your code starts, it opens the file and searches linearly for the end of data. This may take some time- such is a compromise. Once it has found the end of previously written data, then it appends new data from here. Another compromise is to write your 20 bytes into one sector of 512bytes. This means you don’t need to do a read/modify/write on the sdcard, thus speeding things up. The downside is you loose 1/25th of your storage capacity. You could store 25 lots of 20 bytes in one sector.
One thing’s for sure, you’re not the first to have this dilemma, so Google is your friend.
Ok. Kartman. I will consult with google.
Thanks