USB bulk transfers (Host requests handling)

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

USB bulk transfers (Host requests handling)

1,209 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Linas on Thu Sep 27 07:41:52 MST 2012
I am working with LPC1769. I am trying to workout USB bulk transfers (IN and OUT endpoints handling).

Once Host first issues (IN request) I can't get any data. No interrupt is set (debugging with LPCXpresso).
In case Host issues (OUT request) I got interrupt and my BulkOut function is called.

Host IN requests starts working in case my BulkOut(void) functions includes USB_WriteEP(IN, data, 64). Then
IN requests starts working and BulkIn function is called.

LibUsb drivers are used for PC application.

What are the solutions and causes? Maybe I have missed something.

void BulkOut(void) {


  //Read data from Host
  numBytesRead = USB_ReadEP(BULK_EP_OUT, &BulkBufIn[0]);
  
  //In case I include here USB_WriteEP() BULK_IN interrupts starts working.


}


void BulkIn(void) {

  //Write data to Host
  USB_WriteEP (BULK_EP_IN, &BulkBufOut[0], 64);

}


Best regards,

Linas
Labels (1)
0 Kudos
5 Replies

872 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by harpreet singh on Mon Aug 18 02:55:35 MST 2014
Dears,
I am working on LPC2378 using Keil UVision4 compiler. I wants to communicate my LPC2378 board with PC using USB .
Is it possible to achieve such high speed communication with HID deriver ?
or need Bulk transfer mode.
How  can I use the bulk transfer mode and what's deriver need at PC end to the  capture data ?
0 Kudos

872 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Linas on Fri Sep 28 04:17:28 MST 2012
Thanks Daniel for the advise.

I have already looked to this example. Also, read some more other sources regarding Bulk communications.

So, if there will be some more questions I will ask later.

Best,

Linas
0 Kudos

872 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Daniel Widyanto on Fri Sep 28 00:40:17 MST 2012
Hi Linas,

Mass storage is using 2 BULK endpoints (BULK IN and BULK OUT endpoints). If you are looking for USB bulk, then that's the perfect demo code to see how the BULK endpoints are working.

0 Kudos

872 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Linas on Thu Sep 27 23:41:15 MST 2012
Hi Daniel,


The thing is that I have not found any bulk data communications example.

So, I am trying to make it myself. I will check your solution.

I am using USB stack provided by Keil, Version: V1.20 for NXP devices only. 

Maybe do you have some examples regarding USB bulk communications?

I have found only examples for standard USB classes (HID, Mass storage, audio) and etc.



Best regards,

Linas
0 Kudos

872 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Daniel Widyanto on Thu Sep 27 20:14:30 MST 2012
Hi Linas,

Which USB stack that you are using ?

It seems like your endpoint is only set to interrupt when the complete data is transferred (there's option in USBEpIntSt where NACK from LPC17xx IN endpoint will generate interrupt or not).

In this case, then you need to put some data into the IN endpoint buffer first before receiving IN endpoint interrupt.

Regards,
-daniel

0 Kudos