Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong data toggle and missing handshake #2741

Open
1 task done
moc32 opened this issue Jul 29, 2024 · 1 comment
Open
1 task done

Wrong data toggle and missing handshake #2741

moc32 opened this issue Jul 29, 2024 · 1 comment
Labels

Comments

@moc32
Copy link

moc32 commented Jul 29, 2024

Operating System

Others

Board

PIC0 RP2040

Firmware

examples/host_bare_api
ex_host_bare_api.zip

What happened ?

On pico rp2040 host, control endpoint get blocked after a random period of time. The status stage is missing and no more control_xfer is possible.

On a specific roline mouse, enumeration fails with wrong data toggle from the device. The USB_INTS_ERROR_DATA_SEQ_BITS is not handled in the current version of the sdk. The driver just panics.

How to reproduce ?

Compile the attached modified firmware and connect a keyboad. The scrolllock and capslock LED will blink (250ms). After a random period of time the blinking stops and the control endpoint is blocked.
For the data toggling issue, connect a roline mouse and enumeration will fail.

image

Debug Log as txt file (LOG/CFG_TUSB_DEBUG=2)

protocol=00, interface=00, report=00
[0:1] Class Request: 21 09 00 02 00 00 01 00
hw_endpoint_init dev 1 ep 0 out xfer 0
dev 1 ep 0 out setup buffer @ 0x50100180
endpoint control (0x50100100) <- 0xa0000180
Transfer complete
Sent setup packet
on EP 00 with 8 bytes
hcd_edpt_xfer dev_addr 1, ep_addr 0x0, len 1
Prepare BufCtrl: [0] = 0xf401 [1] = 0x0000
Buffer complete
buf_status 0x00000001
Single Buffered: ep_ctrl = A0000180
Sync BufCtrl: [0] = 0x6001 [1] = 0x0000
Short packet on buffer 0 with 1 bytes
Completed transfer of 1 bytes on ep 0 out
Transfer complete
on EP 00 with 1 bytes
[0:1] Control data:
0000: 00 |.|
hcd_edpt_xfer dev_addr 1, ep_addr 0x80, len 0
hw_endpoint_init dev 1 ep 0 in xfer 0
dev 1 ep 0 in setup buffer @ 0x50100180
endpoint control (0x50100100) <- 0xa0000180
Prepare BufCtrl: [0] = 0x7400 [1] = 0x0000
protocol=00, interface=00, report=06
Failed to set report
protocol=00, interface=00, report=00
Failed to set report
protocol=00, interface=00, report=06
Failed to set report
protocol=00, interface=00, report=00
Failed to set report
protocol=00, interface=00, report=06
Failed to set report
protocol=00, interface=00, report=00

Screenshots

image

Ellisys output on control endpoint transfer failure

I have checked existing issues, dicussion and documentation

  • I confirm I have checked existing issues, dicussion and documentation.
@moc32 moc32 added the Bug 🐞 label Jul 29, 2024
@moc32
Copy link
Author

moc32 commented Jul 29, 2024

@kilograham this might be an issue with the rp2040 usb host controller. TinyUSB host does not handle the wrong data toggle error but when I connect the same device to other host controllers including Windows, I don't get such an error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant