LPC1768_USB_MSC example changed to UFI protocol not working

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

LPC1768_USB_MSC example changed to UFI protocol not working

854 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by dinesh kumar.R on Tue Jul 16 07:55:23 MST 2013
hi,

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,
Dinesh.

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

Labels (1)
0 Kudos
Reply
1 Reply

750 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by wmues on Tue Jul 16 14:00:51 MST 2013
Hello,


Quote:
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.



This is a very slow data transfer because of the ping-pong effect.

Use only one endpoint. Let the host request the maximum data size, and send the actual amount of data from the device.
This is much more simply and faster!

For your problem with the missing 64 Bytes: have a look at the data toggle!

best regards

Wolfgang
0 Kudos
Reply