AnsweredAssumed Answered

STM32F072 Discovery: USB Custom HID slowness

Question asked by vocke.sander on Nov 5, 2016
Latest reply on Jan 19, 2018 by Jeanne Joly
Hello everyone,

I am trying to get off the ground with the STM32F072 in USB Custom HID mode.

For starters, I followed this simple tutorial: https://www.youtube.com/watch?v=xufZyQf4O7Y

It goes through the following basic steps:
- set up a STM32Cube project with USB in Custom HID
- adjust the report descriptor and increase packet size to 64
- set up a main loop that sends packets every 500ms

That all works fine. Then I wanted to do a speed test to see whether the STM can use the USB FS speed fully (which should be able to send a 64B packet every ms). So I removed the HAL_Delay(500); call.

The result: only 32 packets are now sent per second. I confirmed this with my own application based on hidapi, and also with hidapi's general-purpose "test receiver".

Is it normal that the rate of HID transfer is this limited? Should I be able to reach 1000 packets/second? If so, does anyone have a clue what may be limiting the rate in this case? 

Thanks in any case!

Outcomes