LPC1768_USB_MSC example changed to UFI protocol not working

Discussion created by lpcware Employee on Jun 15, 2016
Latest reply on Jun 15, 2016 by lpcware
Content originally posted in LPCWare by dinesh kumar.R on Tue Jul 16 07:55:23 MST 2013

We are using the LPC1768 board with NXP sample code, USB_MEM for our requirement. USB device has to send the data to host. Here we are configuring 3 endpoints.  BULK_IN(5), BULK_IN(8) and  BULK_OUT(2).

Modified the bInterfaceSubClass from "MSC_SUBCLASS_SCSI " to " MSC_SUBCLASS_UFI ". Enabled USB_DMA option for all the three endpoint by #define USB_DMA_EP 0x00020810.

Endpoint 5 is used to send the status information to host. In 5th Endpoint(status), we will specify the how much data, we are going to send data in Endpoint 8. Based on the status, host will generate the requests for the data. End point 8 is used to send the data to host system.

Now,we are sending 1KB data at a time from USB device controller.We are using the Ellisys USB Analyzer to analysis the data and in 1KB of data, we are missing the one 64 bytes data or multiples of 64 bytes data.(MAX_PACKET_SIZE is 64 bytes). The loss of data is observed in start, middle and end of data. In actual requirement, we will send 400 KB of data  and 1KB at time.

we are transferring 1k of data and checking USBEoTIntSt register ( END OF TRANSFER) in USB_ISR for our specific endpoint 8 and setting a flag (like data_complete). When data_complete flag sets then we will transfer next 1k data.

TEST_CASE 1:  we are maintaining the static buffer of 1 KB ( ref. Original_data_buffer.txt). when we transferring continuous 1kB of data. data loss is in first and last 64 bytes.(ref Static_data.bmp). when only 1KB of data transferred, the loss is in start of data but end is completing properly  .(ref one_transfer.bmp).

Thanks & regards,

Original Attachment has been moved to: Original_Data_Buffer.txt.zip