Hi all, I'm using FatFs ChaN R011a and STM32F4 HOST library 2.2.0 relasead on 2015 to develop a mass storage class usb data logger. I noticed a strange behaviour flushing the logging data on some usb key devices. I normally save the logging data on a buffer of 4096B, then when it becomes full, I call first "f_write" and aftewards "f_sync" function, but in some cases this last one takes too much time to finish (pin toggling to measure the time). The "f_sync" delay is not regular and it takes up to 800 ms for some usb key. I didn't find any file system errors and these functions return always FR_OK.
my settings clock: STM32F4 core clock = 42MHz, USB clock = 48MHz (PLL).
According to you, could it only depend by the kind of usb key interfaced or by other? In the file "usbh_msc_fatfs.c", the case CTRL_SYNC of disk_ioctl is not implemented, is it correct? Why?
Thank you, Fabio