[prev in list] [next in list] [prev in thread] [next in thread] 

List:       libusb-devel
Subject:    Re: [Libusb-devel] Bulk transfers from EP1 stop working after
From:       Tim Roberts <timr () probo ! com>
Date:       2010-05-19 22:17:34
Message-ID: 4BF4637E.6030901 () probo ! com
[Download RAW message or body]

Jean Richard wrote:
> I have access to the USB firmware, but I didn't write it myself.  It was 
> developped by another person, along with a windows utility to talk to it 
> using the Cypress library and I'm working to get it running on Linux 
> now.  I don't get the same kind of failure with the windows utility 
> though, so I was thinking I was doing something wrong.  The style of the 
> source code using the cypress code is pretty distant from using libusb 
> in C, so I've been having trouble locating my problem.
>
> As I understand it, EP2 and EP8 is connected to an FPGA that we have on 
> the board and it's handled by Cypress' EZ USB hardware.  EP0 and EP1 are 
> handled by the 8051 micro in the USB chip.
>   

Well, your terminology is a bit confused.  You have Cypress FX2 chip,
which includes both the USB device and the 8051.  The FX2 doesn't handle
anything automatically.  It's possible that your FPGA is driving EP2 and
EP8 using the "slave FIFO" mode of the FX2, where data passes into the
endpoint buffers without involving firmware, but certainly all of EP0
and EP1 are done in the firmware.

Also remember there's nothing special about EP1.  The FX2 has a special
buffer for it, but to USB it's just like all of the other endpoints. 
EP0 is a little special, since that's where all control messages go.

> Here's the output of lsusb -v for the device. (By the way, we do have a 
> VID/PID to use for this.. just haven't gotten to adding it to the USB 
> firmware.)
>   

Your configuration is invalid.  On a high-speed device, all bulk
endpoints MUST have a max packet size of 512 bytes.  There is no other
choice.  Your endpoints 01 and 81 (at 64 bytes) and 02 (at 1024 bytes)
are in violation of the protocol.

Note that the max packet size does not have to match the buffer size in
the FX2.  That's just an implementation detail.  However, you must
change your descriptors to use 512 byte packets.

-- 
Tim Roberts, timr@probo.com
Providenza & Boekelheide, Inc.


------------------------------------------------------------------------------

_______________________________________________
Libusb-devel mailing list
Libusb-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libusb-devel
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic