Skip to main content
MDeva.1
Associate III
Dec 23, 2021 7:47 AM UTC
Question

We can access different types of data using HID usb class?

Hello,

I am working on Nucleo-H745ZIQ board. I have make to the interfacing between the one application and stm32, they communication using the USB peripheral in HS. I am confuse between the two class USB custome HID and HID .Which class I have to use Custome HID or HID and after that I can able to send and receive different types of data?Can someone help to resolve this!!!

This topic has been closed for replies.

6 replies

Walid ZRELLI
Visitor II
Jan 4, 2022 10:00 AM UTC

Hello @MDeva.1​ ,

Can you explain what you mean by receiving different types of data?

As well, can you describe the use case?

Otherwise, take a look at this video. It may be helpful.

BeST Regards,

Walid

MDeva.1
MDeva.1Author
Associate III
Jan 4, 2022 10:15 AM UTC

My board is connected to GuI application using the USB port and I get the data from GUI a​ND I have to give that data to DAC and after that I have generate w/f.

1. Which USB class I have to use?

2. What types of data I can access eg. Int, float, array, frame

Walid ZRELLI
Visitor II
Jan 4, 2022 10:36 AM UTC

hello @MDeva.1​ 

You can use the USB CDC class which allows you to send arbitrary data.

BeST Regards,

Walid

MDeva.1
MDeva.1Author
Associate III
Jan 4, 2022 11:49 AM UTC

What is difference between customs hid and Hid class​

Walid ZRELLI
Visitor II
Jan 4, 2022 1:42 PM UTC

In the STM32Cube and STM32_USB_Device_Library context, the HID class device provides a fixed mouse/keyboard applications, where the HID report is predefined.

Otherwise, the Custom HID option allows you to have an application-defined report descriptor, and to use both IN and OUT endpoints. Both are limited by their fixed max endpoint size and period.

MDeva.1
MDeva.1Author
Associate III
Jan 4, 2022 1:44 PM UTC

If I have to communicate with the application which install in PC and my board is connected through ​USB to PC and I have to communicate with application and baked then which USB class I have to use