Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob

Binding Drivers to a USB-Serial Bridge Controller with a Custom VID/PID

Binding Drivers to a USB-Serial Bridge Controller with a Custom VID/PID

Anonymous
Not applicable

How to bind drivers to a USB-Serial Bridge Controller with a custom vendor identification number (VID) / product identification number (PID)?

 

The Infineon® USB-Serial Bridge Controller (CY7C65211/CY7C65213/CY7C65215) supports custom VID/PID. If the USB-Serial Bridge Controller is configured with a custom VID/PID, Infineon drivers do not automatically bind to the USB-Serial Bridge Controller.

To bind the drivers to the USB-Serial Bridge Controller configured with custom VID/PID, you need to change the driver INF files (cyusb3.inf and Infineon UsbAndBus.inf) with the custom VID and PID before binding these to the USB-Serial Bridge Controller device. These INF files are available for all operating systems.

The following example explains how to modify the INF files for Windows® 7 (64-bit) with the custom VID as 0x04B1 and custom PID as 0x0001. This example uses the CYUSBS236 DVK hardware.

 

1.1 Modify the Infineon Vendor Class Driver INF File

 

1. Open the cyusb3.inf file in a text editor such as Notepad. The Windows 7 (64-bit) Infineon vendor class driver (cysub3.inf) is located at “/driver/cyusb3/bin/win7/x64”; “” is the location where the SDK is installed.

2. Locate the [Device.NT] section in the file. This section contains entries for the devices supported by the driver.
 

Add an entry for the new device in the format:
  
   %VID_XXXX&PID_YYYY&MI_ZZ.DeviceDesc%=CyUsb3, USB\ VID_XXXX&PID_YYYY&MI_ZZ
  
   Where XXXX: Device Vendor ID (VID) in hexadecimal
   YYYY: Device Product ID (PID) in hexadecimal
   ZZ: Master Interface Number in hexadecimal
    

The Master interface number depends on the part number, mode, and protocol, as shown in Table 1.

Take for example, a CY7C65215-32LTXI part configured as a UART with the protocol set to communications device class (CDC) for both SCBs (Serial Communication Block, SCB0 and SCB1). By default, the Manufacturing Interface (Vendor Interface) for the device is enabled in all configurations of the device. Therefore, the device enumerates with three interfaces: two CDC and one Vendor interface.

Windows assigns interface numbers '00' and ‘02’ for both of the CDC interfaces and '04' for the Manufacturing Interface (Vendor Interface). Refer to Table 1 for the interface number.

 

Table 1. Interface Number Based on Part Number and SCB/SCBs Mode                               

      #       Part Number       SCB0       SCB1       MFG Interface MI#
      Mode       Protocol       MI#       Mode       Protocol       MI#
      1       CY7C65211-24LTXI       UART       CDC       00       NA       NA       NA       02
      UART/SPI/I2C       Vendor/PHDC       00       NA       NA       NA       01
      2       CY7C65213-32LTXI       UART       CDC       00       NA       NA       NA       02
      UART       Vendor/PHDC       00       NA       NA       NA       01
      3       CY7C65215-32LTXI       UART       CDC       00       UART       CDC       02       04
      UART       CDC       00       UART/SPI/I2C/JTAG       Vendor/PHDC       02       03
      UART/SPI/I2C       Vendor/PHDC       00       UART       CDC       01       03
      UART/SPI/I2C       Vendor/PHDC       00       UART/SPI/I2C/JTAG       Vendor/PHDC       01       02

 

Thus, for the above configuration, the entry in the cyusb3.inf file should be:

 %VID_04B1&PID_0001&MI_04.DeviceDesc%=CyUsb3, USB\ VID_04B1&PID_0001&MI_04

3. Copy the string created in step 3 and paste it under the sections [Device.NTx86] and [Device.NTamd64].

4. Locate the [Strings] section.

5. Add an entry in the following format under the [Strings] section:
 
   VID_XXXX&PID_YYYY&MI_ZZ.DeviceDesc=””
  

Where:

XXXX: Device Vendor ID (VID) in hexadecimal
YYYY: Device Product ID (PID) in hexadecimal
ZZ: Master Interface Number in hexadecimal (See the explanation in step 3 for more details)
  

String to be used by the Operating System for the device in the Device Manager, as shown in Figure 1.

In this example, the string is as follows:

VID_04B1&PID_0001&MI_04.DeviceDesc=“Custom USB-Serial vendor MFG”.

 

Figure 1. USB-Serial Device Enumeration With Modified String in the INF File

6. Save the INF file.

 

1.2 Modify the Infineon CDC Driver INF File

The Windows 7 (64-bit) Infineon CDC driver is located at “/driver/cyusbserial/bin/Win7/x64”; “” is the location where the SDK is installed.

1. Open the InfineonUsbAndBus.inf file in a text editor such as Notepad.

Locate the [Infineon] section. This section will be [Infineon.NTamd64] for INF files under the x64 directory. This section contains entries for devices supported by the driver.

2. Add an entry for the new device in the following format:
 
