Closed ObligedTester closed 9 months ago
My issue seem to be exactly the same as this one: https://github.com/hathach/tinyusb/pull/2024
This looks to be already merged and what I can see is that I am already running the latest version of tinyUSB? Am I missing something else?
Looks like the pico-sdk is using a old version of tinyUSB. I will close this
Operating System
Linux
Board
Raspberry Pi Pico
Firmware
0.15.0
What happened ?
When using tuh_hid_set_report to set leds, like this sample:
It causes erratic behavior with two different keyboards.
I implemented a short program to toggle the leds while pressing a button. It initially seems to work. But after some toggles, seemingly a random amount, it causes the LEDs to stop toggling. Program is still running and key codes are sent back to the Pico.
However, disconnecting the cable causes "Panic" "Invalid speed" to show up, and after that its completely locked.
To try and diagnose I did a very crude routine that will just toggle the leds back and forth forever:
It causes the same behavior, after a random amount of toggles, the LEDs stop to respond. Keyboard still sends out key codes, and if I disconnect, it panics.
Disconnects and reconnect works normally before this happens.
How to reproduce ?
Use tuh_hid_set_report over and over to set LEDs on a keyboard
Debug Log as txt file (LOG/CFG_TUSB_DEBUG=2)
*** Ignore the values of 8xx for example in below log, its my own debug to see how many toggles have been done HID Set Report complete
HID Set Report: id = 0, type = 2, len = 1
[0:1] Class Request: 21 09 00 02 00 00 01 00
Transfer complete
on EP 00 with 8 bytes
Buffer complete
Transfer complete
on EP 00 with 1 bytes
[0:1] Control data:
0000: 01 |.|
Buffer complete
Transfer complete
on EP 80 with 0 bytes
HID Set Report complete
HID Set Report: id = 0, type = 2, len = 1
[0:1] Class Request: 21 09 00 02 00 00 01 00
8Transfer complete
02
on EP 00 with 8 bytes
Buffer complete
Transfer complete
on EP 00 with 1 bytes
[0:1] Control data:
0000: 02 |.|
Buffer complete
Transfer complete
on EP 80 with 0 bytes
HID Set Report complete
HID Set Report: id = 0, type = 2, len = 1
[0:1] Class Request: 21 09 00 02 00 00 01 00
HID Set Report: id = 0, type = 2, len = 1
tuh_hid_set_report 212: ASSERT FAILED
803
HID Set Report: id = 0, type = 2, len = 1
tuh_hid_set_report 212: ASSERT FAILED
HID Set Report: id = 0, type = 2, len = 1
tuh_hid_set_report 212: ASSERT FAILED
804
HID Set Report: id = 0, type = 2, len = 1
tuh_hid_set_report 212: ASSERT FAILED
HID Set Report: id = 0, type = 2, len = 1
tuh_hid_set_report 212: ASSERT FAILED
805
Screenshots
No response
I have checked existing issues, dicussion and documentation