0

I have an STM32f042 and I have loaded the example Custom HID firmware from the STM32F0x2_USB-FS-Device_Lib V1.0.0.

I then did some simple write transfers sending just one or two bytes, and watched the response using wireshark.

After doing about ten transfers it looks like time for a transfer to complete ranges between 15ms and 31ms with the average being somewhere around 25ms. I've been told in the past that a single fast USB transaction should take around 1ms so this feels to me to be about an order of magnitude slow.

Is this a normal time for this chip? (And how would I go about figuring out what "normal" is?) Or is this abnormally slow?

Indigo
  • 962
  • 1
  • 8
  • 23
  • 2
    This question is off-topic because it is not within the scope of questions appropriate for this site, as defined in [What topics can I ask about here?](//stackoverflow.com/help/on-topic) Please also see: [What types of questions should I avoid asking?](//stackoverflow.com/help/dont-ask) You may be able to get help on [another Stack Exchange site](//stackexchange.com/sites#name). However, be sure to read each site's on-topic page prior to posting. – Makyen Jan 24 '18 at 06:34
  • 1
    It *might* fit on [electronics.se]. However, be sure to *read [that site's on-topic page](https://electronics.stackexchange.com/help/on-topic) prior to posting*. – Makyen Jan 24 '18 at 06:39

1 Answers1

2

Please check configuration descriptor in usbd_customhid.c file. The polling interval for each endpoint set but parameter: bInterval, the default value in examples(as I remember) set to 0x20(32ms) try to change it!

denis krasutski
  • 618
  • 4
  • 9