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