Page 1 of 1

STM32F4 USB HID parameters

Posted: Tue Oct 09, 2012 7:15 pm
by Tommino
Hello,

is possible to see somewhere USB configuration for a HID device? I tried to change VID/PID, deviceclass/subclass and interface class/subclass in STM32F4Discovery Demo and under Windows I have seen new two HID devices - perhaps because we have 2 Endpoints in that CDC demo. The problem is that I did it in very dirty way and maybe not all fields were correct. When I look at original STM example, the tables with config seems to be different as in ChibiOS.
Maybe question why I need HID device. It's quite easy on Windows to access USB directly w/o any driver and full flexibility (HidD_GetHidGuid, SetupDiGetClassDevs, SetupDiGetDeviceInterfaceDetail, CreateFile, ... 8-) )
Next question, do we use DMA in USB driver or we copy data via software?

Thanks a lot!

Regards,
Tommino

Re: STM32F4 USB HID parameters

Posted: Tue Oct 09, 2012 7:23 pm
by Giovanni
Hi,

I don't have a HID example but you can use the same tables present in the ST demo, even the tables in the CDC demo are taken from the ST demo with minimal changes. The tables are declared differently but the content is the same.

In the OTG driver data is copied by a dedicated thread running at lowest priority so the process does not add latency to higher priority threads even without using a DMA (actually a DMA would probably interfere much more).

Giovanni

Re: STM32F4 USB HID parameters

Posted: Tue Oct 09, 2012 7:36 pm
by Tommino
Hi Giovanni,

thanks for really quick response! I will have a look at it again and when I have working tables and Windows part, I will publish it here.

Tommino