STMPE16M31 STMPE24M31 S-Touch 16/24-channel touchkey controller with PWM and ratio engines Features Up to 24 capacitive sensor inputs Independent and configurable automatic calibration on all channels 15 fF resolution, 512 steps with 30 pF auto- tuning Up to 30 pF external reference capacitor 2 units of 8-input ratiometric engines QFN40 QFN32 supporting 256 steps slider/wheel (5 x 5 mm) (4 x 4 mm) PWM and GPIO: Up to 16 general purpose inputs/outputs 8 independent PWM controllers, up to 16 Description PWM outputs The STMPE16M31 and STMPE24M31 capacitive 12 mA sourcing/sinking on GPIO for LED touchkey controllers offer highly versatile and driving (at 3.3 V V ) IO flexible capacitive sensing capabilities in one Maximum source/sink current 120 mA single chip. Operating voltage: The devices integrate up to 24 capacitive sensing 1.65 - 1.95 V (V , internally supplied) CC channels which are highly sensitive and noise 2.7-5.5V(V ) IO tolerant. Two units of hardwired ratiometric engines enable the implementation of a Low operating current: 400 A in active mode, slider/wheel without external computations. Eight 50 A in sleep mode and 5 A in hibernate independent PWM controllers allow to control up mode to 16 LEDs with brightness control, ramping and 2 2 I C interface (up to 400 kHz). I C is 3.3 V 2 blinking capabilities. The I C interface supports tolerant up to 400 kHz communication with the system 8 kV HBM ESD protection on all sensing pins host. A very wide dynamic range allows most applications to work without hardware tuning. 200V MM ESD protection on all pins A single STMPE24M31 device can be used to Applications implement a complete notebook multimedia control bar with eight capacitive touchkeys, an 8- Multimedia bars in notebook computers channel slider with 256 steps resolution and eight independently controlled LED. Portable media players and game consoles Mobile phones and smartphones Table 1. Device summary Order code Package Packaging STMPE24M31QTR QFN40 (5 x 5 mm) Tape and reel STMPE16M31QTR QFN32 (4 x 4 mm) Tape and reel April 2011 Doc ID 16174 Rev 4 1/85 www.st.com 85 Obsolete Product(s) - Obsolete Product(s)Contents STMPE16M31, STMPE24M31 Contents 1 Pin assignment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 1.1 Power scheme . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 1.2 Power states . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 2 2I C interface module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 2.1 Device operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 3 Read operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 4 Write operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 4.1 Write operations for one or more bytes . . . . . . . . . . . . . . . . . . . . . . . . . . 16 5 General call address . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 6 Register map and function description . . . . . . . . . . . . . . . . . . . . . . . . . 18 7 System controller . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 7.1 Interrupt system . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 8 Interrupt service routine . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 9 GPIO controller . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 10 PWM array controller . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37 11 PWM controller . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 11.1 PWM function register map . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 12 Basic PWM programming . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45 12.1 Interrupt on basic PWM controller . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47 13 Touch sensor controller . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48 13.1 Sampling rate calculation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49 13.2 Sensor resolution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49 2/85 Doc ID 16174 Rev 4 Obsolete Product(s) - Obsolete Product(s)