This is information on a product in full production.
February 2015 DocID17959 Rev 4 1/125
STM8L162M8 STM8L162R8
8-bit ultra-low-power MCU, 64 KB Flash, 2 KB dat a EEPROM, RTC,
AES, LCD, timers, USARTs, I2C, SPIs, ADC, DAC, COMPs
Datasheet - production data
Features
Operating conditions
Operating power supply: 1.65 to 3.6 V
(without BOR), 1.8 to 3.6 V (with BOR)
Temp. range: -40 to 85, 105 or 125 °C
Low-power features
5 low-power modes: Wait, Low-power run,
Low-power wait, Active-halt with full RTC,
Halt
Ultra low leakage per I/0: 50 nA
Fast wake up from Halt mode: 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, ultra safe BOR reset with five
selectable thresholds
Ultra-low-power POR/PDR
Programmable voltage detector (PVD)
Clock management
32 kHz and 1-16 MHz crystal oscillators
Internal 16 MHz factory-trimmed RC and
38 kHz low consumption RC
Clock security system
Low-power RTC
BCD calendar with alarm interrupt,
Digital calibration with +/- 0.5ppm accuracy
LSE security system
Auto wake up from Halt w/periodic interrupt
Advanced anti-tamper detection
LCD: 8x40 or 4x44 w/ step-up converter
DMA
4 ch. for ADC, AES, DACs, SPIs, I
2
C,
USARTs, Timers, 1 ch. for memory-to-
memory
AES encryption hardware accelerator
2x12-bit DAC (dual mode) with output buffer
12-bit ADC up to 1 Msps/28 channels
Temp. sensor and internal ref. voltage
Memories
Up to 64 KB of Flash memory with up to 2
KB of data EEPROM with ECC and RWW
Flexible write/read protection modes
Up to 4 KB of RAM
2 ultra-low-power comparators
1 with fixed thresh ol d and 1 rail to rail
Wake up capability
Timers
Three 16-bit timers with 2 channels (IC,
OC, PWM), quadrature encoder
One 16-bit advanced control timer with 3
channels, supporting motor control
One 8-bit timer with 7-bit prescaler
One window, one independent watchdog
Beeper timer with 1, 2 or 4 kHz frequencies
Communication interfaces
Two synchronous serial interface (SPI)
–Fast I
2
C 400 kHz SMBus and PMBus
Three USARTs (ISO 7816 interface + IrDA)
Up to 67 I/Os, all mappable on interrupt vectors
Up to 16 capacitive sensing channels
supporting touchkey, proximity, linear touch
and rotary touch sensors
Fast on-chip programmin g and non-intrusive
debugging with SWIM, Bootloader using
USART
96-bit unique ID
LQFP80
LQFP64
14 x 14 mm
10 x 10 mm
www.st.com
Contents STM8L162M8 STM8L162R8
2/125 DocID17959 Rev 4
Contents
1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
2 Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
2.1 STM8L ultra-low-power 8-bit family benefits . . . . . . . . . . . . . . . . . . . . . . . 9
2.2 Device overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
2.3 Ultra-low-power continuum . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .11
3 Functional overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
3.1 Low-power modes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
3.2 Central processing unit STM8 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
3.2.1 Advanced STM8 Core . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
3.2.2 Interrupt controller . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
3.3 Reset and supply management . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
3.3.1 Power supply scheme . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
3.3.2 Power supply supervisor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
3.3.3 Voltage regulator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
3.4 Clock management . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
3.5 Low-power real-time clock . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
3.6 LCD (Liquid crystal display) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
3.7 Memories . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
3.8 DMA . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
3.9 Analog-to-digital converter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
3.10 Digital-to-analog converter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
3.11 Ultra-low-power comparators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
3.12 System configuration controller and routing interface . . . . . . . . . . . . . . . 20
3.13 Touch sensing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
3.14 AES . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
3.15 Timers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
3.15.1 16-bit advanced control timer (TIM1) . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
3.15.2 16-bit general purpose timers (TIM2, TIM3, TIM5) . . . . . . . . . . . . . . . . 21
3.15.3 8-bit basic timer (TIM4) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
3.16 Watchdog timers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22