cancel
Showing results for 
Search instead for 
Did you mean: 

Hello, I am using two USBs (one FS and one HS) as HID hosts. Both USBs work and read data from keyboard correctly but only when using 1 keyboard. When using two keyboards at the same time, many multiple presses are registered. Any idea why?

VKrča.1
Associate

To clarify:

  • MCU:  STM32F205
  • Code: HAL generated by Cube
  • Multiple presses registered by function: USBH_HID_EventCallback
  • 2x USB (FS,HS). both HID. both HOST

Problem:

  • Many multiple presses registered when two keyboards are connected at the same time (happens for both of them) - not desired
  • When any keyboard connected alone to one of USBs 1 press is only registered once - desired behaviour

Thanks for any ideas and help!

1 REPLY 1

> Any idea why?

> Code: HAL generated by Cube

The keyboard driver is probably buggy and does not have properly instantiated multiple sets of state variables.

I am not going to dig deep here as I'm not interested in Cube, just casually met this once and my impressions are described in https://community.st.com/s/question/0D50X00009XkZ4KSAV/usb-host (can't give direct link to post courtesy of the crap salesforce ST insists on using instead of proper forum software; you have to click through "More" at the bottom as the thread is longer than 10 posts and my post is at the "3rd page").

JW