Hi Sol, thank you for your response
I've already tried as you suggest, adding (for example) a LED blinking in the USB_APP_DATA_RECEIVED case in my Bulk_Transaction_Callback function, but I think this event is never sent because LED does not blink.
So I've also put a breakpoint in the usb_msc.c function (USB_Service_Bulk_Out) sending this event, but it's never asserted.
I think the problem is in file usb_msc.c: remaining transfer size is decremented (line 446) after the event transmission (line 422), so USB_APP_DATA_RECEIVED can never be asserted.
I moved
msc_obj_ptr->param_callback.callback(USB_APP_DATA_RECEIVED, (void*)&bulk_out_recv, msc_obj_ptr->param_callback.arg);
on line 474, when transfer is complete and the end of data phase is completed, and now it works. Could it be rigth?
Now transfer is correctly done and reported by the previous event, but with a "sd dir" I cannot see the new file in the memory. Is there a way to refresh (maybe) filesystem to see the new file?
Thank you
Mirco