@ Honken - Thanks for sharing… I am using the same in production. Will do some investigation… I found it slow too sometimes but did not pay much attention to it. I swapped the card for a class 6 card and found it almost 2 times as fast…
The way you’re going to delve deeper is to show us minimal repro code and process to do this. That way someone else can also attempt the repro and validate.
The only thing I have with SD card’s that’s is slow is the time needed to mount it to the USB client, sometimes just pop’s in, sometimes takes 30-60sec.
Writing speed is alway’s good, also in debug mode.
I’m experiencing similar issue as well. I was testing 32GB SD card (Sandisk Ultra) with 4KB writes on G120 and most writes take 30-40ms but there are few writes which take 300ms+ (worst was 435ms!!). If I increase writes to eg. 16KB they can take up to a second to write.
EDIT: Just did additional tests with writing exactly 16KB. Highest speed was 90ms, worst speed was 1.1175s.
i have to discus and without any promises yet but are you willing to sell some of your work so that we don’t have to re-invent the wheel if we want to implement FatFS too?