-
Notifications
You must be signed in to change notification settings - Fork 58
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
USB Sending Report Not Working #25
Comments
I discovered USB HID keyboard not working properly. Changing the title to "USB Sending Report not working". Tested code: uint8_t test[8] = { 0, };
while(1) {
test[2] = 0x11;
USBD_HID_SendReport(&hUsbDeviceFS, (uint8_t *)&test, sizeof(test));
HAL_Delay(30);
test[2] = 0x00;
USBD_HID_SendReport(&hUsbDeviceFS, (uint8_t *)&test, sizeof(test));
HAL_Delay(1000);
} |
Doing tutorial 09.7_USB HID device - custom device lab - solution.zip (reference video) on firmware 1.12.1 fails, but works on 1.12.0: HID_terminal.exe works two times (sends and recieves data by clicking on Send-Button) but fails reproducible after second time with an error "Operation timed out". |
My issue: Only first two HID URBs are getting through, after applying this patch on firmware 1.12.1 it seems to make it work just fine. But I have no clue why. Could you please check on this? |
@ch-f Thanks for your comment. |
The code there seems obviously wrong, it does:
There might be other traps like this or you might need the bottom part after the 'else if' of (ep->type != EP_TYPE_BULK)... Would be nice if an official from ST could shed light? |
Hi.
I'm using STM32L053R8T6 based custom PCB development board and testing USB custom HID.
the code
does not works and returned value
errno
is1
which representsUSBD_BUSY
.I used USB HID Demonstrator v1.0.2 tool to monitor it's communication status.
I solved this problem with simply downgrade firmware package version from 1.12.1 to 1.12.0 and it works as expected.
USBD_CUSTOM_HID_SendReport()
function returns0
(USBD_OK
)Please check this issue.
Thanks.
The text was updated successfully, but these errors were encountered: