Whats the problem with USB Host HID
Hello.
I have problem using STM32 USB Host HID. I`m stuck in the USBH_Process() function in usbh_core.c, or its better to say stuck in USBH_HID_Process() function in usbh_hid.c file. I am trying to connect a USB keyboard to my own designed stm32f407zgt6 board, code is generated through STM32CubeMX v5.2.1 with package software v1.24.2 and I work with IAR IDE v8. I`ve made a project just same as (https://www.youtube.com/watch?v=Co4ChSgVSek), but with different pins pack, every time I connect the keyboard the MCU gets the descriptors, but it never gets data from keyboard. I only used one keyboard model, also searched a lot about the problem. I`ve tried what pavel.a said in (https://community.st.com/s/question/0D50X00009XkZ4KSAV/usb-host), nothing changed, when I printf() the logs on uart, at first I get:
after some "HOST_ENUMERATION"s it recognizes keyboard:
and at last the process goes on like the:
for ever "HOST_CLASS..." from USBH_Process() fuction in usbh_core.c and then "HID_GET_DATA" from USBH_HID_Process() function in usbh_hid.c.
Some place in USBH_HID_Process() function in the "HID_GET_DATA:" part of the switch_case, there is a line "HID_Handle->state = HID_POLL;", but right after this line the "HID_Handle->state" equals to "HID_GET_DATA" (see the forth picture) again very automatically.
So the user defined void USBH_HID_EventCallback(USBH_HandleTypeDef *phost) function is never called to read the data.
Somebody please tell me whats going on here? I`ve also seen from my searchs that there would be a problem with boot type and request type of keyboards.
