AN434: CP2110/4 Interface Specification

AN434
CP2110/4 I NTERFACE S PECIFICATION
1. Introduction
The Silicon Laboratories CP2110/4 is a USB device that adheres to the USB-defined Human Interface Device
class specification. HIDs communicate with a USB host through the use of reports. This document is a specification
for the reports supported by the CP2110/4 and it also describes the configurable parameters.
Silicon Laboratories provides dynamic libraries that adhere to this specification for the following operating systems:
Windows
XP/Vista/7/8
OS X
Linux
This document is intended for the following:
Mac
Users
who are using an operating system that is not supported by the dynamic libraries and need to
implement their own interface.
Users who want to integrate the device interface into their application.
User Application
(Implementing CP2110/4
Interface Specification)
HID Driver
(Provided by OS)
USB Root Hub
USB
PC
CP2114 USB
CP2110 HIDCP2110 HID-UART
BridgeDigital
Audio-I2S
UART Bridge
Audio Bridge
External RS-232
External RS-232
Transceiveroror UART
External RS-232 Transceiver
Transceiver or UART
Circuitry/DAC/CODEC
UART Circuitry
Circuitry
Hardware
Figure 1. System Architecture Diagram
Rev. 0.4 10/12
Copyright © 2012 by Silicon Laboratories
AN434
AN434
1.1. Additional Documentation
1. CP2110 data sheet:
http://www.silabs.com/products/interface/usbtouart
2. CP2114 data sheet:
http://www.silabs.com/CP2114
3. Dynamic libraries that adhere to this CP2110/4 Interface specification are available for the following
operating systems:
Windows
7/Vista/XP
Mac OS X
AN433: CP2110 HID-to-UART API Specification documents the Windows DLL. The document and libraries are
available at:
www.silabs.com/appnotes
4. HID Device Class Definition:
http://www.usb.org/developers/hidpage/
1.2. Default Values for Parameters Stored in PROM
Table 1 and Table 2 list the default values for the one-time configurable parameters stored in the PROM of the
CP2110. Table 3 and Table 4 list the default values for the one-time configurable parameters stored in the PROM of
the CP2114.
Table 1. CP2110 Default PROM Values
Parameter
Default Value
VID
0x10C4
PID
0xEA80
Power
50 (100 mA)
Power Mode
Bus Powered
Flush Buffers
Flush TX/RX on Open
Manufacturing String
Silicon Laboratories Inc.
Product String
CP2110 HID USB-to-UART Bridge
Serial String
0001
Lock Bytes
0xFF0F*
*Note: The lock bytes indicate which parameters have already been programmed.
2
Rev. 0.4
AN434
Table 2. CP2110 Default Pin Settings
Parameter
Default Value
GPIO0_CLK
0x00 (GPIO–Input)
GPIO1_RTS
0x03 (RTS)
GPIO2_CTS
0x03 (CTS)
GPIO3_RS485
0x03 (RS-485 Transceiver Control)
GPIO4_TXT
0x03 (TX Toggle)
GPIO5_RXT
0x03 (RX Toggle)
GPIO6
0x00 (GPIO–Input)
GPIO7
0x00 (GPIO–Input)
GPIO8
0x02 (GPIO–Push-pull Output)
GPIO9
0x02 (GPIO–Push-pull Output)
TX
0x02 (Push-Pull)
Suspend
0x02 (Push-Pull)
Suspend
0x02 (Push-Pull)
Suspend Latch Mode
0x0000
Suspend Latch Value
0x0000
RS485 Level
0x01 (Active High)
Clock Out Divider
0x00 (Divide by 1)
Rev. 0.4
3
AN434
Table 3. Default PROM Values
Parameter
Default Value
VID
0x10C4
PID
0xEAB0
Power
50 (100 mA)
Power Mode
Bus Powered
Release Version (Major)
1
Release Version (Minor)
0
Flush Buffers
Flush TX/RX on Open
Manufacturing String
Silicon Laboratories
Product String
CP2114 USB-to-Audio Bridge
Serial String
(Unique randomized serial number)
Lock Bytes
0xFF0F*
*Note: The lock bytes indicate which parameters have already been programmed.
Table 4. Default Pin Settings
Pin Name or Parameter
Default Value and Function
GPIO.0_RMUTE
0x03 (Record Mute control)
GPIO.1_PMUTE
0x03 (Playback Mute control)
GPIO.2_VOL-
0x03 (Volume Decrease control)
GPIO.3_VOL+
0x03 (Volume Increase control)
GPIO.4_RMUTELED
0x03 (Record Mute indicator)
GPIO.5_TXT_DACSEL0
0x04 (DAC Select control)
GPIO.6_RXT_DACSEL1
0x04 (DAC Select control)
GPIO.7_RTS_DACSEL2
0x04 (DAC Select control)
GPIO.8_CTS_DACSEL3
0x04 (DAC Select control)
GPIO.9_CLKOUT
0x03 (Clock Output)
GPIO.10_TX
0x04 (TX output, push-pull)
GPIO.11_RX
0x03 (RX input)
SUSPEND
0x02 (push-pull output)
SUSPEND BAR (?:show bar) 0x02 (push-pull output)
4
SUSPEND Latch Value
0x0000
SUSPEND Latch Mode
0x0000
Clock Output Divider
0x00 (Divide by 1)
Rev. 0.4
AN434
1.3. Default UART Configuration
Table 5 and Table 6 show the default settings for the UART. Upon a device power-up or reset, these settings are
used.
Table 5. UART Transfer Settings
Parameter
Default Value
UART Enable
0x00 (Disabled)
Baud Rate
115200
Parity
0x00 (None)
Flow Control
0x00 (None)
Data Bits
0x08 (8 bits)
Stop Bits
0x01 (1 bit)
Table 6. Other UART Settings
Parameter
Default Value
TX FIFO
0x00 (TX FIFO empty)
RX FIFO
0x00 (RX FIFO empty)
Error Status
0x00 (No Parity or Overrun errors)
Break Status
0x00 (Line Break is inactive)
Rev. 0.4
5
AN434
2. Report Overview
Communication with the CP2110 is performed using HID Reports as defined in the HID Device Class Definition.
The class definition is available for download at http://www.usb.org/developers/hidpage/.
2.1. Reports Response
The CP2110 responds to reports in different ways depending on if the report configures a parameter on the device
using a Set Report or if it requests data from the device using a Get Report. The list of all supported reports is
available in "3.Report ID List" on page 7.
2.1.1. Set Reports
In response to a Set Report, the CP2110 will not return any report or acknowledgement of a report. To verify that a
report has completed successfully, use the corresponding Get Report to obtain the data. The delay imposed by the
HID protocol between reports guarantees that there will be no race condition between the execution of a Set
Report and Get Report verification. A Set Report will always complete before the device receives the Get Report.
2.1.2. Get Reports
If a report requests data from the device and the report is valid, the device will return a report with the requested
data. If the report is invalid, the device will stall.
2.2. Data Format
In all of the reports, the first byte of the data portion of the payload is the Report ID. In the report definitions in this
document, the Report ID is stored in index 0 of the payload and is not explicitly listed in the table. All data content
in the report starts at index 1. The reports have a maximum length of 64 bytes, indexed from 0–63. For any multibyte values sent in the reports, the values are sent least significant byte first.
6
Rev. 0.4
AN434
3. Report ID List
Report IDs 0x01–0x3F are used to transmit UART data across the Interrupt pipes.
Report IDs 0x40–0x66 are reserved for device configuration and customization.
Table 7. Report IDs
Report ID
Report Name
Page
UART Data Transfer (Interrupt Transfer)
0x0–0x3F
Set Send Data and Get Receive Data
12
Device Configuration (Control Transfer)
0x40
Set Reset Device
9
0x41
Get Set UART Enable
9
0x42
Get UART Status
9
0x43
Set Purge FIFOs
10
0x44
Get GPIO Values
10
0x45
Set GPIO Values
10
0x46
Get Version Information
11
0x47
Get Set Lock Byte
11
UART Configuration (Control Transfer)
0x50
Get Set UART Config
13
0x51
Set Transmit Line Break
14
0x52
Set Stop Line Break
14
USB Customization (Control Transfer)
0x60
Get Set USB Configuration
16
0x61
Get Set Manufacturing String 1
16
0x62
Get Set Manufacturing String 2
17
0x63
Get Set Product String 1
17
0x64
Get Set Product String 2
17
0x65
Get Set Serial String
18
0x66
Get Set Pin Configuration
18
CP2114 Customization and Configuration (Control Transfer)
0x70
Get Device Status
22
0x71
Get Device Capabilities
23
Rev. 0.4
7
AN434
Table 7. Report IDs (Continued)
Report ID
8
Report Name
Page
0x72
Get RAM Configuration
23
0x73
Set RAM Configuration
23
0x74
Set DAC Registers
24
0x75
Get DAC Registers
24
0x76
Get OTP Configuration
25
0x77
Get Device Version
25
0x78
Create OTP Configuration
26
0x79
Set Boot Configuration
26
0x7A
Set Parameters For Next Get
27
0x7B
Get OTP All Configurations
27
0x7C
Set OTP All Configurations
28
Rev. 0.4
AN434
4. Device Configuration Reports
4.1. Set Reset Device
Report ID: 0x40
Direction: Control Out
Name
Offset
Size
Value
Description
Reset Type
1
1
0x00
Reset with re-enumeration
Set Reset Device is used to restart the device from the USB host. The device will re-enumerate on the USB bus
and all UART configuration settings are reset to their default values.
For certain operating systems such as Windows, initiating a device reset and re-enumerating will make the device's
handle stale. The user application is responsible for handling this "surprise disconnect" event. See AN433: CP2110
HID-to-UART API Specification for more information regarding surprise disconnects.
4.2. Get/Set UART Enable
Report ID: 0x41
Direction: Control In/Out
Name
Offset
Size
Value
UART Enable
1
1
0x00
0x01
Description
UART disabled
UART enabled
Get UART Enable returns the Enable status of the UART. The UART is disabled by default.
Set UART Enable checks the FlushBuffers programmed parameter and purges the FIFOs depending on the
parameter Enable or Disable, which are treated as Open and Close respectively.
4.3. Get UART Status
Report ID: 0x42
Direction: Control In
Name
Offset
Size
Value
Description
TX FIFO
1
2
See below
Number of bytes in Transmit FIFO
RX FIFO
3
2
See below
Number of bytes in the Receive FIFO
Error Status
5
1
See below
Parity and Overrun errors
Break Status
6
1
0x00
0x01
Line break is not active
Line break is active
TX FIFO is the number of bytes left for the device transfer to the UART-based device. The transmit FIFO buffer can
hold up to 480 bytes. The value returned is a two-byte, unsigned integer.
RX FIFO is the number of bytes left for the device to transfer to the USB host. The receive FIFO buffer can hold up
to 480 bytes. The value returned is a two-byte, unsigned integer.
Error Status indicates if a Parity error (mask 0x01) or Overrun error (0x02) has occurred since the last time Error
Status was read by the user. Reading Error Status clears the errors.
Break Status indicates if a line break is currently in progress.
Rev. 0.4
9
AN434
4.4. Set Purge FIFOs
Report ID: 0x43
Direction: Control Out
Name
Offset
Size
Value
Purge Type
1
1
0x01
0x02
0x03
Description
Purge all data in the transmit FIFO
Purge all data in the receive FIFO
Purge all data in both buffers
This report is used to empty the transmit and receive FIFO buffers on the CP2110 device. The host application is
responsible for purging any host-side buffer.
If Purge Type is set to 0x01, the device will clear all data from the transmit buffer.
If Purge Type is set to 0x02, the device will clear all data from the receive buffer.
If Purge Type is set to 0x03, the device will clear the data from both the transmit and receive buffers.
4.5. Get GPIO Values
Report ID: 0x44
Direction: Control In
Name
Offset
Size
Value
Latch Value
1
2
*
Description
Current latch values
*See "Appendix A—Pin Configuration Options" on page 29 for details of this 2-byte value.
If a pin is configured as a GPIO input pin or a flow control pin that is an input, the corresponding Latch Value bit
represents the input value.
If a pin is configured as a GPIO output pin or a flow control pin that is an output, the corresponding Latch Value bit
represents the logic level driven on the pin.
4.6. Set GPIO Values
Report ID: 0x45
Direction: Control Out
Name
Offset
Size
Value
Description
Latch Value
1
2
*
Latch value
Latch Mask
3
2
*
Pin to set to new latch value
*See "Appendix A—Pin Configuration Options" on page 29 for details of these 2-byte values.
Set GPIO Values sets the values for GPIO pins or Flow Control pins that are configured as outputs.
The desired value for the pin is configured in Latch Value. To drive a 1 on an output pin, the corresponding bit
should be set to 1. To drive a 0 on an output pin, the corresponding bit should be set to 0.
The Report will set new values only for output pins that have a 1 in the corresponding bit position in Latch Mask. If
10
Rev. 0.4
AN434
the corresponding bit in Latch_Mask is set to 0, a new pin value will not be set, even if the pin is configured as an
output pin.
The Report does not affect any pins that are not configured as outputs. This Report is only valid for the GPIO/Flow
control pins. Pins TX, RX, Suspend, and /Suspend cannot be configured using this Report. The unused Latch
Value and Latch Mask bits can be set to 1 or 0.
4.7. Get Version Information
Report ID: 0x46
Direction: Control In
Name
Offset
Size
Value
Description
Part Number
1
1
0x0A
Device part number
Device Version
2
1
Varies
Device version
Part Number indicates the device part number. The CP2110 returns 0x0A.
Device Version is the version of the device. This value is not programmable over the HID interface.
4.8. Get/Set Lock Byte
Report ID: 0x47
Direction: Control In/Out
Name
Offset
Size
Value
Lock Status
1
2
See
Below
Description
Shows which fields have already
been programmed.
The device has a 2-byte field which indicates which of the customizable fields have been programmed. The
following table shows the values of the bits:
Bit Position
MSB – address[1]
LSB – address[2]
Bit 0
VID
String 2–Part 1
Bit 1
PID
String 2–Part 2
Bit 2
Max Power
String 3
Bit 3
Power Mode
Pin Config
Bit 4
Release Version
(unused)
Bit 5
Flush Buffers
(unused)
Bit 6
String 1–Part 1
(unused)
Bit 7
String 1–Part 2
(unused)
If the bit value is set to 1, the corresponding field has not been customized. If the bit value is set to 0, the field has
been customized and can no longer be changed for this device.
Using the Set Lock Byte Report, any bit value set to 0 will lock the corresponding field. Send 0x00F0 to lock all
parameters and prevent future customization.
Rev. 0.4
11
AN434
5. UART Reports
The device enumerates Report IDs 0x01–0x3F for the Send and Get Data functions. The report ID indicates the
number of data bytes being transferred, not including the Report ID itself.
5.1. Set Send Data
Report ID: 0x01 to 0x3F
Direction: Interrupt Out
Name
Offset
Size
Value
Buffer
1
1–63
—
Description
Data to be sent to the UART
Set Send Data is used to send data from the USB host to the UART device.
Buffer is the data to be transferred. The USB host application can transfer up to 1–63 data bytes using this Report.
5.2. Get Receive Data
Report ID: 0x01 to 0x3F
Direction: Interrupt In
A USB host requests data automatically from an HID device and thus this report is not typically required.This
Report can be used to receive any data in between the automatic updates by the device.
Name
Offset
Size
Value
Buffer
1
1–63
—
Description
Data to be sent to the USB Host
Get Receive Data is used to receive data from the UART device.
Buffer is the data to be transferred. The USB host application can transfer up to 1–63 data bytes using this Report.
12
Rev. 0.4
AN434
5.3. Get/Set UART Config
Report ID: 0x50
Direction: Control In/Out
Name
Offset
Size
Value
Description
Baud Rate
1
4
See below
Parity
5
1
0x00
0x01
0x02
0x03
0x04
No Parity
Even Parity
Odd Parity
Mark Parity
Space Parity
Flow Control
6
1
0x00
0x01
No Flow Control
Hardware Flow Control
Data Bits
7
1
0x05
0x06
0x07
0x08
5 data bits
6 data bits
7 data bits
8 data bits
Stop Bits
8
1
0x00
0x01
Short Stop Bit
Long Stop Bit
Baud rate in bits per second
Values from the Set Report are not stored in PROM. These parameters must be initialized after every
power-on or device reset.
Baud Rate is the speed in bits per second (bps) at which data is transferred over the UART. It is stored as a 4-byte
unsigned number. The valid range for Baud Rate is 300 bps to 500,000 bps.
Parity is the type of parity bit that is appended to each data byte. The five types of parity available are none, even,
odd, mark, and space parity. If “No Parity” is configured, no extra bit is appended to each data byte.
Flow Control is the type of handshaking used for the UART communication. The available types of flow control are
No Flow Control and Hardware Flow Control. Hardware Flow Control uses the RTS and CTS pins.
Data Bits is the number of data bits per UART transfer. The UART can operate at 5, 6, 7, or 8 data bits.
Stop Bits is the number of stop bits used after each data byte. If Data Bits is set to 5, a Short Stop Bit is equivalent
to 1 bit time, and Long Stop Bit is equivalent to 1.5 bit times. If Data Bits is set to 6, 7, or 8, a Short Stop Bit is
equivalent to 1 bit time, and Long Stop Bit is equivalent to 2 bit times.
Rev. 0.4
13
AN434
5.4. Set Transmit Line Break
Report ID: 0x51
Direction: Control Out
Name
Offset
Size
Value
Description
Line Break Time
1
1
See
Below
Length of line break in ms
Set Transmit Line Break is used to transmit a line break on the TX pin. The line break will last for the amount of
time specified in Line Break Time. The valid range for Line Break Time is 0 to 125 ms. The TX FIFO buffer is also
purged when a line break is started.
If a value of 0 is set for Line Break Time, the device will transmit a line break until it receives a Set Stop Line Break
Report.
5.5. Set Stop Line Break
Report ID: 0x52
Direction: Control Out
Name
Offset
Size
Report ID
0
1
Value
Description
(no data bytes)
Set Stop Line Break is used to stop a line break if it is in progress. If no line break is currently in progress, this
report is ignored.
Set Report ID to the report ID of Set Stop Line Break. There are no data bytes in the payload other than the Report
ID.
14
Rev. 0.4
AN434
6. Programmable USB Parameters
The following parameters are programmable on the device. Seven different reports are provided to program these
parameters. Each of those seven reports can only be called once for each device.
Name
Description
VID
USB Vendor ID
PID
USB Product ID
Power
Power request in mA/2
Power Mode
Bus Powered
Self Powered–Regulator Off
Self Powered–Regulator On
Release Version
Major and Minor release version
Flush Buffers
Purge FIFOs on enable/disable
Manufacturer String
Product Manufacturer
Product String
Product Description
Serial String
Serialization String
Pin Configuration
All pins configuration
Lock Bytes
Indicates programmed values
VID is the USB Vendor ID.
PID is the USB Product ID.
Power is the current requested by the device from the USB host in bus-powered mode. The units for this value is
milliamps / 2. For example, if the device is configured to request 200 mA, the value for Power is 100. The maximum
setting for Power is 500 mA, or a value of 250. Unpowered USB hubs are limited to providing 100 mA per port.
Power Mode indicates whether the device is operating in Bus-powered (0x00), Self-powered (0x01, voltage
regulator disabled) or Self-powered (0x02, voltage regulator enabled) mode. If the device is configured for Selfpowered mode, the value programmed for Power is not used during USB enumeration.
Release Version is a user-programmable value. The most significant byte is the Major revision number. The least
significant byte in the report is the Minor revision number. Both bytes can be programmed to any value from 0 to
255.
Flush Buffers determines whether the RX and/or TX FIFOs are purged upon a device open and/or close.
0x01—Flush
Transmit FIFO upon Device Open
0x02—Flush Transmit FIFO upon Device Close
0x04—Flush Receive FIFO upon Device Open
0x08—Flush Receive FIFO upon Device Close
All bitwise-OR combinations of these four values are valid settings for Flush Buffers.
Manufacturing String is a 126-byte string, where the first two bytes must be set according to the USB specification
(length, 0x03).
Product String is a 126-byte string, where the first two bytes must be set according to the USB specification (length,
0x03).
Serial String is a 63-byte character array used to provide a unique serial number/string for the device. The first two
characters must be set according to the USB specification (length, 0x03).
Rev. 0.4
15
AN434
7. PROM Programming Reports
7.1. Get/Set USB Configuration
Report ID: 0x60
Direction: Control In/Out
Name
Offset
Size
Value
Description
VID Low Byte
1
1
—
VID Low Byte
VID High Byte
2
1
—
VID High Byte
PID Low Byte
3
1
—
PID Low Byte
PID High Byte
4
1
—
PID High Byte
Power
5
1
—
Power requested in mA/2
Power Mode
6
1
—
Regulator Configuration
Release Major
7
1
—
Release Version Major Value
Release Minor
8
1
—
Release Version Minor Value
Flush Buffers
9
1
—
Which buffers to flush on open/close
Mask
10
1
—
Mask for what fields to program
Get USB Configuration returns the values for the various fields and also the Mask value. The Mask value is equal
to the most significant byte value that is returned in Report Get Lock Byte. If the corresponding Mask bit is set to '0',
the corresponding field has been programmed and any Set USB Configuration function operating on that field is
ignored.
Set USB Configuration is used to customize these fields. The corresponding Mask bit should be set to '1' to
program the field. If the field has already been programmed once, an attempt to reprogram it is ignored. If a field is
being programmed with the current value, the programmed bit will still be set.
See "4.8.Get/Set Lock Byte" on page 11 for the definition of Mask.
7.2. Get/Set Manufacturing String 1
Report ID: 0x61
Direction: Control In/Out
Name
Offset
Size
Value
String Length
1
1
—
USB Required
2
1
0x03
Manufacturing String 1
3
61
—
Description
Length of string + 2
String indicator
First 61 bytes of string
The Set Manufacturing String 1 Report can only be used once to set the Manufacturing String. Any subsequent
calls to Set Manufacturing String 1 are ignored.
The maximum value for String Length is 126. The first two bytes are allocated for String Length and the value 0x03,
meaning the actual length of the pstring is 124 bytes. The device will ignore the report if String Length is too long.
the string must be in Unicode format.
16
Rev. 0.4
AN434
7.3. Get/Set Manufacturing String 2
Report ID: 0x62
Direction: Control In/Out
Name
Offset
Size
Value
Manufacturing String 2
1
63
—
Description
Second 63 bytes of string
The Set Manufacturing String 2 Report can only be used once to set the Manufacturing String. Any subsequent
calls to Set Manufacturing String 2 are ignored.
Manufacturing String 2 is the second half of the manufacturer string. If the Manufacturing String does not require
the additional bytes, it does not need to be initialized. The string must be in Unicode format.
7.4. Get/Set Product String 1
Report ID: 0x63
Direction: Control In/Out
Name
Offset
Size
Value
String Length
1
1
—
USB Required
2
1
0x03
Product String 1
3
61
—
Description
Length of string + 2
String indicator
First 61 bytes of string
The Set Product String 1 Report can only be used once to set the Product String. Any subsequent calls to Set
Product String 1 are ignored.
The maximum value for String Length is 126. The first two bytes are allocated for String Length and the value 0x03,
meaning the actual length of the payload part of the string is 124 bytes. The device will ignore the Report if String
Length is too long. The string must be in Unicode format.
7.5. Get/Set Product String 2
Report ID: 0x64
Direction: Control In/Out
Name
Offset
Size
Product String 2
1
63
Value
Description
Second 63 bytes of string
The Set Product String 2 Report can only be used once to set the Product String. Any subsequent calls to Set
Product String 2 are ignored.
Product String 2 is the second half of the manufacturer string. If the Product String does not require the additional
bytes, it does not need to be initialized. The string must be in Unicode format.
Rev. 0.4
17
AN434
7.6. Get/Set Serial String
Report ID: 0x65
Direction: Control In/Out
Name
Offset
Size
Value
String Length
1
1
—
USB Required
2
1
0x03
Ser String 1
3
61
—
Description
Length of string + 2
String indicator
61 bytes of string
The Set Serial String Report can only be used once to set the Product String. Any subsequent calls to
Set SerialString are ignored.
The maximum value for String Length is 63. The first two bytes are allocated for String Length and the value 0x03,
meaning the actual length of the payload part of the string is 61 bytes. The device will reject the Report if String
Length is too long. The string must be in Unicode format.
7.7. Get/Set Pin Configuration
7.7.1. CP2110 Get/Set Pin Configuration
Report ID: 0x66
Direction: Control In/Out
The values in bold are the default values.
18
Name
Offset
Size
Value
GPIO0_CLK
1
1
0x00
0x01
0x02
0x03
GPIO Input Pin
GPIO Output–Open Drain
GPIO Output–Push-Pull
Clock Output–Push-Pull
GPIO1_RTS
2
1
0x00
0x01
0x02
0x03
GPIO Input Pin
GPIO Output–Open Drain
GPIO Output–Push-Pull
RTS–Open-Drain
GPIO2_CTS
3
1
0x00
0x01
0x02
0x03
GPIO Input Pin
GPIO Output–Open Drain
GPIO Output–Push-Pull
CTS–Open-Drain
GPIO3_RS485
4
1
0x00
0x01
0x02
0x03
GPIO Input Pin
GPIO Output–Open Drain
GPIO Output–Push-Pull
RS-485 Transceiver Control
GPIO4_TXT
5
1
0x00
0x01
0x02
0x03
GPIO Input Pin
GPIO Output–Open Drain
GPIO Output–Push-Pull
TX LED Toggle–Push-Pull
Rev. 0.4
Description
AN434
Name
Offset
Size
Value
Description
GPIO5_RXT
6
1
0x00
0x01
0x02
0x03
GPIO Input Pin
GPIO Output–Open Drain
GPIO Output–Push-Pull
RX LED Toggle–Push-Pull
GPIO6
7
1
0x00
0x01
0x02
GPIO Input Pin
GPIO Output–Open Drain
GPIO Output–Push-Pull
GPIO7
8
1
0x00
0x01
0x02
GPIO Input Pin
GPIO Output–Open Drain
GPIO Output–Push-Pull
GPIO8
9
1
0x00
0x01
0x02
GPIO Input Pin
GPIO Output–Open Drain
GPIO Output–Push-Pull
GPIO9
10
1
0x00
0x01
0x02
GPIO Input Pin
GPIO Output–Open Drain
GPIO Output–Push-Pull
TX
11
1
0x01
0x02
TX–Open-Drain
TX–Push-Pull
Suspend
12
1
0x01
0x02
Suspend–Open-Drain
Suspend–Push-Pull
Suspend
13
1
0x01
0x02
Suspend–Open-Drain
Suspend–Push-Pull
Suspend Pin Latch
14
2
0x0000
Latch values in suspend state
Suspend Pin Mode
16
2
0x0000
Push-pull or open-drain
RS485 Level
18
1
0x00
0x01
Clock Out Divider
19
1
0x00–0xFF
Active Low
Active High
Divider applied to GPIO0_CLK
The Set Pin Configuration Report should only be called once. Any further calls to this Report are ignored by the
device. If any parameters are outside of their valid range, the report is ignored and no parameters are
programmed. In this instance, the report can be called again with the correct values.
GPIO0_CLK, GPIO1_RTS, GPIO2_CTS, GPIO3_RS485, GPIO4_TXT, GPIO5_RXT, GPIO6, GPIO7, GPIO8,
GPIO9, TX, Suspend, and /Suspend are used to configure the pins to various modes. See "Appendix B—CP2110
Pin Variable Definition" on page 30 for more information about each configuration option for each pin.
Suspend Latch_Value is the value that will be driven on the pins when the device is in a Suspend state. Suspend
Pin Mode is the mode (open-drain or push-pull) the pins will be in when the device is in a Suspend state. See
"Appendix A—Pin Configuration Options" on page 29 for details on interpreting the 2-byte values returned here.
RS485 Level configures the active logic level if GPIO2 is used as the RS485 transceiver control pin.
Clock Out Divider determines the divider for the clock output when GPIO0_CLK is configured for clock output
function. When the divider is set to 0x00, the output frequency is 24 MHz. When the divider is set to any value
between 0x01 and 0xFF, the output frequency is determined by the following formula:
Output Frequency = 24 MHz / (2 x Clock Out Divider)
Rev. 0.4
19
AN434
7.7.2. CP2114 Get/Set Pin Configuration
Report ID: 0x66
Direction: Control In/Out
The values in bold are the default values.
Table 8. CP2114 Get/Set Pin Configuration
20
Name
Offset
Size
Value
GPIO.0_RMUTE
1
1
0x00
0x01
0x02
0x03
GPIO Input Pin
GPIO Output–Open Drain
GPIO Output–Push-Pull
Record Mute Input
GPIO.1_PMUTE
2
1
0x00
0x01
0x02
0x03
GPIO Input Pin
GPIO Output–Open Drain
GPIO Output–Push-Pull
Playback Mute Input
GPIO.2_VOL–
3
1
0x00
0x01
0x02
0x03
GPIO Input Pin
GPIO Output–Open Drain
GPIO Output–Push-Pull
Volume Decrease Input
GPIO.3_VOL+
4
1
0x00
0x01
0x02
0x03
GPIO Input Pin
GPIO Output–Open Drain
GPIO Output–Push-Pull
Volume Increase Input
GPIO.4_RMUTELED
5
1
0x00
0x01
0x02
0x03
GPIO Input Pin
GPIO Output–Open Drain
GPIO Output–Push-Pull
Record Mute Output
GPIO.5_TXT_DACSEL0
6
1
0x00
0x01
0x02
0x03
0x04
GPIO Input Pin
GPIO Output–Open Drain
GPIO Output–Push-Pull
TX Toggle Output
DAC Select Input
GPIO.6_RXT_DACSEL1
7
1
0x00
0x01
0x02
0x03
0x04
GPIO Input Pin
GPIO Output–Open Drain
GPIO Output–Push-Pull
RX Toggle Output
DAC Select Input
GPIO.7_RTS_DACSEL2
8
1
0x00
0x01
0x02
0x03
0x04
GPIO Input Pin
GPIO Output–Open Drain
GPIO Output–Push-Pull
Record Mute control
DAC Select Input
Rev. 0.4
Description
AN434
Table 8. CP2114 Get/Set Pin Configuration (Continued)
GPIO.8_CTS_DACSEL3
9
1
0x00
0x01
0x02
0x03
0x04
GPIO Input Pin
GPIO Output–Open Drain
GPIO Output–Push-Pull
Record Mute control
DAC Select Input
GPIO.9_CLKOUT
10
1
0x00
0x01
0x02
0x03
GPIO Input Pin
GPIO Output–Open Drain
GPIO Output–Push-Pull
Clock Output – Push-Pull
GPIO.10_TX
11
1
0x00
0x01
0x02
0x03
0x04
GPIO Input Pin
GPIO Output–Open Drain
GPIO Output–Push-Pull
TX Output – Open Drain
TX Output – Push-Pull
GPIO.11_RX
12
1
0x00
0x01
0x02
0x03
GPIO Input Pin
GPIO Output–Open Drain
GPIO Output–Push-Pull
RX Input
SUSPEND
13
1
0x01
0x02
Suspend Output – Open-Drain
Suspend Output– Push-Pull
/SUSPEND
14
1
0x01
0x02
/Suspend Output – Open-Drain
/Suspend Output – Push-Pull
SUSPEND Pin Latch
15
2
0x0000 Latch values in suspend state
SUSPEND Pin Mode
17
2
0x0000 Push-pull or open-drain
Clock Output Divider
19
1
0x000xFF
Divider applied to GPIO.9_CLKOUT.
The Set Pin Configuration Report should only be called once. Any further calls to this Report are ignored by the
device. If any parameters are outside of their valid range, the report is ignored and no parameters are
programmed. In this instance, the report can be called again with the correct values.
GPIO.0_RMUTE,
GPIO.1_PMUTE,
GPIO.2_VOL–,
GPIO.3_VOL+,
GPIO.4_RMUTELED,
GPIO.5_TXT_DACSEL0,
GPIO.6_RXT_DACSEL1,
GPIO.7_RTS_DACSEL2,
GPIO.8_CTS_DACSEL3,
GPIO.9_CLKOUT, GPIO.10_TX, GPIO.11_RX, SUSPEND, and /SUSPEND are used to configure the pins to
various modes. See "Appendix A—Pin Configuration Options" on page 29 for more information about each
configuration option for each pin. Suspend Latch_Value is the value that will be driven on the pins when the device
is in a Suspend state. Suspend Pin Mode is the mode (open-drain or push-pull) the pins will be in when the device
is in a Suspend state. See "Appendix C—CP2114 Pin Variable Definition" on page 31 for details on interpreting the
2-byte values returned here.
Clock Out Divider determines the divider for the clock output when GPIO.9_CLKOUT is configured for clock output
function. When the divider is set to 0x00, the output frequency is SYSCLK (either 48 MHz or 48.152 MHz). When
the divider is set to any value between 0x01 and 0xFF, the output frequency is determined by the following formula:
Output Frequency = SYSCLK / (2 x Clock Out Divider)
Rev. 0.4
21
AN434
8. CP2114 Reports
Report IDs 0x70–0x7C are used for CP2114-specific reports, which are described in the following sections.
8.1. Get Device Status
Report ID: 0x70
Direction: Control In
Name
Offset
Size
Value
Description
Status
1
1
Varies
See below
The possible status values returned by the CP2114 are:
Status
Description
0x00
Last command produced no error.
0x20
Requested configuration number is too large.
0x21
All Device Boot Indexes have been used.
0x22
Pointer to requested Device Configuration is 0xFFFF.
0x23
Configuration invalid or not supported.
0x24
All Configuration Pointer slots have been used.
0x25
Insufficient OTP space to store new configuration.
0x26
The user-specified boot index is already the current boot index.
0x27
The current configuration is already as requested.
0x40
The specified number of cached parameters is too large.
0x41
Invalid cached parameter value(s).
The CP2114 clears the status upon read.
22
Rev. 0.4
AN434
8.2. Get Device Capabilities
Report ID: 0x71
Direction: Control In
The CP2114 returns the following information:
Name
Offset
Size
Value
Description
Available Boot Indices
1
1
Varies
The number of unprogrammed Boot Indices.
Available Configurations
2
1
Varies
The number of unprogrammed Configuration
Indices.
Current Boot Configuration
3
1
Varies
The current Boot Configuration index.
Available OTP Configuration
Space
4
2
Varies
The number of unprogrammed Configuration
bytes.
8.3. Get RAM Configuration
Report ID: 0x72
Direction: Control In
The CP2114 returns this information:
Name
Offset
Size
Value
Description
Current Audio Configuration String in
RAM
1
30
Varies
See text.
See the CP2114 data sheet for information on the audio configuration string format.
8.4. Set RAM Configuration
Report ID: 0x73
Direction: Control Out
Name
Configuration to be loaded into RAM
Offset
Size
Value
Description
1
30
Varies
See text.
See the CP2114 data sheet for information on the audio configuration string format.
Rev. 0.4
23
AN434
8.5. Set DAC Registers
Report ID: 0x74
Direction: Control Out
Name
Offset
Size
Value
Description
Number of registers to write
1
1
Varies
Number of register writes to perform.
See text.
2
Varies
Varies
See text.
The following types of data comprise the payload:
DAC
configuration string (address/value pairs that are to be written to the DAC)
configuration In-Band commands and their corresponding parameters
See the CP2114 data sheet for information on the audio configuration string and in-band commands.
DAC
8.6. Get DAC Registers
Report ID: 0x75
Direction: Control In
Note: Immediately preceding one or more “Get DAC Registers” reports, the host must issue the “Set Parameters For Next Get”
report with the following information:
Report
ID:
0x75 (the Get DAC Registers report ID)
Number of parameters:
2
Parameter[0]:
Starting DAC address
Parameter[1]:
Number of DAC registers to read
For each “Get DAC Registers” report, the CP2114 returns the following information:
Name
Offset
Size
Value
Description
Packet Size
1
1
1–62
Number of bytes in this packet
Register value(s)
2
Varies
Varies
DAC register values.
The maximum amount of data that can be returned is 62 bytes. The host should issue “Get DAC Registers” reports
until the returned packet size is less than 62.
24
Rev. 0.4
AN434
8.7. Get OTP Configuration
Report ID: 0x76
Direction: Control In
Note: Immediately preceding the “Get OTP Configuration” reports, the host must issue the “Set Parameters For Next Get”
report with the following information:
Report
ID:
0x76 (the Get OTP Configuration report ID)
of parameters:
1
Parameter[0]:
Index of the configuration to be read
For the “Get OTP Configuration” report, the CP2114 returns the following information:
Number
Name
Offset
Size
Value
Description
Packet Size
1
1
1–62
Number of bytes in this packet
Data
2
Varies
Varies
OTP configuration data
The maximum amount of data that can be returned in one packet is 62 bytes. The host should issue “Get OTP
Configuration” reports until the returned packet size is less than 62.
8.8. Get Device Version
Report ID: 0x77
Direction: Control In
The CP2114 returns the following information:
Name
Offset
Size
Value
Description
Interface version
1
1
0x05
Version of the CP2114 interface
Firmware version
2
1
0x07
Version of the CP2114 firmware
These numbers comprise the Version (5.7) for the CP2114. These version numbers are read‐only values and cannot be changed by the customer. (The customer‐configurable version numbers are accessed via the Get/Set USB Configuration reports.)
Rev. 0.4
25
AN434
8.9. Create OTP Configuration
Report ID: 0x78
Direction: Control Out
If the OTP configuration to be programmed is larger than 62 bytes, the host must send multiple “Create OTP
Configuration” reports. The first report should contain the following data:
Name
Offset
Size
Value
Description
Packet length
1
1
Varies
Length of the current packet
Configuration size (LSB)
2
1
Varies
Configuration size (MSB)
3
1
Varies
Configuration data
4
Varies
Varies
Configuration data
Subsequent reports (if necessary) should contain the following data:
Name
Offset
Size
Value
Description
Packet length
1
1
Varies
Length of the current packet
Configuration data
2
Varies
Varies
Configuration data
Name
Offset
Size
Value
Description
Configuration index
1
1
Varies
Index of the configuration to be
assigned as the boot configuration.
8.10. Set Boot Configuration
Report ID: 0x79
Direction: Control Out
The report information is:
26
Rev. 0.4
AN434
8.11. Set Parameters For Next Get
Report ID: 0x7A
Direction: Control Out
This report specifies parameters that are necessary for a subsequent Get report, and must be issued immediately
prior to the following Get reports:
Get
DAC Registers
Get OTP Configuration
Get OTP All Configuration
The number of parameters depends on the Get report to follow. Refer to the appropriate Get report for the specific
parameter format.
Name
Offset
Size
Value
Description
Get Report ID
1
1
Varies
Report ID of the Get report to follow.
Number of parameters
2
1
Varies
The number of parameters in this report.
Parameter(s)
3
Varies
Varies
The parameter(s).
8.12. Get OTP All Configurations
Report ID: 0x7B
Direction: Control In
Note: Immediately preceding the first “Get OTP All Configuration” report, the host must issue the “Set Parameters For Next
Get” report with the following information:
Report
ID:
0x7B (the Get OTP All Configuration report ID)
of parameters:
4
Parameter[0]:
Length (MSB)
Parameter[1]:
Length (LSB)
Parameter[2]:
Start address (MSB)
Parameter[3]:
Start address (LSB)
For the “Get OTP All Configuration” report, the CP2114 returns the following information:
Number
Name
Offset
Size
Value
Description
Packet Size
1
1
Varies
Number of bytes in this packet
Data
2
Varies
Varies
OTP configuration data
The size of the entire CP2114 OTP is 6 KB (0x1800, 6144 bytes); therefore the host must send a total of 100 “Set
OTP All Configuration” reports. The CP2114 will return 62 bytes in each of the first 99 reports; the last report will
contain 6 bytes:
(99 x 62) + 6 = 6144
Rev. 0.4
27
AN434
8.13. Set OTP All Configurations
Report ID: 0x7C
Direction: Control Out
The size of the entire CP2114 OTP is 6 KB (0x1800, 6144 bytes); therefore the host must send 100 “Set OTP All
Configuration” reports.
60 + (98 x 62) + 8 = 6144
The reports contain the following data:
Report 1:
Name
Offset
Size
Value
Description
Packet length
1
1
62 (0x3E)
Length of the current packet
Configuration size (LSB)
2
1
0x00
Total size of OTP block (LSB)
Configuration size (MSB)
3
1
0x18
Total size of OTP block (MSB)
Configuration data
4
60
Varies
Configuration data
Name
Offset
Size
Value
Description
Packet length
1
1
62 (0x3E)
Length of the current packet
Configuration data
2
62
Varies
Configuration data
Name
Offset
Size
Value
Description
Packet length
1
1
8
Length of the current packet
Configuration data
2
8
Varies
Configuration data
Reports 2–99 (98 total):
Report 100:
28
Rev. 0.4
AN434
A PPENDIX A— P I N C ON FIGU RATION O PTIONS
Introduction
Some of the pins of the CP2110 are configurable as inputs, open-drain outputs, or push-pull outputs. These options
are configured when the device has enumerated and is operating in a normal mode. When the CP2110 is in USB
suspend, all of the configurable pins are limited to be open-drain or push-pull outputs. The following describes the
differences between open-drain and push-pull, and the difference in behavior in Suspend mode. See the CP2110
data sheet for the electrical specifications of the GPIO pins.
GPIO Input
When a pin is configured as a GPIO input, the pin can read a logic high or logic low value. Internally, the GPIO pin
is connected to the VIO pin through a resistor. If the pin is not connected externally, it will return a logic high or '1'.
Any voltages connected to the pin should conform to data sheet specifications.
Open-Drain Output
When a pin is configured as a GPIO open-drain output, the pin can output a logic high or logic low value. The
default value is logic high and a logic high value is created by internally connecting the GPIO pin to the VIO pin
through a resistor. In this mode, the pin is unable to source much current when driving a logic high. If the Set GPIO
Values Report is used to change the output to a logic low, the pin is internally connected to GND.
Push-pull Output
When a pin is configured as a GPIO push-pull output, the pin can output a logic high or logic low value. When
driving a logic high value, the pin is directly connected to the VIO pin internally and can source current for devices
such as LEDs. When driving a logic low value, the pin is internally connected to GND.
Suspend Mode
When the device is in Suspend mode, all of the GPIO pins are forced to be open-drain or push-pull outputs. The
mode of each GPIO pin (open-drain or push-pull) and output value (logic-high or logic-low) is a PROM configurable
value which is set using the Set Pin Configuration Report. The modes and values of the pins during Suspend can
be the same or different as when the device is in Normal mode. To maintain the same electrical characteristics of a
GPIO Input Pin during Suspend, configure the pin for open-drain mode with the output latch value set to logic-high
or 1.
Rev. 0.4
29
AN434
A PPENDIX B— CP 2110 P I N V ARIABLE D EFINITION
The CP2110 has 14 pins that have configurable behavior. In some of the reports, the CP2110 returns the
configuration of these pins in a two-byte value, or the report requires the pins to be configured using a two-byte
value.
These tables show which bit of the two-byte value corresponds to which pin.
Bit
GPIO
15
14
Use SUS
13
12
11
10
9
8
7
6
5
4
3
2
1
0
9
8
7
6
X
SUS
5
4
RX
TX
3
2
1
0
Bit Position in 2-byte Word
Pin Name
CP2110 Pin
Number
0
GPIO.0_CLK
1
1
GPIO.1_RTS
24
2
GPIO.2_CTS
23
3
GPIO.3_RS485
22
6
GPIO.4_TXT
19
7
GPIO.5_RXT
18
10
GPIO.6
15
11
GPIO.7
14
12
GPIO.8
13
13
GPIO.9
12
4
TX
21
5
RX
20
14
Suspend
11
8
Suspend
17
9
Not Used
Not Used
15
Use_Suspend*
Not Used
*Note: Use_Suspend, Bit 15 of the Suspend_Pin_Mode, is configured using the Get/Set Pin Configuration Report and does not
correspond to a CP2110 pin. When this bit is cleared to 0, the GPIO pins remain in their current state in Suspend and
the values for Suspend_Pin_Mode and Suspend_Pin_Latch are unused. When Use_Suspend is set to 1, the values for
Suspend_Pin_Mode and Suspend_Pin_Latch are used in Suspend Mode. The exceptions are GPIO.0_CLK and
GPIO.3_RS485. If these pins are configured for their special functionality, the Clock Output is always disabled and the
RS485 pin is set to the inactive level in suspend mode.
Bit 15 is unused in the two-byte fields other than Suspend_Pin_Mode and can be set to 1 or 0.
See the individual report definitions in the UART Reports section for the meaning of a bit being set to 1 or 0.
Not all configuration data applies to every pin. See the individual report definitions in the UART Reports section to
determine if a certain configuration is applicable to a pin.
30
Rev. 0.4
AN434
A PPENDIX C— CP 2114 P I N V ARIABLE D EFINITION
The CP2114 has 14 pins that have configurable behavior. In some of the reports, the CP2114 returns the
configuration of these pins in a two-byte value, or the report requires the pins to be configured using a two-byte
value.
These tables show which bit of the two-byte value corresponds to which pin.
Bit
CP2114 Pin Name
CP2114 Pin
Number
0
GPIO.0_RMUTE
30
1
GPIO.1_PMUTE
29
2
GPIO.2_VOL–
14
3
GPIO.3_VOL+
13
4
GPIO.4_RMUTELED
12
5
GPIO.5_TXT_DACSEL0
28
6
GPIO.6_RXT_DACSEL1
11
7
GPIO.7_RTS_DACSEL2
19
8
GPIO.8_CTS_DACSEL3
20
9
GPIO.9_CLKOUT
22
10
GPIO.10_TX
16
11
GPIO.11_RX
15
12
SUSPEND
18
13
/SUSPEND
17
14
Not Used
Not Used
15
Use_Suspend*
Not Used
*Note: Use_Suspend, Bit 15 of the Suspend_Pin_Mode, is configured using the Get/Set
Pin Configuration Report and does not correspond to a CP2114 pin. When this bit
is cleared to 0, the GPIO pins remain in their current state in Suspend and the
values for Suspend_Pin_Mode and Suspend_Pin_Latch are unused. When
Use_Suspend is set to 1, the values for Suspend_Pin_Mode and
Suspend_Pin_Latch are used in Suspend Mode. The exception is GPIO.0_CLK. If
this pin is configured for as a Clock Output, the Clock Output is always disabled in
suspend mode. Bit 15 is unused in the two-byte fields other than
Suspend_Pin_Mode and can be set to 1 or 0.
See the individual report definitions in the UART Reports section for the meaning of a bit being set to 1 or 0.
Not all configuration data applies to every pin. See the individual report definitions to determine if a certain
configuration is applicable to a pin.
Rev. 0.4
31
AN434
DOCUMENT CHANGE LIST
Revision 0.3 to Revision 0.4
Added
32
support for CP2114.
Rev. 0.4
AN434
NOTES:
Rev. 0.4
33
AN434
CONTACT INFORMATION
Silicon Laboratories Inc.
400 West Cesar Chavez
Austin, TX 78701
Tel: 1+(512) 416-8500
Fax: 1+(512) 416-9669
Toll Free: 1+(877) 444-3032
Please visit the Silicon Labs Technical Support web page:
https://www.silabs.com/support/pages/contacttechnicalsupport.aspx
and register to submit a technical support request.
Patent Notice
Silicon Labs invests in research and development to help our customers differentiate in the market with innovative low-power, small size, analogintensive mixed-signal solutions. Silicon Labs' extensive patent portfolio is a testament to our unique approach and world-class engineering team.
The information in this document is believed to be accurate in all respects at the time of publication but is subject to change without notice.
Silicon Laboratories assumes no responsibility for errors and omissions, and disclaims responsibility for any consequences resulting from
the use of information included herein. Additionally, Silicon Laboratories assumes no responsibility for the functioning of undescribed features or parameters. Silicon Laboratories reserves the right to make changes without further notice. Silicon Laboratories makes no warranty, representation or guarantee regarding the suitability of its products for any particular purpose, nor does Silicon Laboratories assume any
liability arising out of the application or use of any product or circuit, and specifically disclaims any and all liability, including without limitation
consequential or incidental damages. Silicon Laboratories products are not designed, intended, or authorized for use in applications intended to support or sustain life, or for any other application in which the failure of the Silicon Laboratories product could create a situation where
personal injury or death may occur. Should Buyer purchase or use Silicon Laboratories products for any such unintended or unauthorized
application, Buyer shall indemnify and hold Silicon Laboratories harmless against all claims and damages.
Silicon Laboratories and Silicon Labs are trademarks of Silicon Laboratories Inc.
Other products or brandnames mentioned herein are trademarks or registered trademarks of their respective holders.
34
Rev. 0.4