- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I implemented stream_in with CyAPI.lib. After calling WaitForXfer(), BulkInEndPtEndPt->LastError is equal to ERROR_IO_PENDING(997). I don't quite understand why this is.
TEST_METHOD(Test_StreamIn)
{
CCyUSBDevice *USBDevice = new CCyUSBDevice(NULL);
OVERLAPPED inOvLap;
inOvLap.hEvent = CreateEvent(NULL, false, false, L"CYUSB_IN");
unsigned char inBuf[128];
ZeroMemory(inBuf, 128);
unsigned char buffer[128];
LONG length = 128;
UCHAR *inContext = USBDevice->BulkInEndPt->BeginDataXfer(inBuf, length, &inOvLap);
USBDevice->BulkInEndPt->WaitForXfer(&inOvLap, 100);
USBDevice->BulkInEndPt->FinishDataXfer(inBuf, length, &inOvLap, inContext);
CloseHandle(inOvLap.hEvent);
}
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
Error Code 997 occurs if there is no data to be read from the IN endpoint of the device. Please let us know the device being used and the mode of operation (AUTO or MANUAL).
Reasons for Error Code 997:
1. The expected bytes of data have not been transferred within the timeout period.
2. The endpoint sends NAK/ STALL.
Best regards,
Srinath S
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
Error Code 997 occurs if there is no data to be read from the IN endpoint of the device. Please let us know the device being used and the mode of operation (AUTO or MANUAL).
Reasons for Error Code 997:
1. The expected bytes of data have not been transferred within the timeout period.
2. The endpoint sends NAK/ STALL.
Best regards,
Srinath S
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
HI
I get the example code from AN65974 - Designing with the EZ-USB® FX3™ Slave FIFO Interface.Program the FX3 device with the firmware image file, SF_streamIN.img.Program the Xilinx FPGA with the file, slavefifo2b_fpga_top.bit. Set the switch SW8 011. Cypress Streamer Utility works fine,but my test (Test_StreamIn)has been given an error.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
- Can you please increase the TimeOut parameter on the WaitForXfer() API and check if the error still persists?
Best regards,
Srinath S