raspberry pi zero and SLOW USB HID

Hans Petter Selasky hps at selasky.org
Mon Jan 13 14:53:31 UTC 2020


On 2020-01-13 15:44, Wojciech Puchar wrote:
>>
>> Can you check the USB speed used between PC and RPI-zero ? Is one 
>> perhaps High-Speed, while the other is, Full-Speed?
>>
>> If yes, try to connect a high-speed USB hub in between.
>>
>> Output from:
>> usbconfig
>>
>>
>> You can also check using "usbdump -i usbus0 -s 65536" to see the 
>> actual timing of the commands.
>>

Hi,

I think I understand now.

> device is the same hardware with the same firmware. What causes larger 
> delays?

What you see is likely a manifestion of:

#define DWC_OTG_HOST_TIMER_RATE 10 /* ms */

Which is because we want save a little power polling the DWC OTG.

To avoid this:

USB transfers must be double buffered! That means you must submit two 
IN-endpoint jobs, instead of just one. Then the driver will understand 
there is more work to do, and not go to idlewait!

--HPS


More information about the freebsd-hackers mailing list