I am using 52259 with mqx 4.0.1. I was originally doing an fprintf followed by an fflush for every write to a file. I am doing a write every 50ms. After several hours of run-time, my USB device just randomly detaches mid write and creates an unhandled exception. I thought maybe the fflush was causing it, so I tried to get rid of that and change to using
param = MFS_WRITE_THROUGH_CACHE;
(usb_fs_ptr->FS_FD_PTR, IO_IOCTL_SET_WRITE_CACHE_MODE, ¶m);
For some reason now the writes to file are taking almost 10x longer than they were when I was using fflush. Any ideas why? Is that normal?