cancel
Showing results for 
Search instead for 
Did you mean: 

HID - CDC Composite inf file on Windows 10

DRega.1
Associate III

I am trying to learn about implementing a composite usb device. I have seen that Cube does not provide a ready solution for this and so I downloaded the USB FW library along with the examples. There is an example for a HID-CDC composite.

I have seen that subject this raises it's head very frequently and I have read all the posts but cannot find the answer.

My problem is that the example instructs us to use the inf file provided by ST Virtual comport driver (I know that ST recommend not using this anymore); to modify it to include interface information. When I attempt to update the driver it fails. I think it may be due to Windows 10 (64 bit) finding a discrepancy with the inf file and the as delivered cat file.

How can I get round this. Can I sign it myself? I am new to the subject and don't really understand the inf handling.

10 REPLIES 10

Hello @DRega.1​ ,

I didn't understand well what is the issue. Is it a signature issue? Could you provide me with screen shots of the failure and steps to reproduce it?

BeST regards,

Walid

Hi Walid
I saw that people were reporting a lot of problems creating a composite device via Cube/HAL. So, in order to test a composite out I downloaded the USB/STD Peripheral library
en.stm32_f105-07_f2_f4_usb-host-device_lib.zip. These examples target eval boards. I only have a STM32F469i-Disco board so I adapted them.
I have attached a cut down version for you to look at.
After reflashing or power up the composite device works ok, see HID_CDC_Test1.png. If the USB cable is removed and re-inserted
the hid device no longer works and the CDC does not appear at all. A restart will cure this. see HID_CDC_Test2.png.
Regards
Dave Regan

Sorry, but I don't see anything attached.

DRega.1
Associate III

Sorry. I did it directly from gmail. Don't know why they were not attached.

DRega.1
Associate III

And ...

DRega.1
Associate III

and ...

DRega.1
Associate III

It would only accept a single attachment at a time!!!

Pavel A.
Evangelist III

@DRega.1​ Generally you don't want to modify Windows or 3rd party INF files, because this will cause signing errors and you don't want to deal with that.

If you are learning about USB, better use Linux, there it is possible to debug all drivers and parts of the OS.

--pa

DRega.1
Associate III

I managed to get this working. I discovered that usbd_cdc_Init() (...\Libraries\STM32_USB_Device_Library\Class\cdc\src\usbd_cdc_core.c) was overwriting the device descriptor. It didn't matter if it was a standalone CDC but after first initialisation of a composite device the overwrite occurs.