cancel
Showing results for 
Search instead for 
Did you mean: 

HID IN data transmission frequency is only about 10 times per second

arilink
Associate III

I used ThreadX and USBX in the project. When I only use USB as a HID Device, STM32 can transmit data to the PC 1000 times per second, but when I use USB as a CDC+HID composite device, the transmission frequency of HID is greatly reduced. Will increasing the CDC only 10 times per second affect the transmission frequency of HID? Why is there such a phenomenon?

6 REPLIES 6
Pavel A.
Evangelist III

Check the HID polling interval parameter in the device HID descriptor.

HID polling interval parameter is 1ms

/*amended by moderation, please do not share your personal information in your posts*/  

Try 11 ms (while waiting for better answers)

The delay of 11ms is too long to meet the design requirements. The strange thing is that the same program works very well on STM32H7, but it won’t work on STM32F1.

Note that all functions and endpoints of a composite device share one hub port's bandwidth.

IIRC minimal valid polling interval of full-speed HID device is not 1 ms.

Is your STM32H7 USB controller in high speed mode?

My STM32H7 is also using full speed (FS) mode. I used the same FIFO configuration for STM32H7 and STM32F1
Monitoring by Bus Hound STM32H7 and STM32F1 can transmit data at a speed of nearly 1000 times per second when only HID is working
Monitoring by Bus Hound STM32H7 can still transmit data at a speed of nearly 1000 times per second when working in CDC+HID composite mode. STM32F1 can only transmit data at a speed of 10 times per second when working in CDC+HID composite mode.
The only reason that can be explained is that the CDC of STM32F1 conflicts with HID, which leads to this phenomenon.
shiliutao@arilink.com