STM32F4 USB HID parameters

ChibiOS public support forum for all topics not covered by a specific support forum.

Moderators: RoccoMarco, lbednarz, tfAteba

Post Reply
Tommino
Posts: 7
Joined: Thu Sep 20, 2012 1:16 pm

STM32F4 USB HID parameters

Post 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
User avatar
Giovanni
Site Admin
Posts: 14891
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 996 times

Re: STM32F4 USB HID parameters

Post 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
Tommino
Posts: 7
Joined: Thu Sep 20, 2012 1:16 pm

Re: STM32F4 USB HID parameters

Post 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
Post Reply