TouchXpressTM Family CPT213B Data Sheet The CPT213B device, part of the TouchXpress family, is designed to quickly add IEC 60730 Class B capacitive touch via an I2C interface by eliminating the firmware complexity and reducing the development time for capacitive sensing applications. Supporting up to 13 capacitive sensor inputs in packages as small as a 4 mm x 4 mm QFN, the CPT213B is a highly-integrated device that interfaces via I2C to the host processor to provide a simple solution for adding capacitive touch. The device also comes with advanced features like an IEC safety library and moisture immunity. No firmware development is needed, and all the capacitive touch sense parameters can be configured using a simple GUI-based configurator. By eliminating the need for complex firmware development, the CPT213B device enables rapid user interface designs with minimal development effort. KEY FEATURES * No firmware development required * Simple GUI-based configurator * 13 Capacitive Sensor inputs with programmable sensitivity * IEC-compliant I2C interface to communicate to and configure from the host * IEC 60730 Class B safety library * Superior noise immunity: SNR up to 270:1 * Moisture immunity The CPT213B device is ideal for a wide range of capacitive touch applications including the following: * Medical equipment * Lighting control * Home appliances * White goods * Instrument / Control panels Input Features Input Engine with 13 Inputs Capacitive Touch Sensing Features Output Features Touch Qualification IEC Safety Library IEC-Compliant I2C Output Configuration Profile for each Input Baselining Interrupt Pin I2C Event Buffer Lowest power mode with feature operational: Active silabs.com | Building a more connected world. Rev. 1.1 CPT213B Data Sheet Feature List and Ordering Information 1. Feature List and Ordering Information CP T 2 13 B - A 01 - G M R Tape and Reel (Optional) Package Type -- QFN24 (M) Temperature Grade -- -40 to +85 C (G) Firmware Revision Hardware Revision Capacitive Sense Features -- Button (B) Number of Capacitive Sense Inputs Interface Type -- GPO (0), I2C (1), Configuration I2C (2) TouchXpress Family Silicon Labs Xpress Product Line Figure 1.1. CPT213B Part Numbering The CPT213B has the following features: * Capacitive sensing input engine with 13 inputs * Post-sample touch qualification engine * IEC safety library * Configuration profile space in non-volatile memory * IEC-compliant I2C event buffer with interrupt pin to signal when new touch events have been qualified * Configuration loading with both the dedicated configuration interface and through the I2C interface (RoHS Compliant) Pb-free Yes Package Yes Temperature Range CPT213B-A01-GM Configuration over I2C Part Number Ordering Table 1.1. Product Selection Guide -40 to +85 C QFN24 See http://www.silabs.com/products/interface/capacitive-touch-controllers for other devices available in the TouchXpress family. silabs.com | Building a more connected world. Rev. 1.1 | 2 Table of Contents 1. Feature List and Ordering Information . . . . . . . . . . . . . . . . . . . . . . 2 2. Typical Connection Diagrams . . . . . . . . . . . . . . . . . . . . . . . . . 5 2.1 Signal, Analog, and Power Connections . . . . . . . . . . . . . . . . . . . . . 5 2.2 Configuration . . . . . . . . . . . . . . . . . . . . . 6 . . . . . . . . . 3. Electrical Specifications . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 3.1 Electrical Characteristics . . . . . . 3.1.1 Recommended Operating Conditions 3.1.2 Power Consumption. . . . . . 3.1.3 Reset and Supply Monitor . . . . 3.1.4 Configuration Memory . . . . . 3.1.5 I2C Configuration Interface . . . 3.1.6 Capacitive Sense. . . . . . . 3.1.7 IEC 60730 Safety Timing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 . 7 . 7 . 8 . 8 . 9 .10 .11 3.2 Thermal Conditions . . . . . . . . . . . . . . . . . . . . . . . . . . . .11 3.3 Absolute Maximum Ratings . . . . . . . . . . . . . . . . . . . . . . . . .12 3.4 Typical Performance Curves . . . . . . . . . . . . . . . . . . . . . . . . .13 4. Functional Description . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 4.1 Capacitive Sensing Input . . . . . 4.1.1 Introduction . . . . . . . 4.1.2 Touch Qualification Criteria . . 4.1.3 Thresholds . . . . . . . . 4.1.4 Debounce Counter . . . . . 4.1.5 Touch Deltas . . . . . . . 4.1.6 Auto-Accumulation and Averaging 4.1.7 Drive Strength . . . . . . . 4.1.8 Active Mode Scan Enable . . . 4.1.9 Active Mode Scanning . . . . 4.1.10 No Confidence Mode . . . . 4.1.11 IEC60730 Functionality . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .15 .15 .15 .15 .16 .16 .16 .16 .16 .16 .16 .17 4.2 I2C Event Buffer Interface . . . . . . . . . . . . . . 4.2.1 Introduction . . . . . . . . . . . . . . . . 4.2.2 Startup Behavior . . . . . . . . . . . . . . . 4.2.3 Sensing Mode Event Packet Structure . . . . . . . 4.2.4 CRC Algorithm . . . . . . . . . . . . . . . 4.2.5 Packet Retrieval in Sensing Mode . . . . . . . . . 4.2.6 Defined Event Types . . . . . . . . . . . . . 4.2.7 Description Bytes for Touch Events . . . . . . . . 4.2.8 Description Bytes for Status Events . . . . . . . . 4.2.9 Slave Address. . . . . . . . . . . . . . . . 4.2.10 Entering Sensing Mode from Configuration Loading Mode 4.2.11 Determining Configuration Validity . . . . . . . . 4.2.12 Configuration Loading Procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .17 .17 .17 .18 .20 .21 .21 .22 .22 .22 .23 .23 .24 silabs.com | Building a more connected world. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Rev. 1.1 | 3 4.3 Configuration Profile. . . . . . . . . . . . . . . . . . . . . . . . . . . .24 5. Pin Definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 5.1 CPT213B QFN24 Pin Definitions . . . . . . . . . . . . . . . . . . . . . . .25 6. QFN24 Package Specifications. . . . . . . . . . . . . . . . . . . . . . . . 27 6.1 QFN24 Package Dimensions . . . . . . . . . . . . . . . . . . . . . . . . .27 6.2 PCB Land Pattern . . . . . . . . . . . . . . . . . . . . . . . . . . . .29 6.3 Package Marking . . . . . . . . . . . . . . . . . . . . . . . . . . . . .30 7. Relevant Application Notes . . . . . . . . . . . . . . . . . . . . . . . . . 31 8. Revision History . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 8.1 Revision 1.1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .32 8.2 Revision 1.0 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .32 silabs.com | Building a more connected world. Rev. 1.1 | 4 CPT213B Data Sheet Typical Connection Diagrams 2. Typical Connection Diagrams 2.1 Signal, Analog, and Power Connections Figure 2.1 Connection Diagram on page 5 shows a typical connection diagram for the power pins of CPT213B devices. CPT213B Device 1.8-3.6 V (in) 4.7 F and 0.1 F bypass capacitors required for the power pins placed as close to the pins as possible. VDD GND 1.8-3.6 V (in) Host Processor 1-10 k 1-10 k EB_SCL EB_SDA EB_INT CS00 Electrode ... CS12 Electrode 1.8-3.6 V (in) 1 k Config Data Config Clk / RSTb Figure 2.1. Connection Diagram Note: The I2C pull-up resistor values will vary depending on the speed requirements of the bus and the host processor requirements. silabs.com | Building a more connected world. Rev. 1.1 | 5 CPT213B Data Sheet Typical Connection Diagrams 2.2 Configuration There are two ways to configure the CPT213B: through the I2C interface, and through the dedicated configuration interface. The diagram below shows a typical connection diagram for the dedicated configuration interface pins. The ToolStick Base Adapter is available on the evaluation board. Note: The USB Debug Adapter does not support configuration for TouchXpress devices. Instead, the ToolStick Base Adapter must be used to configure these devices. CPT213B Device VDD 1k Config Clk Config Data GND ToolStick Figure 2.2. Configuration Connection Diagram silabs.com | Building a more connected world. Rev. 1.1 | 6 CPT213B Data Sheet Electrical Specifications 3. Electrical Specifications 3.1 Electrical Characteristics All electrical parameters in all tables are specified under the conditions listed in 3.1.1 Recommended Operating Conditions, unless stated otherwise. 3.1.1 Recommended Operating Conditions Table 3.1. Recommended Operating Conditions Parameter Symbol Operating Supply Voltage on VDD Test Condition Min Typ Max Unit VDD 1.8 2.4 3.6 V Minimum RAM Data Retention Voltage on VDD1 VRAM -- 1.4 -- V Operating Ambient Temperature TA -40 -- 85 C Min Typ Max Unit Note: 1. All voltages with respect to GND. 3.1.2 Power Consumption See 3.4 Typical Performance Curves for power consumption plots. Table 3.2. Power Consumption Parameter Symbol Test Condition Active Mode Supply Current IDD Sensing Mode -- 3.6 -- mA Configuration Mode -- 3.6 -- mA silabs.com | Building a more connected world. Rev. 1.1 | 7 CPT213B Data Sheet Electrical Specifications 3.1.3 Reset and Supply Monitor Table 3.3. Reset and Supply Monitor Parameter Symbol Test Condition Min Typ Max Unit VDD Supply Monitor Threshold VVDDM Reset Trigger 1.7 1.75 1.8 V VWARN Early Warning 1.8 1.85 1.9 V Power-On Reset (POR) Monitor Threshold VPOR Rising Voltage on VDD -- 1.75 -- V Falling Voltage on VDD 0.75 1.0 1.3 V VDD Ramp Time tRMP -- -- 3 ms RST Low Time to Generate Reset tRSTL 15 -- -- s Boot Time1 tboot 1 sensor -- 25 -- ms 2 sensors -- 40 -- ms 3 sensors -- 55 -- ms 4 sensors -- 70 -- ms 5 sensors -- 85 -- ms 6 sensors -- 100 -- ms 7 sensors -- 115 -- ms 8 sensors -- 130 -- ms 9 sensors -- 145 -- ms 10 sensors -- 160 -- ms 11 sensors -- 175 -- ms 12 sensors -- 200 -- ms 13 sensors -- 215 -- ms Time to VDD 1.8 V Note: 1. Boot time is defined as the time from when the device enters sensing mode until the first capacitive sensing scan occurs. 3.1.4 Configuration Memory Table 3.4. Configuration Memory Parameter Symbol Endurance (Write/Erase Cycles) NWE Test Condition Min Typ Max Units 20 k 100 k -- Cycles Note: 1. Data Retention Information is published in the Quarterly Quality and Reliability Report. silabs.com | Building a more connected world. Rev. 1.1 | 8 CPT213B Data Sheet Electrical Specifications 3.1.5 I2C Configuration Interface Table 3.5. I2C Configuration Interface Parameter Symbol I2C Configuration Erase Delay Min Typ Max Units terase -- 45 -- ms I2C Configuration Write Delay twrite -- 1 -- ms I2C Configuration CRC Delay tCRC -- 45 -- ms I2C Configuration Validity Check Delay tvalid -- 200 -- s -- -- 5 s Interrupt Pin Low Time After Enter- tINT_low ing Sensing Mode silabs.com | Building a more connected world. Test Condition Rev. 1.1 | 9 CPT213B Data Sheet Electrical Specifications 3.1.6 Capacitive Sense Table 3.6. Capacitive Sense Parameter Symbol Test Condition Scan Time Per Sensor1 tSCAN Signal to Noise Ratio1, 2 Conversion Time Total Processing Time3 SNR tCONV tPROC silabs.com | Building a more connected world. Min Typ Max Unit Accumulation = 1x -- 64 -- s Accumulation = 4x -- 256 -- s Accumulation = 8x -- 512 -- s Accumulation = 16x -- 1.024 -- ms Accumulation = 32x -- 2.048 -- ms Accumulation = 64x -- 4.096 -- ms Accumulation = 1x -- 90:1 -- codes Accumulation = 4x -- 180:1 -- codes Accumulation = 8x -- 182:1 -- codes Accumulation = 16x -- 210:1 -- codes Accumulation = 32x -- 230:1 -- codes Accumulation = 64x -- 270:1 -- codes Gain = 1x -- 205 -- s Gain = 2x -- 123 -- s Gain = 3x -- 98 -- s Gain = 4x -- 85 -- s Gain = 5x -- 76 -- s Gain = 6x -- 72 -- s Gain = 7x -- 67 -- s Gain = 8x -- 64 -- s 1 sensor -- 576 -- s 2 sensors -- 796 -- s 3 sensors -- 1.0 -- ms 4 sensors -- 1.2 -- ms 5 sensors -- 1.4 -- ms 6 sensors -- 1.7 -- ms 7 sensors -- 1.9 -- ms 8 sensors -- 2.1 -- ms 9 sensors -- 2.3 -- ms 10 sensors -- 2.6 -- ms 11 sensors -- 2.8 -- ms 12 sensors -- 3.0 -- ms 13 sensors -- 3.2 -- ms Rev. 1.1 | 10 CPT213B Data Sheet Electrical Specifications Parameter Symbol Test Condition Min Typ Max Unit Maximum External Capacitive Load CEXTMAX Gain = 8x -- 45 -- pF Gain = 1x -- 500 -- pF Maximum External Series Impedance REXTMAX Gain = 8x -- 50 -- k Note: 1. Measured with gain set to 8x. 2. Measured with an evaluation board with 1/16" overlay using Capacitive Sense Profiler. 3. Sensors configured to 8x gain, 1x accumulation with sensor sampling and system processing time included. 3.1.7 IEC 60730 Safety Timing Table 3.7. IEC 60730 Safety Timing Parameter Symbol Test Time Between Sensing Mode Scans Test Condition Min Typ Max Unit tTEST -- 5 -- ms Sensing Mode Status Packet TX Period tSTATUS -- 100 -- ms Power-On Reset Test Period tPOR_TEST -- 16 -- ms Min Typ Max Unit -- 35 -- C/W 3.2 Thermal Conditions Table 3.8. Thermal Conditions Parameter Symbol Test Condition Thermal Resistance* JA QFN24 Packages Note: 1. Thermal resistance assumes a multi-layer PCB with any exposed pad soldered to a PCB pad. silabs.com | Building a more connected world. Rev. 1.1 | 11 CPT213B Data Sheet Electrical Specifications 3.3 Absolute Maximum Ratings Stresses above those listed in Table 3.9 Absolute Maximum Ratings on page 12 may cause permanent damage to the device. This is a stress rating only and functional operation of the devices at those or any other conditions above those indicated in the operation listings of this specification is not implied. Exposure to maximum rating conditions for extended periods may affect device reliability. For more information on the available quality and reliability data, see the Quality and Reliability Monitor Report at http://www.silabs.com/ support/quality/pages/default.aspx. Table 3.9. Absolute Maximum Ratings Parameter Symbol Ambient Temperature Under Bias Test Condition Min Max Unit TBIAS -55 125 C Storage Temperature TSTG -65 150 C Voltage on VDD VDD GND-0.3 4.0 V Voltage on I/O pins or RSTb VIN GND-0.3 VDD + 0.3 V Total Current Sunk into Supply Pin IVDD -- 400 mA Total Current Sourced out of Ground Pin IGND 400 -- mA Current Sourced or Sunk by Any I/O Pin or RSTb IIO -100 100 mA Maximum Total Current through all Port Pins IIOTOT -- 200 mA Operating Junction Temperature TJ -40 105 C Exposure to maximum rating conditions for extended periods may affect device reliability. silabs.com | Building a more connected world. Rev. 1.1 | 12 CPT213B Data Sheet Electrical Specifications 3.4 Typical Performance Curves Figure 3.1. Active Mode Processing Time Per Sensor Note: Active mode processing time per sensor measured with sensors configured to 1x accumulation, 8x gain. Sensor sampling and system processing time is included. Figure 3.2. Typical VOH Curves silabs.com | Building a more connected world. Rev. 1.1 | 13 CPT213B Data Sheet Electrical Specifications Figure 3.3. Typical VOL Curves silabs.com | Building a more connected world. Rev. 1.1 | 14 CPT213B Data Sheet Functional Description 4. Functional Description 4.1 Capacitive Sensing Input 4.1.1 Introduction The capacitive to digital converter uses an iterative, charge-timing self-capacitance technique to measure capacitance on an input pin. Sampling is configured and controlled by settings in the non-volatile configuration profile, which can be changed through the 2-pin configuration interface. Capacitance Active threshold Inactive threshold Touch delta Baseline Time Figure 4.1. Capacitive Sense Data Types 4.1.2 Touch Qualification Criteria The device detects a touch event when an inactive (untouched) input enabled by the input enable mask detects an sequence of measurements that cross the active threshold. The device detects a touch release event when an active (touched) input enabled by the input enable mask detects an sequence of measurements that cross the inactive threshold. The debounce configuration profile parameter defines how many measurements in a row must cross a threshold before a touch or release is qualified. In electrically noisy environments more heavily filtered data is used for qualification. 4.1.3 Thresholds Capacitive sensing inputs use input-specific thresholds for touch qualification. Each input uses two thresholds, one to detect inactive-toactive transitions on the input, and another to determine active-to-inactive transitions on the input. The inputs use two thresholds to add hysteresis and prevent active/inactive ringing on inputs. Each threshold can be set through Simplicity Studio tools and all thresholds are stored in non-volatile memory in the device's configuration profile. Thresholds are defined as percentages of a capacitive sensing input's touch delta. silabs.com | Building a more connected world. Rev. 1.1 | 15 CPT213B Data Sheet Functional Description 4.1.4 Debounce Counter Each capacitive sensing input maintains its own debounce counter. For an inactive sensor, this counter tracks the number of successive samples which have crossed that input's active threshold. For an active sensor, this counter tracks the number of successive samples which have crossed the inactive threshold. When the counter reaches a terminal value defined in the the configuration profile, the touch/release event is qualified. 4.1.5 Touch Deltas Each capacitive sensing input uses a stored touch delta value that describes the expected difference between inactive and active capacitive sensing output codes. This value is stored in the configuration profile for the system and is used by the touch qualification engine, which defines inactive and active thresholds relative to the touch delta. The touch deltas are stored in the configuration profile in a touch delta/16 format. For this reason, touch deltas must be configured as multiples of 16. 4.1.6 Auto-Accumulation and Averaging Capacitive sensing inputs have an auto-accumulate and average post-sample filter that can be used to improve signal strength if needed. Settings stored in the configuration profile can configure the engine to accumulate 1, 4, 8, 16, 32, or 64 samples. After the defined number of samples have been accumulated, the result is divided by either 1, 4, 8, 16, 32, or 64, depending on the accumulation setting. This auto-accumulated and averaged value is the sample output used for all touch qualification processing. Note that sample time per sensor increases as the level of accumulation increases. To reduce current consumption, the engine should not be set to auto-accumulate unless it is required to achieve acceptable signal strength due to thick overlays or other system-level factors. 4.1.7 Drive Strength The drive strength of the current source used to charge the electrode being measured by the capacitive sensing input can be adjusted in integer increments from 1x to 8x (8x is the default). High drive strength gives the best sensitivity and resolution for small capacitors, such as those typically implemented as touch-sensitive PCB features. To measure larger capacitance values, the drive strength should be lowered accordingly. The highest drive strength setting that yields capacitive sensing output which does not saturate the sensing engine when the electrode is active (touched) should always be used to maximize input sensitivity. 4.1.8 Active Mode Scan Enable Active mode scanning of capacitive sensing inputs is controlled by an enable setting for each capacitive sensing input. This setting is stored in the configuration profile. 4.1.9 Active Mode Scanning Once in sensing mode, the device continuously samples all enabled sensors. The device filters and processes each sample and qualifies touch events when detected. Qualified touch events and release events are expressed to the host through event buffer packets, which the host reads across the I2C interface after the device signals by activating the interrupt pin. 4.1.10 No Confidence Mode The device uses each sensor's sample to incrementally update an interference characterization metric. This metric controls filtering aggressiveness on samples fed into the touch qualification engine. If system-level interference is characterized by the device as being of a magnitude that prevents reliable touch qualification, the device disqualifies any currently-qualified touches, sending touch release event packets. No confidence mode entrance is expressed to the host in a status event packet. The host must initiate the query to the CPT213B to determine the device's current status. Once the device determines that no confidence mode can be exited, the status event packet will reflect this change. After exiting no confidence mode, touch qualification resumes. silabs.com | Building a more connected world. Rev. 1.1 | 16 CPT213B Data Sheet Functional Description 4.1.11 IEC60730 Functionality Once in sensing mode, the device periodically executes IEC60730 safety and plausibility checks on timing, memory, and hardware. If any of these plausibility checks fail, the device immediately enters a safe state that disables capacitive sensing and the I2C interface. Once the device enters a safe state, it will remain in this safe state until a hardware reset using the RSTb pin or power-on reset. The host communicating with the device is responsible for checking for the presence of status packets. If no status packet has been presented on the I2C bus by the device within two periods of expected status packet transmission, the host should assume that the CPT213B is in a safe state and respond accordingly. The typical expected status packet transmission period is 100 ms. The device performs a periodic analog plausibility check on each enabled sensor. A sensor trace that has been damaged such that it is shorted to ground or the supply will be detected during this plausibility check, and the device will enter safe state. 4.2 I2C Event Buffer Interface 4.2.1 Introduction The event buffer I2C interface provides an event-driven, packetized communication system describing newly qualified events generated by the capacitive sensing input engine. The supported packet structure includes safetey features adhering to IEC 60730 compliance specification. The interface runs in one of two mutually exclusive modes: sensing mode and configuration loading mode, where a new configuration profile can be downloaded to the device and stored in non-volatile memory. In sensing mode, the interface provides access to a first-in-first-out buffer of data packets. When the sensing engine generates these packets and pushes them onto the buffer, the interface then signals the host to indicate that one or more packets are available in the buffer by activating the event buffer interrupt pin. In sensing mode, the interrupt pin is defined as active-low and operates as a push-pull digital output. In configuration loading mode, the interrupt pin is configured as a digital input and functions as a chip select. I2C transactions will be ignored by the device unless the host has pulled the interrupt pin low before sending the start condition. The host reads the packets through an I2C interface, with the host acting as an I2C master. Once all packets have been fully transmitted across the I2C interface, the event buffer interrupt pin is de-activated. The device will remain in active mode until no packets remain in the buffer, even if no sensors have been qualified as active for the period of time defined by the active mode scan period. In configuration loading mode, the interface enables an in-system programming initiated by the host. In this mode, the host can update the performance configuration space. 4.2.2 Startup Behavior When the device exits a POR or hardware reset, it first enters configuration loading mode, discussed in detail 4.2.12 Configuration Loading Procedure. A host can command the device to enter sensing mode using the mode selection command discussed in 4.2.10 Entering Sensing Mode from Configuration Loading Mode. If the device has a valid configuration profile stored in non-volatile memory, the device will then enter sensing mode and remain in this mode until the next power cycle or reset. The device runs a number of safety checks immediately after exiting reset, including checks to memory and other core features. If any safety or plausibility test fails, the device enters safe state. A host can assume the device is in safe state if it is no longer responding to any I2C transactions. silabs.com | Building a more connected world. Rev. 1.1 | 17 CPT213B Data Sheet Functional Description 4.2.3 Sensing Mode Event Packet Structure Every qualified event detected by the capacitive sensing input engine generates a single packet that can be retrieved by the host processor through the event buffer I2C interface. The packet is an atomic data unit that fully describes the generated event. In addition to including touch sensing information, each packet includes IEC 60730 safety compliance bytes that must be received and examined by the host. Note: The bytes in the packet are transmitted MSB first. Each packet has a standard structure that can be parsed by the host. Table 4.1. Standard Packet Structure Byte # Designator 0 I2C Slave Address + read bit 1 I2C Slave Address (repeat with LSB = 0) 2 Packet counter and event type 3 Event description (byte 1) 4 Event description (byte 2) 5 CRC (MSB) 6 CRC (LSB) The packet counter is a 4-bit number stored in the upper bits of byte 2. Each new event will be assigned a counter value that is +1 from the last qualified event. After event 15, the counter wraps back to 0 for the next event. The counter captures the temporal nature of touch events so that a host can reconstruct a sequence of events over time. Also, the host can use the counter value to determine if a packet has been lost due to a buffer overflow. The event buffer counter is reset to 0 upon entrance to sensing mode. The event type is a 4-bit value describes the originator of the event. For instance, the source could be a capacitive sensing button. The event type is stored in the lower 4 bits of byte 2. The event description bytes define characteristics of the event that have been qualified. Event descriptions are defined relative to the event source. An event source that is a capacitive sensing input will have a defined set of valid event description values. Those same values will mean something different for a different type of event source. Event description values are defined relative to the event type field of byte 2. Touch Event Touch Release Event Status Event I2C Slave Address + read bit I2C Slave Address (repeat) + LSB = 0 byte 0 byte1 I2C Slave Address + read bit I2C Slave Address (repeat) + LSB = 0 byte 0 byte1 I2C Slave Address + read bit I2C Slave Address (repeat) + LSB = 0 byte 0 byte1 packet counter xxxx event type 0000 byte 2 packet counter xxxx event type 0001 byte 2 packet counter xxxx event type 1111 byte 2 CSxx index 0x00 16-bit CRC (MSB) 16-bit CRC (LSB) byte 3 byte 4 byte 5 byte 6 CSxx index 0x00 16-bit CRC (MSB) 16-bit CRC (LSB) byte 3 byte 4 byte 5 byte 6 Status 0x00 16-bit CRC (MSB) 16-bit CRC (LSB) byte 3 byte 4 byte 5 byte 6 Figure 4.2. I2C Event Buffer Packet Structure silabs.com | Building a more connected world. Rev. 1.1 | 18 CPT213B Data Sheet Functional Description The I2C Slave Address and read bit are repeated in byte 1 as required by the IEC 60730 standard. The address is left shifted to fill bits 7-1, and the LSB is cleared to 0. The CSxx index transmitted in byte 3 for Touch and Touch Release events enables the host processor to determine the sensor that caused the event. In both sensing mode and config loader mode, packets transferred across I2C include a 16-bit CRC in the last two bytes. More information on the algorithm used for this CRC calculation can be found in 4.2.4 CRC Algorithm. For each transaction, these CRCs include byte 1 and end before the two CRC bytes at the end of the packet. Both master read and master write transactions must follow this structure. Master write transactions sent to the device in configuration mode with incorrect CRCs will result in a safe state entrance upon any attempt to execute the mode selection command to switch to sensing mode. silabs.com | Building a more connected world. Rev. 1.1 | 19 CPT213B Data Sheet Functional Description 4.2.4 CRC Algorithm The CRC is generated using the standard CCITT-16 16-bit polynomial (0x1021) with an initial seed of 0xFFFF. The device generates a 16-bit CRC result equivalent to the following algorithm: 1. XOR the input with the most-significant bits of the current CRC result. If this is the first iteration of the CRC unit, the current CRC result will be the set initial value (0x0000 or 0xFFFF). 2. If the MSB of the CRC result is set, shift the CRC result and XOR the result with the polynomial. 3. If the MSB of the CRC result is not set, shift the CRC result. 4. Repeat steps 2 and 3 for all 8 bits. The algorithm is also described in the following example. unsigned short UpdateCRC (unsigned short CRC_acc, unsigned char CRC_input) { unsigned char i; // loop counter #define POLY 0x1021 // Create the CRC "dividend" for polynomial arithmetic (binary arithmetic // with no carries) CRC_acc = CRC_acc ^ (CRC_input << 8); // "Divide" the poly into the dividend using CRC XOR subtraction // CRC_acc holds the "remainder" of each divide // // Only complete this division for 8 bits since input is 1 byte for (i = 0; i < 8; i++) { // Check if the MSB is set (if MSB is 1, then the POLY can "divide" // into the "dividend") if ((CRC_acc & 0x8000) == 0x8000) { // if so, shift the CRC value, and XOR "subtract" the poly CRC_acc = CRC_acc << 1; CRC_acc ^= POLY; } else { // if not, just shift the CRC value CRC_acc = CRC_acc << 1; } } // Return the final remainder (CRC value) return CRC_acc; } The following table lists several input values and the associated outputs using this 16-bit CRC algorithm: Table 4.2. Example 16-bit CRC Outputs Input Output 0x63 0xBD35 0x8C 0xB1F4 0x7D 0x4ECA 0xAA, 0xBB, 0xCC 0x6CF6 0x00, 0x00, 0xAA, 0xBB, 0xCC 0xB166 silabs.com | Building a more connected world. Rev. 1.1 | 20 CPT213B Data Sheet Functional Description 4.2.5 Packet Retrieval in Sensing Mode When the least significant byte of an event packet has been transferred during a master read transaction, that event is popped from the device's buffer. If only a part of the event is read, the event will stay in the buffer and will be transmitted again by the device during the next read. If the host initiates a master read when the device is in sensing mode but the interrupt pin is not active, signifying that the device has no events in its buffer to transmit, the device will NACK its slave address on the bus. If the I2C master sends a stop condition on the bus before the entire packet has been read, the device will not pop the packet from its internal buffer. Instead, the I2C state machine will reset, and the next transaction will begin with the first byte of the same event that was being read in the previous, prematurely-terminated transaction. The I2C event buffer has a depth of 16 events. If the host does not read events promptly after seeing the interrupt pin go active, there is the possibility of a buffer overflow. In the event of an overflow, the device will enter safe state. New I2C packets will only be generated at the active mode sample rate, and so the buffer will fill a maximum of 13 packets (in the case simultaneous touch/releases) per sample period. If the host runs the I2C bus at 400 kHz and reads packets as soon as the interrupt pin activates, all packets can be read from the buffer in 1 to 2 ms, which is faster than the rate at which a new active mode scan sequence can complete. 4.2.6 Defined Event Types The device assigns the following event types: Table 4.3. Event Type Mapping Event Type Value Mapping Sensing Mode 0 (0x0) Sensor activity - touch event 1 (0x1) Sensor activity - release event 15 (0xF) Status packet Configuration Loading Mode 8 (0x8) Mode selection 9 (0x9) Configuration unlock 10 (0xA) Configuration erase 11 (0xB) Write configuration 12 (0xC) Write CRC Note that this event type value is stored in the lower 4 bits of the first non-address byte of a packet. The upper 4 bits are a packet counter value. silabs.com | Building a more connected world. Rev. 1.1 | 21 CPT213B Data Sheet Functional Description 4.2.7 Description Bytes for Touch Events A touch or release event uses only one byte of the description field. That field identifies which sensor caused the touch or release event as shown below. Table 4.4. Touch or Release Event Sensor Mapping Value Mapping 0 Capacitive sensing input 0 1 Capacitive sensing input 1 2 Capacitive sensing input 2 3 Capacitive sensing input 3 4 Capacitive sensing input 4 5 Capacitive sensing input 5 6 Capacitive sensing input 6 7 Capacitive sensing input 7 8 Capacitive sensing input 8 9 Capacitive sensing input 9 10 Capacitive sensing input 10 11 Capacitive sensing input 11 12 Capacitive sensing input 12 4.2.8 Description Bytes for Status Events The I2C event buffer transmits a status packet periodically when in sensing mode. Because configuration loading mode is considered to be a safe state, status packets are not transmitted when in configuration loading mode. This packet is used by the host to determine that the TouchXpress device is operational and not halted in its safe state. For status events, both event description bytes are 0x00, except that bit 0 of the MSB event description will be set to 1 if the sensor goes into 'no confidence mode' where touch qualification is temporarily prohibited due to interference conditions. Table 4.5. Status Packet Mapping Event Description Bit MSB 7-1 0 Status Indicator Reserved 0 - sensing is functional 1 - sensing is temporarily disabled because of no confidence mode entrance LSB 7-0 Reserved If the TouchXpress device has not offered to transmit a status packet within the defined time limit, the host must consider the I2C device in a safe state and respond accordingly. 4.2.9 Slave Address When the device comes out of reset and has not been commanded to enter sensing mode, the device responds to the slave address 0xC0. Additionally, the device will only respond to commands with address 0xC0 if the host drives the interrupt pin low, using the pin as a chip select. In sensing mode, the device responds to I2C transactions addressed to the slave address stored in the configuration profile. silabs.com | Building a more connected world. Rev. 1.1 | 22 CPT213B Data Sheet Functional Description 4.2.10 Entering Sensing Mode from Configuration Loading Mode Upon exiting reset, the device enters configuration loading mode. During this time, a host can re-write the configuration profile through a sequence of master write commands. The host can also command the device to enter sensing mode using the mode selection command. The mode switch command is structured as shown in the following figure. Mode Selection 0xC0 + write bit 0xC0 (repeat) + LSB = 0 byte 0 byte 1 packet counter xxxx event type 1000 byte 2 0x01 16-bit CRC (MSB) 16-bit CRC (LSB) byte 3 byte 4 byte 5 Note: The INT pin must be driven low prior to the I2C start and high after the I2C stop. Figure 4.3. Mode Selection Command The device will only enter sensing mode if the configuration profile stored in non-volatile memory is valid. The validity of the configuration profile can be checked using the Configuration Profile Validity Check command. If a mode selection call is made on a device where the configuration is not currently valid, the device will enter safe state and not respond to any further I2C transactions. Note that this mode setting feature must be executed once per device, per reset. Until this command has been received by a device, the device will remain in its startup state, executing periodic IEC checks but not performing any touch qualification. 4.2.11 Determining Configuration Validity At any point when the device is in configuration loading mode, the host can issue a Configuration Profile Validity Check command. This command is issued when the host starts a master read command. This command is unique in that it does not include a byte containing the packet counter or event type. Configuration Profile Validity Check 0xC0 + read bit 0xC0 (repeat) + LSB = 0 Configuration Profile State 16-bit CRC (MSB) 16-bit CRC (LSB) byte 0 byte 1 byte 2 byte 3 byte 4 Note: The INT pin must be driven low prior to the I2C start and high after the I2C stop. Note: This is a read transaction where data is provided from the CPT device. Figure 4.4. Configuration Profile Validity Check Command Table 4.6. Decoding the Configuration Profile State Value Description 0x80 Configuration profile valid 0x01 Configuration profile invalid The validity of the configuration profile is determined by comparing a CRC stored in non-volatile memory to a CRC generated at runtime by the device. The CRC is calculated using the algorithm described in 4.2.4 CRC Algorithm. Note: The CRC for the configuration profile spans 510 bytes, with 0xFF padding in addresses above any non-0xFF configuration profile bytes. silabs.com | Building a more connected world. Rev. 1.1 | 23 CPT213B Data Sheet Functional Description 4.2.12 Configuration Loading Procedure Once the device has been configured to configuration bootload mode, the I2C interface can accept and process the bootload command set. The bootloading procedure executes as follows in the steps below. Valid bootload mode commands are shown below. It is recommended that the host control the device's reset pin. Reset should be strobed before the configuration loading procedure begins. If multiple TouchXpress devices are being used in the system, all devices could be shorted to the same reset pin and strobed simultaneously for config loading and sensing mode re-entrance. 1. Host sends the configuration loading unlock sequence. 2. Host sends config erase command, which erases the configuration profile. Packet should be resent until device ACKs reception. 3. Host sends bytes 0-7 of configuration profile in a write config command. Packet resent until device ACKs reception. 4. Host repeats process of the previous step, sending the next 8 bytes of the config profile in a write config command, resending until packet is ACKed. 5. After all 8-byte packets of the configuration profile have been transmitted to the device and ACKed by the device, host sends write CRC command. This CRC uses the algorithm described in 4.2.4 CRC Algorithm. 6. Host sends a mode switch command to enter sensing mode. Once the device has successfully entered sensing mode after a mode switch command, the device will remain in sensing mode until a hardware reset. The packet counter is not used in configuration loading mode. Those 4 bits can be set to any value as long as the contents of the byte equal the value used as part of the packet CRC. Configuration Unlock Configuration Erase Write Configuration Write CRC Configuration Profile Validity Check packet counter xxxx event type 1001 0xC0 + write bit 0xC0 (repeat) + LSB = 0 byte 0 byte 1 0xC0 + write bit 0xC0 (repeat) + LSB = 0 byte 0 byte 1 0xC0 + write bit 0xC0 (repeat) + LSB = 0 byte 0 byte 1 0xC0 + write bit 0xC0 (repeat) + LSB = 0 byte 0 byte 1 byte 2 byte 3 byte 4 0xC0 + read bit 0xC0 (repeat) + LSB = 0 Configuration Profile State 16-bit CRC (MSB) 16-bit CRC (LSB) byte 0 byte 1 byte 2 byte 3 byte 4 byte 2 packet counter xxxx event type 1010 byte 2 packet counter xxxx event type 1011 byte 2 packet counter xxxx event type 1100 0xA5 0xF1 16-bit CRC (MSB) 16-bit CRC (LSB) byte 3 byte 4 byte 5 byte 6 16-bit CRC (MSB) 16-bit CRC (LSB) byte 3 byte 4 xx xx byte 3 byte 4 xx ... xx 16-bit CRC (MSB) 16-bit CRC (LSB) byte 11 byte 12 byte 9 byte 10 Config Config Profile CRC Profile CRC MSB LSB 16-bit CRC (MSB) 16-bit CRC (LSB) byte 5 byte 6 Note: The INT pin must be driven low prior to the I2C start and high after the I2C stop for each of these commands. Figure 4.5. Configuration Loading Command Sequence 4.3 Configuration Profile The configuration interface is used by the device to configure default values and performance characteristics that effect capacitive sensing. The configuration data can be programmed through the Configuration interface (Config Clk and Config Data pins) using [Xpress Configurator] in Simplicity Studio or through the I2C interface from the host processor. Several configuration profile templates are available in Simplicity Studio to provide a starting point for development. silabs.com | Building a more connected world. Rev. 1.1 | 24 CPT213B Data Sheet Pin Definitions 5. Pin Definitions CS00 CS01 CS02 CS03 CS04 CS05 24 23 22 21 20 19 5.1 CPT213B QFN24 Pin Definitions N/C 1 18 CS06 GND 2 17 CS07 VDD 3 16 CS08 N/C 4 15 CS09 N/C 5 14 CS10 RSTb / Config Clk 6 13 CS11 24 pin QFN (Top View) 12 CS12 10 N/C 11 9 EB_SCL EB_SDA 8 EB_INT Config Data 7 GND Figure 5.1. CPT213B QFN24 Pinout Table 5.1. Pin Definitions for CPT213B QFN24 Pin Pin Name Description 1 N/C No connect 2 GND Ground 3 VDD Supply power input 4 N/C No connect 5 N/C No connect Number silabs.com | Building a more connected world. Rev. 1.1 | 25 CPT213B Data Sheet Pin Definitions Pin Pin Name Description RSTb / Active-low reset / Config Clk Configuration clock 7 Config Data Configuration data 8 EB_INT Push-pull digital output Number 6 Event buffer interrupt pin 9 EB_SCL Open drain digital output Event buffer I2C SCL 10 N/C No connect 11 EB_SDA Open drain digital input Event buffer I2C SDA 12 CS12 Analog input Capacitive sensing input 12 13 CS11 Analog input Capacitive sensing input 11 14 CS10 Analog input Capacitive sensing input 10 15 CS09 Analog input Capacitive sensing input 9 16 CS08 Analog input Capacitive sensing input 9 17 CS07 Analog input Capacitive sensing input 7 18 CS06 Analog input Capacitive sensing input 6 19 CS05 Analog input Capacitive sensing input 5 20 CS04 Analog input Capacitive sensing input 4 21 CS03 Analog input Capacitive sensing input 3 22 CS02 Analog input Capacitive sensing input 2 23 CS01 Analog input Capactive sensing input 1 24 CS00 Analog input Capacitive sensing input 0 silabs.com | Building a more connected world. Rev. 1.1 | 26 CPT213B Data Sheet QFN24 Package Specifications 6. QFN24 Package Specifications 6.1 QFN24 Package Dimensions Figure 6.1. QFN24 Package Drawing Table 6.1. QFN24 Package Dimensions Dimension Min Typ Max A 0.70 0.75 0.80 A1 0.00 0.02 0.05 b 0.18 0.25 0.30 D D2 4.00 BSC 2.55 2.70 e 0.50 BSC E 4.00 BSC 2.80 E2 2.55 2.70 2.80 L 0.30 0.40 0.50 L1 0.00 -- 0.15 aaa -- -- 0.15 bbb -- -- 0.10 silabs.com | Building a more connected world. Rev. 1.1 | 27 CPT213B Data Sheet QFN24 Package Specifications Dimension Min Typ Max ddd -- -- 0.05 eee -- -- 0.08 Z -- 0.24 -- Y -- 0.18 -- Note: 1. All dimensions shown are in millimeters (mm) unless otherwise noted. 2. Dimensioning and Tolerancing per ANSI Y14.5M-1994. 3. This drawing conforms to JEDEC Solid State Outline MO-220, variation WGGD except for custom features D2, E2, Z, Y, and L which are toleranced per supplier designation. 4. Recommended card reflow profile is per the JEDEC/IPC J-STD-020C specification for Small Body Components. silabs.com | Building a more connected world. Rev. 1.1 | 28 CPT213B Data Sheet QFN24 Package Specifications 6.2 PCB Land Pattern Figure 6.2. PCB Land Pattern Drawing Table 6.2. PCB Land Pattern Dimensions Dimension Min Max C1 3.90 4.00 C2 3.90 4.00 E 0.50 BSC X1 0.20 0.30 X2 2.70 2.80 Y1 0.65 0.75 Y2 2.70 2.80 Note: 1. All dimensions shown are in millimeters (mm) unless otherwise noted. 2. This Land Pattern Design is based on the IPC-7351 guidelines. 3. All metal pads are to be non-solder mask defined (NSMD). Clearance between the solder mask and the metal pad is to be 60 m minimum, all the way around the pad. 4. A stainless steel, laser-cut and electro-polished stencil with trapezoidal walls should be used to assure good solder paste release. 5. The stencil thickness should be 0.125 mm (5 mils). 6. The ratio of stencil aperture to land pad size should be 1:1 for all perimeter pads. 7. A 2 x 2 array of 1.10 mm x 1.10 mm openings on 1.30 mm pitch should be used for the center ground pad. 8. A No-Clean, Type-3 solder paste is recommended. 9. The recommended card reflow profile is per the JEDEC/IPC J-STD-020 specification for Small Body Components. silabs.com | Building a more connected world. Rev. 1.1 | 29 CPT213B Data Sheet QFN24 Package Specifications 6.3 Package Marking CPT213B TTTTTT YYWW Figure 6.3. Package Marking The package marking consists of: * CPT213B - The part number designation. * TTTTTT - A trace or manufacturing code. The first letter of this code is the hardware revision. * YY - The last two digits of the assembly year. * WW - The 2-digit workweek when the device was assembled. silabs.com | Building a more connected world. Rev. 1.1 | 30 CPT213B Data Sheet Relevant Application Notes 7. Relevant Application Notes The following Application Notes are applicable to the CPT213B devices: * AN957: TouchXpressTM Configuration and Profiling Guide -- This application note guides developers through the evaluation and configuration process of TouchXpress devices using Simplicity Studio [Xpress Configurator] and [Capacitive Sense Profiler]. * AN447: Printed Circuit Design Notes for Capacitive Sensing Performance -- This document describes hardware design guidelines specifically for capacitive sensing applications, including button placement and other layout guidelines. * AN949: TouchXpressTM Programming Guide -- This application note discusses the production programming options available for TouchXpress devices. * AN1074: EFM8 Family IEC60730 Library -- This application note discusses how to create systems that are IEC compliant. This process will be required for the host talking to the CPT213B device. Application Notes can be accessed on the Silicon Labs website (www.silabs.com/interface-appnotes) or in Simplicity Studio in the [Documentation]>[Application Notes] area. silabs.com | Building a more connected world. Rev. 1.1 | 31 CPT213B Data Sheet Revision History 8. Revision History 8.1 Revision 1.1 June 30th, 2017 Updated the Power-On Reset Test Period typical value in 3.1.7 IEC 60730 Safety Timing. Added 3.1.5 I2C Configuration Interface. 8.2 Revision 1.0 May 10th, 2017 Initial release. silabs.com | Building a more connected world. Rev. 1.1 | 32 Simplicity Studio One-click access to MCU and wireless tools, documentation, software, source code libraries & more. Available for Windows, Mac and Linux! IoT Portfolio www.silabs.com/IoT SW/HW www.silabs.com/simplicity Quality www.silabs.com/quality Support and Community community.silabs.com Disclaimer Silicon Labs intends to provide customers with the latest, accurate, and in-depth documentation of all peripherals and modules available for system and software implementers using or intending to use the Silicon Labs products. Characterization data, available modules and peripherals, memory sizes and memory addresses refer to each specific device, and "Typical" parameters provided can and do vary in different applications. Application examples described herein are for illustrative purposes only. Silicon Labs reserves the right to make changes without further notice and limitation to product information, specifications, and descriptions herein, and does not give warranties as to the accuracy or completeness of the included information. Silicon Labs shall have no liability for the consequences of use of the information supplied herein. This document does not imply or express copyright licenses granted hereunder to design or fabricate any integrated circuits. The products are not designed or authorized to be used within any Life Support System without the specific written consent of Silicon Labs. A "Life Support System" is any product or system intended to support or sustain life and/or health, which, if it fails, can be reasonably expected to result in significant personal injury or death. Silicon Labs products are not designed or authorized for military applications. Silicon Labs products shall under no circumstances be used in weapons of mass destruction including (but not limited to) nuclear, biological or chemical weapons, or missiles capable of delivering such weapons. Trademark Information Silicon Laboratories Inc.(R) , Silicon Laboratories(R), Silicon Labs(R), SiLabs(R) and the Silicon Labs logo(R), Bluegiga(R), Bluegiga Logo(R), Clockbuilder(R), CMEMS(R), DSPLL(R), EFM(R), EFM32(R), EFR, Ember(R), Energy Micro, Energy Micro logo and combinations thereof, "the world's most energy friendly microcontrollers", Ember(R), EZLink(R), EZRadio(R), EZRadioPRO(R), Gecko(R), ISOmodem(R), Micrium, Precision32(R), ProSLIC(R), Simplicity Studio(R), SiPHY(R), Telegesis, the Telegesis Logo(R), USBXpress(R), Zentri and others are trademarks or registered trademarks of Silicon Labs. ARM, CORTEX, Cortex-M3 and THUMB are trademarks or registered trademarks of ARM Holdings. Keil is a registered trademark of ARM Limited. All other products or brand names mentioned herein are trademarks of their respective holders. Silicon Laboratories Inc. 400 West Cesar Chavez Austin, TX 78701 USA http://www.silabs.com