![]() |
|
If you can't view the Datasheet, Please click here to try to view without PDF Reader . |
|
Datasheet File OCR Text: |
this is preliminary information on a new product now in deve lopment or undergoing evaluation. details are subject to change without notice. for further information contact your local stmicroelectronics sales office. april 2012 doc id 022985 rev 1 1/46 1 stm8l051f3 value line, 8-bit ultralow power mcu, 8-kb flash, 256-byte data eeprom, rtc, timers, usart, i2c, spi, adc data brief ? preliminary data features operating conditions ? operating power supply: 1.8 v to 3.6 v temperature range: ? 40 c to 85 c low power features ? 5 low power modes: wait, low power run, low power wait, active-halt with rtc, halt ? ultralow leakage per i/0: 50 na ? fast wakeup from halt: 5 s advanced stm8 core ? harvard architecture and 3-stage pipeline ? max freq: 16 mhz, 16 cisc mips peak ? up to 40 external interrupt sources reset and supply management ? low power, ultrasafe bor reset with 5 selectable thresholds ? ultra low power por/pdr ? programmable voltage detector (pvd) clock management ? 32 khz and 1 to 16 mhz crystal oscillators ? internal 16 mhz factory-trimmed rc ? internal 38 khz low consumption rc ? clock security system low power rtc ? bcd calendar with alarm interrupt ? digital calibration with +/- 0.5 ppm accuracy ? lse security system ? auto-wakeup from halt w/ periodic interrupt memories ? 8 kbytes of flash program memory and 256 bytes of data eeprom with ecc ? flexible write and read protection modes ? 1 kbyte of ram dma ? 4 channels supporting adc, spi, i2c, usart, timers ? 1 channel for memory-to-memory 12-bit adc up to 1 msps/28 channels ? internal reference voltage timers ? two 16-bit timers with 2 channels (used as ic, oc, pwm), quadrature encoder ? one 8-bit timer with 7-bit prescaler ? 2 watchdogs: 1 window, 1 independent ? beeper timer with 1, 2 or 4 khz frequencies communication interfaces ? synchronous serial interface (spi) ?fast i 2 c 400 khz smbus and pmbus ?usart up to 18 i/os, all mappab le on interrupt vectors development support ? fast on-chip programming and non- intrusive debugging with swim ? bootloader using usart table 1. device summary reference part number stm8l051xx stm8l051f3 tssop20 www.st.com
contents stm8l051f3 2/46 doc id 022985 rev 1 contents 1 introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 2 description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 2.1 device overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 2.2 ultra low power continuum . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 3 functional overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 3.1 low power modes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 3.2 central processing unit stm8 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 3.2.1 advanced stm8 core . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 3.2.2 interrupt controller . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 3.3 reset and supply management . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 3.3.1 power supply scheme . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 3.3.2 power supply supervisor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 3.3.3 voltage regulator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 3.4 clock management . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 3.5 low power real-time clock . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 3.6 memories . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 3.7 dma . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 3.8 analog-to-digital converter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 3.9 system configuration controller and routi ng interface . . . . . . . . . . . . . . . 17 3.10 timers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 3.10.1 16-bit general purpose timers (tim2, tim3) . . . . . . . . . . . . . . . . . . . . . 17 3.10.2 8-bit basic timer (tim4) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 3.11 watchdog timers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 3.11.1 window watchdog timer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 3.11.2 independent watchdog timer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 3.12 beeper . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 3.13 communication interfaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 3.13.1 spi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 3.13.2 i 2 c . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 3.13.3 usart . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 3.14 infrared (ir) interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 stm8l051f3 contents doc id 022985 rev 1 3/46 3.15 development support . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 4 pin description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 4.1 system configuration options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 5 memory and register map . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 5.1 memory mapping . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 5.2 register map . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 6 interrupt vector mapping . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38 7 package characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 7.1 ecopack . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 7.2 package mechanical data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 7.2.1 20-lead thin shrink small package (tssop20) . . . . . . . . . . . . . . . . . . . 41 7.2.2 32-pin low profile quad flat package (lqfp32) . . . . . . . . . . . . . . . . . . 42 8 device ordering information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44 9 revision history . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45 list of tables stm8l051f3 4/46 doc id 022985 rev 1 list of tables table 1. device summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 table 2. low density value line stm8l05xxx low power device features and peripheral counts. . . . 8 table 3. timer feature comparison . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 table 4. low density value line stm8l05xxx pin description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 table 5. flash and ram boundary addresses . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 table 6. i/o port hardware register map . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 table 7. general hardware register map . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 table 8. cpu/swim/debug module/interrupt controller registers . . . . . . . . . . . . . . . . . . . . . . . . . . . 36 table 9. interrupt mapping . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38 table 10. tssop20 20-lead thin shrink small package, mechanical data . . . . . . . . . . . . . . . . . . . . . 41 table 11. lqfp32 32-pin low profile quad flat package, mechanical data. . . . . . . . . . . . . . . . . . . . . 42 table 12. document revision history . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45 stm8l051f3 list of figures doc id 022985 rev 1 5/46 list of figures figure 1. low density value line stm8l05xxx device block diagram . . . . . . . . . . . . . . . . . . . . . . . . 10 figure 2. low density value line stm8l05xxx clock tree diagram . . . . . . . . . . . . . . . . . . . . . . . . . . 15 figure 3. stm8l051fx 20-pin tssop20 package pinout. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 figure 4. memory map . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 figure 5. tssop20 20-lead thin shrink small package outline . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 figure 6. tssop20 recommended footprint . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 figure 7. lqfp32 32-pin low profile quad flat package outline . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42 figure 8. lqfp32 recommended footprint . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 3 figure 9. low density value line stm8l05xxx ordering information scheme . . . . . . . . . . . . . . . . . . 44 introduction stm8l051f3 6/46 doc id 022985 rev 1 1 introduction this document describes the features, pinout, mechanical data and ordering information for the low density value line stm8l151f3 microcontroller with 8-kbyte flash memory density. for more details on the whole stmicroelectronics ultra low power family please refer to section 2.2: ultra low power continuum . for detailed information on device operation and registers, refer to the reference manual (rm0031). for information on to the flash program memory and data eeprom, refer to the programming manual (pm0054). for information on the debug module and swim (single wire interface module), refer to the stm8 swim communication protocol and debug module user manual (um0470). for information on the stm8 core, refer to the stm8 cpu programming manual (pm0044). low density value line devices provide the following benefits: integrated system ? 8 kbytes of low-density embedded flash program memory ? 256 bytes of data eeprom ? 1 kbyte of ram ? internal high-speed and low-power low speed rc ? embedded reset ultra low power consumption ? 1 a in active-halt mode ? clock gated system and optimized power management ? capability to execute from ram for lo w power wait mode and low power run mode advanced features ? up to 16 mips at 16 mhz cpu clock frequency ? direct memory access (dma) for memory-to-memory or peripheral-to-memory access short development cycles ? application scalability acro ss a common family prod uct architecture with compatible pinout, memory map and modular peripherals ? wide choice of development tools these features make the value line stm8l05xxx ultra low power microcontroller family suitable for a wide range of consumer and mass market applications. refer to table 2: low density value line stm8l05xxx low power device features and peripheral counts and section 3: functional overview for an overview of the complete range of peripherals proposed in this family. figure 1 shows the block diagram of the low density value line stm8l05xxx family. stm8l051f3 description doc id 022985 rev 1 7/46 2 description the low density value line stm8l05xxx devices are members of the stm8l ultra low power 8-bit family. the stm8l ultra low power family features an enhanced stm8 cpu core providing increased processing power (up to 16 mips at 16 mhz) while maintaining the advantages of a cisc architecture with improved code density, a 24-bit linear addressing space and an optimized architecture for low power operations. the family includes an integrated debug module with a hardware interface (swim) which allows non-intrusive in-application debugging and ultra-fast flash programming. low density value line stm8l05 xxx microcontrollers featur e embedded data eeprom and low power , low-voltage, single-supply program flash memory. the devices incorporate an extensive range of enhanced i/os and peripherals, a 12-bit adc, a real-time clock, two 16-bit timers, one 8-bit timer, as well as standard communication interfaces such as an spi, an i 2 c interface, and one usart. the modular design of the peripheral set allows the same peripherals to be found in different st microcontroller families includ ing 32-bit families. this make s any transition to a different family very easy, and simplified even more by the use of a common set of development tools. all stm8l ultra low power products are based on the same architecture with the same memory mapping and a coherent pinout. description stm8l051f3 8/46 doc id 022985 rev 1 2.1 device overview table 2. low density value line stm8l05xxx low power device features and peripheral counts features stm8l051f3 flash (kbytes) 8 data eeprom (bytes) 256 ram (kbytes) 1 timers basic 1 (8-bit) general purpose 2 (16-bit) communicati on interfaces spi 1 i2c 1 usart 1 gpios 18 (1) 1. the number of gpios given in this table includes the nrst/pa1 pin but the application can use the nrst/pa1 pin as general purpose output only (pa1). 12-bit synchronized adc (number of channels) 1 (10) others rtc, window watchdog, independent watchdog, 16-mhz and 32-khz internal rc, 1- to 16-mhz and 32-khz external oscillator cpu frequency 16 mhz operating voltage 1.8 to 3.6 v operating temperature ?? 40 to +85 c package tssop20 stm8l051f3 description doc id 022985 rev 1 9/46 2.2 ultra low power continuum the ultra low power value line stm8l05xxx are fully pin-to-pin, software and feature compatible. besides the full compatibility wit hin the family, the devices are part of stmicroelectronics microcontrollers ultra low power strategy which also includes stm8l101xx and stm32 l15xxx. the stm8l and stm32l families allow a continuum of performance, peripherals, system architecture, and features. they are all based on stmicroelectronics 0.13 m ultralow leakage process. note: the stm8l051xx are pin-to-pin compatible with stm8l101xx devices. performance all families incorporate highly energy-efficien t cores with both harvar d architecture and pipelined execution: advanced stm8 core fo r stm8l families and arm cortex?-m3 core for stm32l family. in addition specific care for the design architecture has been taken to optimize the ma/dmips and ma/mhz ratios. this allows the ultra low power performance to range from 5 up to 33.3 dmips. shared peripherals stm8l051xx and stm32l15xx share identical peripherals which ensure a very easy migration from one family to another: analog peripheral: adc1 digital peripherals: rtc and some communication interfaces common system strategy to offer flexibility and opti mize performance, the stm8 l051xx and stm32l15xx devices use a common architecture: same power supply range from 1.65 to 3.6 v architecture optimized to reach ultra low consumption both in low power modes and run mode fast startup strategy from low power modes flexible system clock ultra-safe reset: same reset strategy for both stm8l051xx and stm32l15xx including power-on reset, power-down reset, brownout reset and programmable voltage detector. features st ultra low power continuum also lies in feature compatibility: more than 10 packages with pin count from 20 to 100 pins and size down to 3 x 3 mm memory density ranging from 4 to 128 kbytes functional overview stm8l051f3 10/46 doc id 022985 rev 1 3 functional overview figure 1. low density value line stm8l05xxx device block diagram 1. legend : adc: analog-to-digital converter bor: brownout reset dma: direct memory access i2c: inter-integrated circuit multimaster interface iwdg: independent watchdog por/pdr: power-on reset / power-down reset rtc: real-time clock spi: serial peripheral interface swim: single wire interface module usart: universal synchronous as ynchronous receiver transmitter wwdg: window watchdog - 3 6 # l o c k c o n t r o l l e r a n d # 3 3 # l o c k s ! d d r e s s c o n t r o l a n d d a t a b u s e s + b y t e + b y t e 2 ! - t o c o r e a n d p e r i p h e r a l s ) 7 $ ' k ( z c l o c k 0 o r t ! 0 o r t " 0 o r t # 0 o w e r 6 / , 4 2 % ' 7 7 $ ' b y t e 0 o r t $ " e e p e r 2 4 # m e m o r y 0 r o g r a m $ a t a % % 0 2 / - 6 $ $ 6 $ $ 6 $ $ 6 6 3 3 3 7 ) - 3 # , 3 $ ! 3 0 ) ? - / 3 ) 3 0 ) ? - ) 3 / 3 0 ) ? 3 # + 3 0 ) ? . 3 3 5 3 ! 2 4 ? 2 8 5 3 ! 2 4 ? 4 8 5 3 ! 2 4 ? # + ! $ # ? ) . x 6 $ $ ! 6 3 3 ! 3 - " 6 $ $ ! 6 3 3 ! b i t ! $ # 6 $ $ 2 % & 6 . 2 3 4 0 ! ; = 0 " ; = 0 # ; = 0 $ ; = " % % 0 ! , ! 2 - # ! , ) " 4 ! - 0 0 / 2 0 $ 2 / 3 # ? ) . / 3 # ? / 5 4 / 3 # ? ) . / 3 # ? / 5 4 t o " / 2 0 6 $ 0 6 $ ? ) . 2 % 3 % 4 $ - ! c h a n n e l s c h a n n e l s c h a n n e l s ) n t e r n a l r e f e r e n c e v o l t a g e 6 2 % & |