You are here

Create an USB composite device with two VCP and one 'custom' interface | Cypress Semiconductor

Create an USB composite device with two VCP and one 'custom' interface

Summary: 10 Replies, Latest post by RA1981 on 22 Nov 2016 12:39 AM PST
Verified Answers: 3
Last post
Log in to post new comments.
RA1981's picture
User
223 posts

Hello,

 

I want to create an USB device with two virtual COM ports and one custom interface. Since a VCP consumes three endpoints, two endpoints will remain for the custom interface.

I want to control the custom interface by CYUSB.DLL which is part of the SuiteUSB package.

So, my question is if anybody can help how to setup the USB_FS component the right way and how to create the correct INF file.

 

Regards,

 

Ralf

ANKS's picture
Cypress Employee
89 posts

Several changes had to be made to the descriptor files, driver .inf files and API for the existing USBUART component

The component no longer automatically generates the required .inf files that are required. As such, if the Product String, Manufacturer String, VID or PID change, both .inf files must be manually edited

Editing the files is simple and can be done at the bottom of each descriptor file(IMAGE ATTACHED)

The descriptor file had to be edited manually .

Each CDC interface has an Interface Association Descriptor (IAD) to define the functionality of each CDC interface

 

Attachments: 
RA1981's picture
User
223 posts

Hello Anks,

 

thank you for the reply. However, it seems that there's a missunderstanding: The PSoC 5LP has eight endpoints (aside of the Control endpoint 0). Two CDCs will consume six endpoints, leaving two endpoints. What I want to have is two CDCs and one additional interface with an IN and an OUT endpoint, controllable by the CYUSB.DLL.

So, beside of your modifications of the INF file, I need to have:

  • the correct USBFS component setup for the remaining two endpoints (composite device?)
  • an INF file which binds the USBSER.SYS driver to the CDCs and the CYUSB.SYS to the other two endpoints

I already managed to have the two CDCs working (at least the first evaluation seems to work), but I've no idea how to setup the USBFS component correctly and how the INF file has to be modified.

 

Regards,

 

Ralf

HIMA's picture
Cypress Employee
205 posts

Hello

For a device that uses the iADs, the device is recognized with the PID-VID-and-MI (multiple interface number) combination of the interface in the inf file. Thus, the appropriate inf files have to be altered to include the MI number of the interface. For our example project, the vendor specific interface has MI_00 and the CDC class has MI_01. Thus, we will alter the inf file USBFS_1_CDC .inf to include the MI of the CDC class interface: From: %DESCRIPTION%=DriverInstall, USB\VID_04B4&PID_8051 To: %DESCRIPTION%=DriverInstall, USB\VID_04B4&PID_8051&MI_01

Similarly, the CyUSB.inf will be altered to include the VID and PID and MI of the vendor specific interface: From: %VID_XXXX&PID_XXXX.DeviceDesc%=CyUsb, USB\VID_XXXX&PID_XXXX To: %VID_04b4&PID_8051.DeviceDesc%=CyUsb, USB\VID_04b4&PID_8051&MI_00

The altered inf files can be used to point to the driver for a device. In case if you use the wrong inf file for a device, like using the MI_00 inf file for MI_01 interface. It will throw up the error saying that the inf file does not contain the information for your device

Thanks,

Hima

RA1981's picture
User
223 posts

Hello Hima,

 

thank you for the explanation. With the MI_xx entries, I got it to work (or at least I think so). Now, the remaining problem is the CYUSB.SYS file. My Win7 64-bit doesn't accept it because it's not signed.

So, is there a signed driver package available? Or do you know another way to get it to work? I'll also check if it would be possible to use WinUSB as driver - this wouldn't be my preferred solution, but...

 

Regards,

 

Ralf

HIMA's picture
Cypress Employee
205 posts

Hello

 CYUSB.SYS and the driver from http://www.cypress.com/documentation/software-and-drivers/ez-usb-fx3-sof... gives signed drivers. But if you are modifying the .inf file then the signature will get lost.

We do not have a signed driver suitable for multi interface.You will have to use Disable Driver Signature Enforcement which is not preferred.

Thanks,

Hima

RA1981's picture
User
223 posts

Hello Hima,

 

you're right, the signature will get lost in this case. I saw that the USBFS component supports Microsoft OS descriptors which enables access by WinUSB driver. So I assume that Cypress have tested this feature and hopefully can provide an example application?

 

Regards,

 

Ralf

ANKS's picture
Cypress Employee
89 posts

Presently,we dont have example project as we do not have a signed driver suitable for multi interface.

RA1981's picture
User
223 posts

Hi Anks,

 

are there any plans to release a generic driver with signature in the near future?

 

Regards,

 

Ralf

ANKS's picture
Cypress Employee
89 posts

Hello,

Currently I cant provide you with a definite timeline,but I can make request to other teams for that.

Sorry for the inconvenience.

 

RA1981's picture
User
223 posts

Hello Anks,

 

no inconvenience, currently I'm experimenting with LibUSB, but it would be nice if there was a out-of-the-box solution provided by Cypress. I think other users might also be interested.

 

Regards,

 

Ralf

Log in to post new comments.