Author Topic: Stm32F4 USb HID keyboard help needed  (Read 1466 times)

0 Members and 1 Guest are viewing this topic.

Offline cncjerryTopic starter

  • Supporter
  • ****
  • Posts: 1283
Stm32F4 USb HID keyboard help needed
« on: November 08, 2018, 02:31:43 am »
I am adding keyboard functionality to my RC-28 encoder project using a STM32F469i board.  I created a set of composite HID descriptors. Prior to combining the keyboard and encoder I made sure both worked correctly.  I had to modify the CubeMx code to ensure the report descriptors were returned correctly and have been using wireshark to trace the USB flows and all looks ok except for the following.

When I pressed a key prior to combining the descriptors, I got the key pretty much immediately.   Now the PC buffers 443 single characters if I send only one in the HID report and 6 times this number if I send 6 characters at once in the keyboard HID report.  I'm not using any modifiers.  I am sending a release key of all zeros after each key but it is acting like it is stuck. If I lengthen the delay to 10ms after the press before release I will see roughly twice this  amount.  I  see only one keypress in the trace followed 5ms later by the release so it isn't my code being delayed.  This USB HID stuff is very complicated but I think I understand it now.  It must be my code because it worked before the combination into a HID collection. No errors in device manager,etc.  I know the buffering and keyboard repeat delay is handled by the PC but cant figure this out. I've been posting on the ST boards, got some help, but not for this one.  Clearly the config descriptor or HID report descriptor is wrong or scrambled but I cant find it.

Ideas?  Any way to trace the input keyboard driver? 

Thanks

Jerry
 

Offline w4ghv

  • Newbie
  • Posts: 1
  • Country: us
Re: Stm32F4 USb HID keyboard help needed
« Reply #1 on: November 18, 2019, 01:52:37 am »
Ouch! I just sent you a note about this, but just read this post fully. This seems way more complex than I expected.
I think I had a suitable circuit going with Arduino, but thought the STM32 would be 'more fun'.
Now I'm wondering.
Hopefully I can get it going under Arduino. :)
73, Bo W4GHV
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf