Re: LibusbK Read Pipe timeout but all the (Pradeepa Senanayake)
diabolo <[email protected]> Mon, 28 Nov 2016 07:32:10 +0000 (UTC)
| Newsgroups | gmane.comp.lib.libusb.devel.windows |
|---|---|
| Message-ID | <[email protected]> |
Good that you figure out things ;) those are just usb basic
> One thing @diabolo said is incorrect though. The STM32F4 device is not a LS
(Low Speed) device. It is a inherently a FS (Full Speed) device, which can
even work as HS (High Speed) if we can connect separate PHY chip. Please
correct me if I'm wrong.
Right some STM32F4 device have dual usb controller 1st HS+FS capable with ext phy and second one FS only but some STM32F4 has FS onlyAnyway based on the issue it was obvious you were in case FS ;)
Note that to be 100% the packet size issue 64, 512 or 1024 could show even for SS or HS device plug behind a "slower" hub if device is ok to work in such configuration.
Typically if you plug an USB3.0 device on a USB 2 or usb 2 or 3 dev on usb 1 hub So both host s/w and device f/w shall take this into account it's ie take car of running config and look at ep descriptor instead of hardcoding value of 64,512 or 1024.
Le Dimanche 27 novembre 2016 13h09, "[email protected]" <[email protected]> a écrit :
Send Libusb-win32-devel mailing list submissions to
[email protected]
To subscribe or unsubscribe via the World Wide Web, visit
https://lists.sourceforge.net/lists/listinfo/libusb-win32-devel
or, via email, send a message with subject or body 'help' to
[email protected]
You can reach the person managing the list at
[email protected]
When replying, please edit your Subject line so it is more specific
than "Re: Contents of Libusb-win32-devel digest..."
Today's Topics:
1. Re: LibusbK Read Pipe timeout but all the (Pradeepa Senanayake)
----------------------------------------------------------------------
Message: 1
Date: Sun, 27 Nov 2016 07:07:35 +0530
From: Pradeepa Senanayake <[email protected]>
Subject: Re: [Libusb-win32-devel] LibusbK Read Pipe timeout but all
the
To: [email protected]
Message-ID:
<CA+1tQ72jZ3YT1E+qE4f3EDjnYw_2T7uaXNNqH7iBoABfRguF5g@mail.gmail.com>
Content-Type: text/plain; charset="utf-8"
Hello Guys,
Thank you very much for your answers. After going through the USB2.0
specification I figured out the changes I need to do.
USB2.0 Specification
Section 5.8.3: Bulk Transfer Packet Size Constraints
An endpoint must always transmit data payloads with a data field less than
or equal to the endpoint?s reported wMaxPacketSize value. When a bulk IRP
involves more data than can fit in one maximum-sized data payload, all data
payloads are required to be maximum size except for the last data payload,
which will contain the remaining data. A bulk transfer is complete when the
endpoint does one of the following:
? Has transferred exactly the amount of data expected
? Transfers a packet with a payload size less than wMaxPacketSize or
transfers a zero-length packet
This is the same thing diabolo suggested.
Now how handle this condition is, if the last packet I send to host is same
as wMaxPacketSize a commit another ZLP to inform the host to terminate the
bulk read.
One thing @diabolo said is incorrect though. The STM32F4 device is not a LS
(Low Speed) device. It is a inherently a FS (Full Speed) device, which can
even work as HS (High Speed) if we can connect separate PHY chip. Please
correct me if I'm wrong.
@Xiaofan's suggestions are also important. But they have already been
addressed in our source.
The issue is fixed now. Thanks again.
Best Regards,
Pradeepa Senanayake.
On Fri, Nov 25, 2016 at 6:45 PM, Xiaofan Chen <[email protected]> wrote:
> On Fri, Nov 25, 2016 at 9:11 PM, Xiaofan Chen <[email protected]> wrote:
> > On Fri, Nov 25, 2016 at 3:53 PM, diabolo <[email protected]> wrote:
> >> I use stm32 with libusbk back-end and I nevr seen this:
> >> But device f/w never send a multiple of 64 byte youc an do it by
> sending a
> >> zlp after data on te stm32 side
> >> but that's not convenient
> >> I always managed to send short packet and prefer to send one extra byte
> if
> >> payload is nx64 but if it the max size I ever send (ie 1024 in most of
> my
> >> app)
> >>
> >
> > Not so sure if setting the pipe policy will help.
> >
> > https://msdn.microsoft.com/en-us/library/windows/hardware/
> ff728833(v=vs.85).aspx
> >
> > http://libusbk.sourceforge.net/UsbK3/group__usbk.html#
> ga10f9e367e4241c431edc2cecd1bb827e
> > UsbK_SetPipePolicy
> >
> > SHORT_PACKET_TERMINATE (0x01)
> > PIPE_TRANSFER_TIMEOUT (0x03)
> >
> Also ALLOW_PARTIAL_READS (0x05).
>
> Ref: http://permalink.gmane.org/gmane.comp.lib.libusbx.devel/1245
>
> --
> Xiaofan
>
> ------------------------------------------------------------
> ------------------
> _______________________________________________
> Libusb-win32-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/libusb-win32-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
------------------------------
------------------------------------------------------------------------------
------------------------------
_______________________________________________
Libusb-win32-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/libusb-win32-devel
End of Libusb-win32-devel Digest, Vol 118, Issue 8
**************************************************
------------------------------------------------------------------------------
_______________________________________________
Libusb-win32-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/libusb-win32-devel