uSDFS icon indicating copy to clipboard operation
uSDFS copied to clipboard

How to avoid long writing time?

Open zajko3 opened this issue 4 years ago • 1 comments

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 ....

zajko3 avatar Apr 05 '22 15:04 zajko3

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.

WMXZ-EU avatar Apr 05 '22 17:04 WMXZ-EU