cancel
Showing results for 
Search instead for 
Did you mean: 

Is it actually Possible to define multiple distinct HID joysticks on one interface? I have Nucleo F439ZI Board

VDodi.1
Associate III
 
1 ACCEPTED SOLUTION

Accepted Solutions

Hi,

first of all, having 2 configurations won't solve your problem. As mentioned in the training, configurations are used for different "power modes" of the USB device. What you need is to have 1 device descriptor, 1 configuration descriptor and 2 interface descriptors (assuming you are going the "composite device way").

If you are using ST Middleware, you need to change interface descriptors in usbd_hid.c file, and also other functions, e. g. for reporting and enumeration of the device.

BR,

Jaroslav

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

View solution in original post

8 REPLIES 8
Jaroslav JANOS
ST Employee

Hi @VDodi.1​ ,

yes, this is possible either with multiple HID Top-level collections (if you mean under the term "interface" the logical USB interface) or with a composite device (multiple USB interfaces, but still one device = one HW interface).

BR,

Jaroslav

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

Piranha
Chief II

Yes, and here are several different examples:

https://github.com/hathach/tinyusb/tree/master/examples/device

thanks, actually i have configure my nucleo board as device and pc as host and created joystick controller interface. now i have to do multiple joystick controller with one device.

can you help how to send my data from device to pc as host ??

thank you

Hi,

if you are starting with USB, I would recommend you some tutorials, e. g. this. There you can learn the general principles as well as how to send data to the host device. Or check the examples @Piranha​ posted.

If you have some specific question about sending the data, please share more details.

BR,

Jaroslav

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

Hi,

I had check this STM32 USB training - 04 USB descriptors video. as i understand i can interface 1 device descriptor and two configuration at different time.

Can you help where should i have to edit in configuration descriptor file and other file also ??

Hi,

first of all, having 2 configurations won't solve your problem. As mentioned in the training, configurations are used for different "power modes" of the USB device. What you need is to have 1 device descriptor, 1 configuration descriptor and 2 interface descriptors (assuming you are going the "composite device way").

If you are using ST Middleware, you need to change interface descriptors in usbd_hid.c file, and also other functions, e. g. for reporting and enumeration of the device.

BR,

Jaroslav

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

Hi,

Thank You, i have created two game controller but i need different controller name to recognize my pc.

0693W00000YAgEBQA1.png