Why usbd ReadReqEP can not get a USB_EVT_OUT event?

Discussion created by lpcware Employee on Jun 15, 2016
Latest reply on Jun 18, 2016 by lpcware
Content originally posted in LPCWare by mengxp on Thu Jun 09 07:30:27 MST 2016
I want to create a multiple LUNs mass storage via ROM USBD API
But LPCOpen do not have this example because it use ROM USBD API
And USBD API do not support multiple LUNs
First I want to know how the ROMD MSC works and I can rewrite and improve it

I did a reverse engineering...
Dump the 64K rom from memory and save to rom.bin
And then work with IDA Pro. Got some source code for the ROM USBD MSC part...(see attachment rom_disasm.zip)

I rewrote the MSC code (see msc212_src.zip\usbd_msc.c)
It look very same with the rom part

But it is very strange with the SCSI_WRITE path
When Windows write a file to mass storage
It always loss some USB_EVT_OUT, It will hang the windows Write operation


Original Attachment has been moved to: rom_disasm.zip

Original Attachment has been moved to: msc212_src.zip