AN144
CP210
X
/ C P 2 11
X
D
E V I C E
C
U S T O M I Z A T I O N
G
UIDE
Relevant Devices
This application note applies to the following devices:
CP2101, CP2102, CP2103, CP2104, CP2105, CP2110, CP2112
1. Introduction
This document is intended for developers creating products based on the CP210x/CP211x USB Bridge Controllers.
It provides information about obtaining a Vendor ID (VID) and Product ID (PID) for a CP210x/CP211x product and
describes the steps necessary for customizing the device descriptors contained in the CP210x/CP211x
programmable area. Refer to
www.silabs.com
for the latest revisions of this document and other application notes
related to the CP210x/CP211x device families.
2. Obtaining a VID and PID
Each device on a USB bus must have a unique VID, PID, and Serial Number combination. Vendor IDs are owned
by the vendor company and assigned by the USB Implementers Forum (USB-IF) only. Details about obtaining a
unique VID can be found at
www.usb.org/developers/vendor.
To obtain the right to license the USB-IF logo, you must register your product's VID and PID with USB-IF and
submit your product to the USB-IF Compliance Program. USB-IF Compliance Program details are available at
www.usb.org/developers/compliance.
Once your product is certified, you can add it to the USB-IF Integrators List,
and you can also use the “Certified USB” logo on your product.
If you do not wish to license the USB-IF logo for your product, you can use the default Silicon Laboratories VID
along with a unique PID. To obtain a unique PID for your CP210x/CP211x-based product, visit
http://www.silabs.com/RequestPID.
Having a unique PID reduces the chances that another device with the same
VID, PID, and Serial Number will appear on the same USB bus.
3. Customizing Driver Installations, CP210x Custom Setup Utility
(CP2101/2/3/4/5)
The driver installation is customizable by modifying certain sections of the hardware installation files (.inf). The
strings contained in the .inf files affect what is displayed in the “Found New Hardware Wizard” dialogs, Device
Manager, and the Registry. Refer to “AN220: USB Driver Customization” for more details.
Note:
Any changes to the Windows
®
installation .inf files will require new Windows Hardware Quality Labs (WHQL) tests.
Rev. 2.0 10/10
Copyright © 2010 by Silicon Laboratories
AN144
AN144
4. Customizing Device Descriptors and Other Configurable Options
The descriptors and other configurable options of the devices in the CP210x/CP211x families are modifiable using
the following Windows programs.
Table 1. Device Customization Programs
Device
CP2101/2/3/4/5
CP2110
CP2112
Program
CP210xSetIDs.exe
CP2110SetIDs.exe
CP2112SetIDs.exe
These programs are included in the software zip file in this application note. How to use these programs is
described in more detail in the following sections.
CP210xSetIDs
uses the Windows Host API functions implemented by
CP210xManufacturing.DLL.
The Host API
functions give read/write access to the descriptors contained in programmable areas of a connected device.
Another option is implementing a custom application using the Host API and
CP210xManufacturing.DLL
suited to
the individual needs of a particular production environment.
Both
CP2110SetIDs
and
CP2112SetIDs
use the SLABHIDDevice.dll and the customization interface specified in
their respective application notes, “AN433: CP2110 HID to UART API Specification” and “AN496: CP2112 HID
USB to SMBus API Specification”.
The descriptors can also be set in the factory at production time for large orders. Contact your Silicon Laboratories
sales representative for details.
2
Rev. 2.0
AN144
4.1. Customizing Device Descriptors Using CP210xSetIDs.exe (CP2101/2/3/4/5)
CP210xSetIDs.exe
is an example program that uses the CP210x Host API Functions implemented by
CP210xManufacturing.DLL.
The program window is shown in Figure 1.
CP210xSetIDs.exe
demonstrates the
method of accessing and changing the descriptors contained in the connected device's programmable area. To
use
CP210xSetIDs.exe,
it is necessary to have the devices connected and have the unmodified device drivers that
shipped with the original CP210x kit installed. The customized device driver installation files that contain the VID
and PID values should also be installed. For information on creating customized device drivers for the CP210x,
refer to “AN220: USB Driver Customization.” The default driver must be installed so that the CP210x device with
the default factory settings appears in the device list. The customized drivers will be needed after the device IDs
have been changed and the CP210x device is reset.
All CP210x devices are programmed in the same manner using the CP210xSetIDs.exe tool, but each parameter
on the One-Time-Programmable (OTP) devices can only be programmed one time. The CP2101, CP2102, and
CP2103 parameters can be reprogrammed multiple times using the CP210xSetIDs.exe utility, but the CP2104 and
CP2105 parameters can only be programmed once using the CP210xSetIDs.exe utility. After the CP2104 and
CP2105 have been programmed once, the CP210xSetIDs.exe utility can be run, but the new values will not be
programmed into the device.
Before running
CP210xSetIDs.exe,
copy
CP210xManufacturing.DLL
into the \windows, \winnt, or \system32
directory, the directory containing the executable, or any directory in the “Path” environment variable.
Figure 1. CP210xSetIDs Example Application
Rev. 2.0
3
AN144
When
CP210xSetIDs.exe
is launched, the program searches the Windows registry for any CP210x devices
attached to the PC. The full path information for all of the devices found is inserted into the “Select Device” drop-
down list, and the first device is selected automatically.
CP210xSetIDs.exe
then queries information from the
selected device using the CP210x Host API functions and fills in the values for each of the seven selectable fields
of the application. When a new device is selected from the list, the fields will be updated with information from the
most recently selected device.
To change one or more of the values, click on the checkbox to the left of the field and enter the new value. Once
the new values have been entered, click on the “Program Device” button.
The values entered are subject to the following limitations:
1.
VID—Four
hexadecimal digits.
2.
PID—Four
hexadecimal digits.
3.
Max. Power—Two
hexadecimal digits with maximum setting of 250 (the value is in 2 mA units).
4.
Serial Number—Any
sequence of up to 63 characters (CP2101/2/3/4) or 16 characters (CP2105).
5.
Product String—Any
sequence of up to 126 characters (CP2101/2/3/4) or 47 characters (CP2105).
6.
Release Version—Each
field is a decimal number value 0–99.
7.
Flush Buffers—Selects
which buffers to empty upon the Open and Close events. Applies to CP2104/5 devices
only.
8.
Interface 0 and 1 Strings—Any
sequence of up to 32 characters. Applies to CP2105 only.
9.
Device Mode—Selects
the operating mode for the Enhanced and Standard interfaces. Applies to CP2105 only.
Notes:
1.
Avoid connecting more than one device containing the same VID, PID, and serial number combination.
2.
When the serial number of a CP210x device is changed and the device is reset by calling the Host API function
CP210x_Reset(),
the device will reenumerate, and the device driver will be installed.
3.
The serial number and product string are automatically converted to Unicode strings before programming.
4
Rev. 2.0
AN144
4.2. Customizing Device Descriptors using
CP2110SetIDs.exe
(CP2110)
CP2110SetIDs.exe
is an example program that uses the CP2110 API Functions implemented by
SLABHIDtoUART.dll.
The program window is shown in Figure 2.
CP2110SetIDs.exe
demonstrates the method of
accessing and changing the descriptors contained in the connected device's programmable area.
The various customizable fields of the CP2110 devices are only programmable one time using the program. After
the fields are programmed once,
CP2110SetIDs
can access the fields, but it is not able to reprogram them.
Figure 2. CP2110SetIDs Application
When
CP2110SetIDs.exe
is launched, the program searches for any CP2110 devices attached to the PC. The full
path information for all of the devices found is inserted into the "Device Path" drop-down list, and the first device is
selected automatically. The application then queries information from the selected device using the API functions
and fills in the values for each of the selectable fields of the application. When a new device is selected from the
list, the fields are updated with information from the most recently selected device.
To change one or more of the values, click on the checkbox to the left of the field and enter the new value. Once
the new values are entered, click on the "Program Device" button. Once a field is programmed, the checkbox is no
longer selectable, indicating that the field is locked from further programming.
Rev. 2.0
5