%USB\VID_XXXX&PID_YYYY&MI_ZZ.Desc% = InfineonUsb, USB\VID_XXXX&PID_YYYY&MI_ZZ
  
Use the following format for the INF files under the x64 directory:
  
%USB\VID_XXXX&PID_YYYY&MI_ZZ.Desc% = InfineonUsb.NTamd64, USB\VID_XXXX&PID_YYYY&MI_ZZ
  
Where:

XXXX: Device Vendor ID (VID) in hexadecimal

YYYY: Device Product ID (PID) in hexadecimal

ZZ: Master Interface Number in hexadecimal
  

For example:

%USB\VID_04B1&PID_0001&MI_00.Desc% = InfineonUsb, USB\VID_04B1&PID_0001f&MI_00
  
%USB\VID_04B1&PID_0001&MI_02.Desc% = InfineonUsb, USB\VID_04B1&PID_0001f&MI_02

 

3. Locate the [Strings] section.

4. Add an entry in the following format under the [Strings] section:
 
USB\VID_XXXX&PID_YYYY&MI_ZZ.Desc=””
  
For Example:

USB\VID_04B1&PID_0001&MI_00.Desc=" Custom USB Serial"
  
USB\VID_04B1&PID_0001&MI_02.Desc=" Custom USB Serial"

5. Save the INF file.

 

1.3 Modify the Port Name to Display in the Device Manager Ports (COM & LPT)

The Windows 7 (64-bit) Infineon CDC driver is located at “/driver/cyusbserial/bin/Win7/x64”; “” is the location where the SDK is installed.

1. Open the InfineonSerial.inf file in a text editor such as Notepad.

2. Locate the [Strings] section.

3. Add the port name string for the InfineonSerial device. For example:

 InfineonSerial = “USB Serial Port”

4. Save the INF file.

 

1.4 Program the USB-Serial Device With the New VID/PID

1. Use the Cypress USB-Serial Configuration Utility to set the VID/PID for the device. Click Program to program the new VID/PID (see Figure 2).
 

   Figure 2. Custom VID/PID in the Cypress USB-Serial Configuration Utility
  

2. Press the Reset switch on the CYUSBS236 board. After enumeration, the device will appear in the Device Manager as shown in Figure 3.
 

   Figure 3. USB-Serial Device Listing in Device Manager

1.5 Check the Manufacturing Interface

Check your Manufacturing Interface number from Table 1 based on the SCB configuration. Here, SCB0 and SCB1 are configured as UART-CDC, so the Manufacturing Interface number is ‘04’. To check the Manufacturing Interface of the USB-Serial device in the Device Manager, do the following:

1. In Device Manager, right-click on each USB-Serial (Dual Channel) device (as shown in Figure 3) and click Properties.

2. Go to the Details tab and select Hardware Ids in the Property drop-down menu. The Manufacturing Interface values are listed as shown in Figure 4 and Figure 5.
 

Figure 4. IDs for Manufacturing Interface of USB-Serial Device (MI#4)

  
   
 Figure 5. IDs for Manufacturing Interface of USB-Serial Device (MI#0)
   
 

 

In this example, the third USB Serial (Dual Channel) device has the Manufacturing Interface #4. Hardware Ids are displayed as USB\VID_04B1&PID_0001&MI_04 for the third USB Serial (Dual Channel) device as displayed in the Device Manager.

 

1.6 Bind the Vendor Class Driver to the USB-Serial Device

Bind the vendor class driver (Cyusb3.sys) to the USB-Serial device with the Manufacturing Interface or Vendor Interface if the SCB is configured for SPI or I2C. Do the following:

1. In the Device Manager, right-click on the USB-Serial (Dual Channel) device (See Figure 3) and select Update Driver Software.

2. Click Browse my computer for driver software as shown in Figure 6.
 

Figure 6. Updating the Driver Software

 

3. Click the Let me pick from a list of device drivers on my computer option as shown in Figure 7.
 

Figure 7. Select Modified INF File from Computer
  

 

4. Select the device type as Universal Serial Bus Controller as shown in Figure 8. Click Next.
 

   Figure 8. Selection of Device Type

 

5. Click Have Disk as shown in Figure 9.
 

   Figure 9. Selecting the Modified INF File From the Disk

6. Click Browse and select the modified cyusb3.inf file as shown in Figure 10, and click OK.
 

   Figure 10. Select the Modified INF File

7. Click Next. Click Yes if any warning appears on screen.

This binds the updated driver to the device. You can now verify this in the Device Manager.

8. Repeat the same procedure for the other two USB-Serial CDC interfaces shown in the Device Manager to bind the CDC driver (CypressUSBandBus.inf) to these interfaces.

The device is now ready to use. You can verify this in the Device Manager, as shown in Figure 11 and Figure 12.

Figure 11. USB-Serial Device Enumeration After Successful Binding of Driver (Part 1)

Figure 12. USB-Serial Device Enumeration After Successful Binding of Driver (Part 2)

0 Likes
4755 Views