WMXZ-EU / uSDFS

uSD File system based on ELM-CHaN generic FAT system
28 stars 13 forks source link

How to avoid long writing time? #15

Open zajko3 opened 2 years ago

zajko3 commented 2 years ago

I use SD card as datalogger, but every 6 lines f_puts takes too long. I have changed example to reproduce it. See example.

https://drive.google.com/file/d/1ck2GOuDpOvRrhhMOZu5_sJptr5ijp3wr/view?usp=sharing

The serialprint output shows these times:

Create a new file HELLO14.TXT. Write some text lines. (Hello world!) 173 19 19 21 33 19 766 21 32 19 19 21 1087 19 19 21 32 18 1074 22 33 19 19 21 1086 ....

WMXZ-EU commented 2 years ago

that is what one should expect. data are buffered an written in junks of 512 bytes (minimal sector size) try to flush after every write, then all times should be similar, however far too slow for being useful.