cancel
Showing results for 
Search instead for 
Did you mean: 

USB host for full-speed HID

alexborysevych9
Associate II
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
4 REPLIES 4
rosarium
Associate II
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
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

@alexborysevych9 

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

sukhdeepmankoo
Associate II

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?