You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To the best of my knowledge, Zephyr supports at least one high-speed USB controller, the one in the STM32F723 SoC. The PR #10977 adds the USB driver for the SAM E70 SoC, which also support high-speed USB.
I have done some basic testing of the USB device stack in high-speed mode. So far it seems most of the issues are on the descriptor side. The control and interrupt endpoints work fine, but the bulk endpoints do not always work, as we usually define their size to be 64 bytes, while they should be 512 bytes in high-speed mode. This leads to issues like this one with the Linux kernel:
usb 2-2.2: new high-speed USB device number 9 using xhci_hcd
usb 2-2.2: config 1 interface 0 altsetting 0 bulk endpoint 0x81 has invalid maxpacket 64
usb 2-2.2: config 1 interface 0 altsetting 0 bulk endpoint 0x2 has invalid maxpacket 64
usb 2-2.2: New USB device found, idVendor=2fe3, idProduct=0100, bcdDevice= 0.11
usb 2-2.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
usb 2-2.2: Product: Zephyr MSC sample
usb 2-2.2: Manufacturer: ZEPHYR
usb 2-2.2: SerialNumber: 0.01
In practice it works or not depending on the host, I got it working on a host with an EHCI controller, but I experienced data loss with an XHCI controller. On the other hand, after increasing the endpoints size to 512 bytes (by changing the limits in the Kconfig code), all work as expected.
I believe that the way to fix that is to fix the descriptors just after the USB reset, when the connection speed is known. The bulk descriptors should be reduced to 64 bytes. That is probably also the good place to fix the bInterval values, and provide a Device Qualifier Descriptor.
Now I am not fully sure how to re-architecture the code to be able to do that. I am therefore opening this issue in the hope to get some guidelines. I guess @finikorg and @jfischer-phytec-iot could help there.
The text was updated successfully, but these errors were encountered:
To the best of my knowledge, Zephyr supports at least one high-speed USB controller, the one in the STM32F723 SoC. The PR #10977 adds the USB driver for the SAM E70 SoC, which also support high-speed USB.
I have done some basic testing of the USB device stack in high-speed mode. So far it seems most of the issues are on the descriptor side. The control and interrupt endpoints work fine, but the bulk endpoints do not always work, as we usually define their size to be 64 bytes, while they should be 512 bytes in high-speed mode. This leads to issues like this one with the Linux kernel:
In practice it works or not depending on the host, I got it working on a host with an EHCI controller, but I experienced data loss with an XHCI controller. On the other hand, after increasing the endpoints size to 512 bytes (by changing the limits in the Kconfig code), all work as expected.
I believe that the way to fix that is to fix the descriptors just after the USB reset, when the connection speed is known. The bulk descriptors should be reduced to 64 bytes. That is probably also the good place to fix the
bInterval
values, and provide a Device Qualifier Descriptor.Now I am not fully sure how to re-architecture the code to be able to do that. I am therefore opening this issue in the hope to get some guidelines. I guess @finikorg and @jfischer-phytec-iot could help there.
The text was updated successfully, but these errors were encountered: