Re: Cypress GPIF: Bulk read error



On Feb 26, 6:29 am, Gavin Brewer <g...@xxxxxxxxxx> wrote:

I am working with a Cypress EZ-USB FX2 prototyping board connected to an
Omnivision camera chip that spits out data far faster than the GPIF's
Endpoint buffers are programmed to handle. The Keil uVision compiler is
used for the firmware and libusb 0.1.12.0 for enumerating the USB
devices at the PC end.

I am using Control Requests, (or Vendor Requests in GPIF parlance) to
communicate with the development board and the Camera chip. These work
find for turning LEDs on and off and sending the Camera chip to sleep
etc. However, when I attempt the bulk read transer below, I get the
following error message:

Bulk Read Vendor Request failed (-22).
usb_submit_async: submitting request failed, win error: The parameter is
incorrect.

I found a similar problem trying to talk to an fx2 using libusb-win32.

I found that it was necessary to call usb_set_configuration() before
calling
usb_claim_interface(), otherwise I would get one of these paramater is
incorrect errors.

You can find which configuration you want from the libusb test
program. I think maybe it was configuration 1... don't remember
exactly.

I suspect that this call may not be necessary in some versions of
libusb (or maybe under linux) as I had started with allegedly working
code... but it didn't work for me until I added that - I could use
vendor commands to program the chip, but then couldn't talk to it via
the bulk transfers.

.