cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F446 USB HOST HID is not able to read joystick

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?

If I use china made joystick, I am getting USBH_NOT_SUPPORTED on setting HID set protocol.

case HID_REQ_SET_PROTOCOL:
/* set protocol */
classReqStatus = USBH_HID_SetProtocol(phost, 0U);
if (classReqStatus == USBH_OK)
{
HID_Handle->ctl_state = HID_REQ_IDLE;

/* all requests performed*/
phost->pUser(phost, HOST_USER_CLASS_ACTIVE);
status = USBH_OK;
}
else if (classReqStatus == USBH_NOT_SUPPORTED)
{
USBH_ErrLog("Control error: HID: Device Set protocol request failed");
status = USBH_FAIL;
}
else
{
/* .. */
}
break;

Can some help me to resolve this issue?

0 REPLIES 0