why fatfs f_write has unstable speed?
Hi
i'm using an own made stm32h750vb board to write on sd memory using fatfs third party lib from cubemx.
the problem i encountered is unstable function of f_write. sometimes it takes more time to write.
to measure the time f_write takes i set a gpio pin before and after it, and monitored the pin by oscilloscope.
in my code i generate a timer interrupt to write on certain times on sd memory and compare to gpio pin i set to measure f_write speed.
in picture up signal shows gpio pin set before f_write and reset after f_write, and down signal edges show timer interrupt that f_write starts on this transition.
as you see at first picture(left one) sometimes f_write takes more time. result is for writing a 16k block size dummy data, 400mhz cpu clock, 50mhz sdmmc clock with 4bit interface,and a sdhc microsd 4gig c4 memory.
i tried different data block size(512byte,1Kb,4Kb,8Kb,32Kb) with different swmmc clock speed from 25mhz to 100mhz), but the problem still exists.
i tried to investigate if the problem is with f_wrie function or bsp_sd_driver. i put the gpio test pin before and after hal_write_sd_blocks function that interfacing with sdmmc in lower level of f_write and it seems to work fine (secondpic) and inconsistency of write to sd is related to something in f_write function!
please help.
