![]() |
|
If you can't view the Datasheet, Please click here to try to view without PDF Reader . |
|
Datasheet File OCR Text: |
for further information contact your local stmicroelectronics sales office. february 2014 docid023933 rev 4 1/59 xxxx-touch-lib stmtouch library data brief features ? complete free c sour ce code library with firmware examples for stm8l, stm8tl5x, stm32f0xx, stm32f3xx and stm32l1xx microcontrollers ? both surface charge transfer (ct) and proxsense tm (pxs) acquisit ion principles supported ? multifunction capability to combine capacitive sensing functions with tr aditional mcu features ? modular architecture allowing easy addition of new acquisitions or sensors ? acquisition, filtering and calibration functions ? enhanced processing features for optimized sensitivity and immunity ? environment control system (ecs) ? detection time out (dto) ? detection exclusion system (dxs) ? noise filter ? flexible touchkey/linear/rotary touch sensors configuration and combination ? unlimited number of sensors supported ? each sensor can have its own state machine ? active shield feature ? compliant with misra ? compliant with cosmic, ia r, raisonance, keil, altium and atollic c compilers description stmicroelectronics touch-sensing libraries provide a complete robust free source-code solution to be used on stm8l, stm8tl5x, stm32f0xx, stm32f3xx and stm32l1xx microcontrollers. this solution allows designers familiar with the use of st andard microcontrollers to create higher-end human interfaces by replacing conventional electromechanical switches by capacitive sensors. the xxxx-touch-lib is part of the application firmware. it allows comb ining various capacitive sensing touchkeys, linear or rotary touch sensors with traditional mcu features (communications, control of leds, beeper or lcd) in the same application. two capacitive acquisition principles, surface charge transfer (ct) and proxsense tm , are available and can be co nfigured at compiling level. both acquisition pr inciples offer the same advanced processing algori thms to filter out noise and to compensate environmental parameters such as temperature, humidity, and power supply variation. note: proxsense is a trademark of azoteq (pty) ltd. table 1. device summary reference part number xxxx-touch-lib stm8l-touch-lib stm8tl-touch-lib 32F0-TOUCH-LIB 32f3-touch-lib 32l1-touch-lib www.st.com
contents xxxx-touch-lib 2/59 docid023933 rev 4 contents 1 proxsense (pxs) acquisition principle . . . . . . . . . . . . . . . . . . . . . . . . . . 5 2 surface charge transfer (ct) acquisition principle . . . . . . . . . . . . . . . . 5 3 stmtouch library architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 4 mcu resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 5 touch-sensing channels availability . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 5.1 stm8l . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 5.1.1 stm8l features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 5.1.2 stm8l available touch-sensing channels . . . . . . . . . . . . . . . . . . . . . . . 10 5.2 stm8tl5x . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 5.2.1 stm8tl5x features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 5.2.2 stm8tl5x available touch-sensing channels . . . . . . . . . . . . . . . . . . . . 18 5.3 stm32f0xx . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 5.3.1 stm32f0xx features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 5.3.2 stm32f0xx available touch-sensing chan nels . . . . . . . . . . . . . . . . . . . 22 5.4 stm32f3xx . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 5.4.1 stm32f3xx features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 5.4.2 stm32f3xx available touch-sensing chan nels . . . . . . . . . . . . . . . . . . . 28 5.5 stm32l1xx . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 5.5.1 stm32l1xx features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 5.5.2 stm32l1xx available touch-sensing channels . . . . . . . . . . . . . . . . . . . 35 6 memory footprint . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54 6.1 stm8l . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54 6.2 stm8tl5x . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55 6.3 stm32f0xx . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55 6.4 stm32f3xx . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56 6.5 stm32l1xx . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57 7 revision history . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58 docid023933 rev 4 3/59 xxxx-touch-lib list of tables 3 list of tables table 1. device summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 table 2. list of peripherals used by the stmtouch driver . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 table 3. available touch-sensing channels for stm8l101. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 table 4. available touch-sensing channels for stm8l15x / stm8l16x (table 1/2) . . . . . . . . . . . . . 12 table 5. available touch-sensing channels for stm8l15x / stm8l16x (table 2/2) . . . . . . . . . . . . . 14 table 6. available touch-sensing channels for stm8tl5x. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 table 7. available touch sensing channels for stm32f042. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 table 8. available touch sensing channels for stm32f 051 and stm32f072 . . . . . . . . . . . . . . . . . 25 table 9. available touch sensing channels for stm32f30x . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 table 10. available touch sensing channels for stm32f37x . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 table 11. available touch sensing channels for stm32l1xx 5 12k . . . . . . . . . . . . . . . . . . . . . . . . . . 36 table 12. available touch sensing channels for stm32l1xx 3 84k . . . . . . . . . . . . . . . . . . . . . . . . . . 40 table 13. available touch sensing channels for stm32l1xx 256k (table 1/2). . . . . . . . . . . . . . . . . . 44 table 14. available touch sensing channels for stm32l1xx 256k (table 2/2). . . . . . . . . . . . . . . . . . 48 table 15. available touch sensing channels for stm32l15x 32k to 128k . . . . . . . . . . . . . . . . . . . . 51 table 16. stm8l101 memory footprint with software acquisit ion mode . . . . . . . . . . . . . . . . . . . . . . 54 table 17. stm8l15x memory footprint with hardware acquis ition mode . . . . . . . . . . . . . . . . . . . . . . 54 table 18. stm8l15x memory footprint with software acquisit ion mode. . . . . . . . . . . . . . . . . . . . . . . 54 table 19. stm8tl5x memory footprint . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55 table 20. stm32f0xx memory footprint . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55 table 21. stm32f30x memory footprint . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56 table 22. stm32f37x memory footprint . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56 table 23. stm32l1xx memory footprint, example 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57 table 24. stm32l1xx memory footprint, example 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57 table 25. document revision history . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58 list of figures xxxx-touch-lib 4/59 docid023933 rev 4 list of figures figure 1. stmtouch driver architecture 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 figure 2. stmtouch driver architecture 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 docid023933 rev 4 5/59 xxxx-touch-lib proxsense (pxs) acquisition principle 58 1 proxsense (pxs) acquisition principle this peripheral operates in projected mo de which is used to measure the charge transferred by a driven electrode to a second electrode. this acquisition principle is only available on stm8tl5x devices. for more information see the stm8tl5x reference manual (rm0312). 2 surface charge transfer (ct) acquisition principle the surface charge transfer acquisition consis ts in charging the electrode capacitance (c x ) and transferring part of the accumulated charge into a sampling capacitor (c s ). this sequence is repeated until the voltage across c s reaches a given threshold. the number of transfers required to reach the threshold depe nds on the size of the electrode capacitance. the ct acquisition can be managed in three different ways: ? using the touch sensing controller (tsc ) on stm32f0xx and stm32f3xx devices ? using the routing interface (ri) only for stm8l and stm32l1xx devices with software acquisition ? using the routing interface (ri) and two 16-bits timers for stm8l and stm32l1xx devices with hardwa re acquisition. please see the table 2 for more details about the peripherals used. stmtouch library arch itecture xxxx-touch-lib 6/59 docid023933 rev 4 3 stmtouch library architecture the stmtouch library is a ?package ? composed of different elements: ? the ?stmtouch driver? directory contains the firmware layer to perform the touch- sensing acquisition and the sensors proc essing. this driver contains all the acquisitions for all supported microcontrollers. this is the core of the stmtouch library ? the ?stmtouch examples? directory contains a set of firmware examples to show how to use the stmtouch driver ? the ? standard peripherals driver? directory contains the firm ware layer to access the standard peripherals ? the ?cmsis driver? directory contains the cortex mi crocontroller software interface standard (stm32 only) ? the ?utilities drivers? directory contains the drivers to access for example the lcd on the evaluation boards. note: there is one stmtouch library per microcontroller family (stm8l stmtouch library, stm8tl5x stmtouch library, stm32f0xx stmtouch library, stm32f3xx stmtouch library, stm32l1xx stmtouch library...). figure 1 and figure 2 show the stmtouch driver layers. figure 1. stmtouch driver architecture 1 0 6 9 8 v h u d s s o l f d w l r q h [ d p s o h v 6 7 0 7 r x f k g u l y h u 6 w d q g d u g s h u l s k h u d o v o l e u d u \ 0 & |