Skip to main content
VDodi.1
Associate III
Jan 23, 2023 10:57 AM UTC
Solved

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

..

This topic has been closed for replies.
Jaroslav JANOS
Jaroslav JANOSBest answer
ST Employee
Feb 10, 2023 3:15 PM UTC

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.

8 replies

Jaroslav JANOS
ST Employee
Jan 26, 2023 12:26 PM UTC

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.
VDodi.1
VDodi.1Author
Associate III
Jan 27, 2023 10:43 AM UTC

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 ??

Piranha
Principal III
Jan 27, 2023 3:11 AM UTC

Yes, and here are several different examples:

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

VDodi.1
VDodi.1Author
Associate III
Jan 27, 2023 10:43 AM UTC

thank you