| FORUM

FEDEVEL
Platform forum

USE DISCOUNT CODE
EXPERT30
TO SAVE $30 USD

USB HID/ Interrupt

shahjesal15 , 10-10-2024, 02:36 PM
Hey I am trying to develop a custom HID device that can send data to my computer at 2 ms, but i am not able to understand the documentation of properly so that problems I am running into right now are as follows

**1** . I cannot find a callback for IN, where I can send the data to the host from my device, right now I am sending the data using while loop using USBD_CUSTOM_HID_SendReport function.
**2**. My host/pc is not able to find the report descriptor when i do lsusb -vd xxxx:yyyy it says NOT AVAILABLE on report descriptors section
**3**. I have a doubt do i really need to create custom HID device can't I do all this USB interrupt endpoints on CDC class? Obviously I should be but I cannot find the tutorials to help me with all this.

Also, I am using HAL for this, I mean pretty obvious, Can someone help me with this?!
Mini , 10-10-2024, 02:43 PM
What data are you trying to send, what are you trying to achieve? Have you checked ST example codes? Maybe try polling mode first?
Mini , 10-10-2024, 02:44 PM
I also think perhaps try ST forums for ST related stuff? Might get more relevant help.
shahjesal15 , 10-10-2024, 02:44 PM
If you have a place where I can read these ST example codes please share
shahjesal15 , 10-10-2024, 02:44 PM
I am trying to send my IMU data to the PC so I want to tbe realtime and not bulk transfer
Mini , 10-10-2024, 02:45 PM
You have to search from their MCU packages. You haven't mentioned which board you are using? Which MCU?
shahjesal15 , 10-10-2024, 02:46 PM
STM32G474RE
Mini , 10-10-2024, 02:48 PM
development board? nucleo board? made yourself PCB?
shahjesal15 , 10-10-2024, 02:50 PM
nucleo board
Mini , 10-10-2024, 02:55 PM
nucleo boards doesn't have USB connections, only few newer ones do. So i think you have external USB socket? i will check their examples.
Mini , 10-10-2024, 03:02 PM
If you want to send IMU data I would use CDC.
Mini , 10-10-2024, 03:06 PM
I found ST has given some examples about your board.
Mini , 10-10-2024, 03:07 PM
I downloaded their G4 package.
QDrives , 10-10-2024, 07:20 PM
How much data is in each packet?
Use our interactive Discord forum to reply or ask new questions.
Discord invite
Discord forum link (after invitation)

Didn't find what you were looking for?