NEWS: the project created from me is taken by the folder \Freescale USB Stack v4.1.1\ProcessorExpert\Examples\Device\MSD\USB_MSD_DEVICE_MKL25Z128_PEx and changed for use the SdCard instead simulate a RAM_DISK. This original code is :
case USB_MSC_DEVICE_WRITE_REQUEST :
/* copy data from USb buffer to Storage device
(Called before after recv_data on BULK OUT endpoints)*/
lba_data_ptr = (PTR_LBA_APP_STRUCT)val;
/* read data from driver buffer to mass storage device */
#if RAM_DISK_APP
USB_memcopy(lba_data_ptr->buff_ptr,
g_disk.storage_disk + lba_data_ptr->offset,
lba_data_ptr->size);
#elif SD_CARD_APP
SD_Write_Block(lba_data_ptr);
#endif
where RAM_DISK_APP is declared then USB_memcopy is the function that will be executed. Putting a breakpoint on this the problem is that this is never called. There is then a bug with this library because USB_MSC_DEVICE_WRITE_REQUEST is never called. Someone can help me ?