Skip to main content
Visitor II
March 12, 2024
Question

USB Host HID Class library implementation issue in stm32f756zg

  • March 12, 2024
  • 1 reply
  • 2219 views

Hello,

I am trying to implement USB host hid class library with stm32F756zg mcu to interface the usb keyboard. I have implemented the uart also to sent the pressed key on the uart to identify it.

There is one issue i am observing that it is not sending any key pressed on the uart. The USB keyboard is enumerated but it is stuck in the if (USBH_LL_GetURBState(phost, HID_Handle->InPipe) == USBH_URB_STALL) and does not call the callback function when key is pressed.

I have tried the patch (HID_Handle->state = HID_SYNC; instead of the HID_Handle->state = HID_IDLE;) suggested in the forums but it is not working.

Please suggest what is the issue in the USB host library and how to get the usb keyboard working with STMF7 MCU.

 

I have tried the same USB host example with STM32F429ZI mcu and the same USB host hid class library is working with this mcu and key is detected and sent on uart.

    This topic has been closed for replies.

    1 reply

    Technical Moderator
    March 12, 2024

    Hello @shefu  and welcome to ST community

    Would you share minimum of software to reproduce the issue on reference board?

     
    shefuAuthor
    Visitor II
    March 12, 2024

    Hello,

    Please find the attached reference example code. I have only modified the main file to interface the USB keyboard. Other files are remained same when creating the USB example.