hello everyone.
i am debuging the usb host controller with the am3359 based on the example usb_host_msc from the StarterWare02_00_00_07.i have a usb camera connected to the am3359 . And now the host can get the device / interface /endpoint Descriptors,then i want get some data from the camera via bulk-in pipe, so called the function:
USBHCDPipeRead(pCAMDevice->ulIndex,pCAMDevice->ulBulkInPipe, data,length);
i create the function USBHCAMOpen() which look like USBHMSCOpen() and the parameters pCAMDevice->ulBulkInPipe came from the function USBHCDPipeAllocSize();
The data is the buffer pointer and the length is 360960 Byte.
The problem is i always get the PIPE_ERROR after call the USBHCDPipeRead(). And then exit the function from the flowing code.
if(USB_TIMEOUT_DISABLE!=g_sUSBHCD[ulIndex].USBHTimeOut.Value.slNonEP0)
{
if(IsTimerElapsed())
{
ulTimer = 0;
g_sUSBHCD[ulIndex].USBINPipes[ulPipeIdx].eState = PIPE_ERROR;
g_sUSBHCD[ulIndex].USBHTimeOut.Status.slNonEP0 = (1<<((ulPipeIdx + 1)+16));
break;
}
}
the usb camera works well connected to my PC(linux-fedora18) under the libusb open source library.
what is wrong with me? or miss someing?
Any help appreciated,
Thanks.