cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F042F6P4 Custom HID Class issue

FKopp.1
Associate II

I can generate code from all the USB classes and it all works expect for one.

custom hid class results in a "Driver Failed" message in windows.

In device manager is says: This device cannot start. (Code 10)

I have no clue what is causing this. I did not modify the code at all it is just based on the default configuration of the custom hid class. Anyone have any ideas?

It is a custom board, but I know its not the board because all the other classes work.

4 REPLIES 4
Lubos KOUDELKA
ST Employee

Hello,

Do you have already specific use case for custom HID class, or just testing?

Please check STM32 USB training, there is demonstrated creating of custom HID example also with modification of generated project to support higher packet size than default 2 bytes.

FKopp.1
Associate II

My ultimate goal is to send 64 byte packets back and forth to my desktop application.

The issue is I can't even get the default custom hid example to work. I tried the video and I also ended up with the same error.

I'm still not sure what is causing this error. All the other classes work.

FKopp.1
Associate II

turns out the default report descriptor doesn't work. Had to change that.

Imen.D
ST Employee

Hello @FKopp.1​ ,

Please follow this article USB device not recognized, with the solution is to increase the heap size, or configure the USB library to use static allocation.

  

Imen

When your question is answered, please close this topic by clicking "Accept as Solution".
Thanks
Imen