Skip to main content
alexborysevych9
Associate II
December 17, 2011
Question

USB host for full-speed HID

Posted on December 17, 2011 at 18:26

Has anyone try to implement USB host for full-speed HID joystick (like Logitech)?

I try to use code from STM32F105/7 and STM32F2xx Host and device library (UM1021). It works fine with low-speed joystick (noname), but I haven't any responses from Logitech gamepad. Both are HID, both send interrupt packets. But in full-speed case interrupt callback USB_OTG_USBH_handle_rx_qlvl_ISR always set variable grxsts.b.pktsts to 0.

#usb-host #usb-interrupts #hid
This topic has been closed for replies.

4 replies

rosarium
Associate
December 19, 2011
Posted on December 19, 2011 at 07:30

ok what exact problem you are facing with Logitech game pad. Does it enumerate as USB HID FS device.

Do you have any USB traces with that gamepad connected to the host???

alexborysevych9
Associate II
December 23, 2011
Posted on December 23, 2011 at 15:54

Hello pila.rosarium.001! Thank you so much for your reply.

Yes, enumeration always complited successful with DeviceSpeed = HPRT0_PRTSPD_FULL_SPEED (i.e. as FS device).

I havn't any data logs, but I can be sure that data is sent by the joystick after calling USBH_InterruptReceiveData. USB FIFO interrupt is triggered, but reading the register GRXSTSP gives grxsts.b.pktsts = 0.

Hobbyist
Associate II
March 7, 2019

@alexborysevych9 

How are you able to read usb Joystick using stm32 host library?

Associate
June 20, 2023

I am getting not able to read usb joystick(Logitech ThrustMaster), callback called to 2 times only. after that there is no call.

void USBH_HID_EventCallback(USBH_HandleTypeDef *phost){

}

How to resolve this issue, i am using repository https://github.com/dong-higenis/stm32f401ccu_usb_host_ps3_joystick  , which created by some other user. can someone help to resolve this issue? If you are able to read, can you provide me link to example code?