Skip to main content
DRega.1
Associate III
June 25, 2021
Question

HID - CDC Composite inf file on Windows 10

  • June 25, 2021
  • 10 replies
  • 4299 views

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.

This topic has been closed for replies.

10 replies

Walid ZRELLI
Visitor II
June 30, 2021

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

DRega.1
DRega.1Author
Associate III
July 1, 2021
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
Walid ZRELLI
Visitor II
July 2, 2021

Sorry, but I don't see anything attached.

DRega.1
DRega.1Author
Associate III
July 3, 2021

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

DRega.1
DRega.1Author
Associate III
July 3, 2021

And ...

DRega.1
DRega.1Author
Associate III
July 3, 2021

and ...

DRega.1
DRega.1Author
Associate III
July 3, 2021

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

Pavel A.
July 3, 2021

@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
DRega.1Author
Associate III
July 7, 2021

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.

Walid ZRELLI
Visitor II
July 7, 2021

Good news :smiling_face_with_smiling_eyes: thanks for the explanation.