STM32 high latency with usb hid game controller
Hi, I'm using an stm32f102 for making usb game controller (custom hid) with 29 buttons. The problem is, that the latency if I check on PC is feelable, too high. I made some tests to figure out the problem, but I don't have any idea yet. If I just report continiusly in the main while with 50ms delays, the indicator led on game controller window on pc just blinks with ~1s. So, seems, don't receive all of the data. If I increase this delay to 100ms it looks almost fine. I tried also to measure latency with camera (measure the time between click sound and the indicator on pc screen). For STM32 was around 5-6 frame with 30fps. I tried also with a good working game controller, it is 2-3 frame. If I report with every 1ms from systick, it's not better. I looked into the send report function and experienced, that the function sometimes returns with busy, even if data send is with 50ms interval. Why? :o In the MCU runs everything on 48MHz and in the test is just a gpio read and report. Any idea?
