STM8L151x6/8 STM8L152x6/8
8-bit ultra-low-power MCU, up to 64-KB Flash, 2-KB data EEPROM,
RTC, LCD, timers, USARTs, I2C, SPIs, ADC, DAC, comparators
Datasheet
-
production data
Features
CSP
•
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
(5.9 µA), Low-power wait (3 µA), Active-
halt with full RTC (1.4 µA), Halt (400 nA)
– Consumption: 200 µA/MHz+330 µA
– Fast wake up from Halt mode (4.7 µs)
– Ultra low leakage per I/0: 50 nA
•
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
programmable 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
– Advanced anti-tamper detection
•
LCD: 8x40 or 4x44 w/ step-up converter
•
DMA
– 4 ch. for ADC, DACs, SPIs, I
2
C, USARTs,
Timers, 1 ch. for memory-to-memory
•
2x12-bit DAC (dual mode) with output buffer
•
12-bit ADC up to 1 Msps/28 channels
– Temp. sensor and internal ref. voltage
May 2018
This is information on a product in full production.
LQFP80 (14x14mm)
LQFP64 (10x10mm)
LQFP48 (7x7mm)
UFQFPN48
7x7mm
WLCSP32
1.913x3.329 mm
•
Memories
– Up to 64-Kbytes of Flash memory with up
to 2 Kbytes of data EEPROM with ECC and
RWW
– Flexible write/read protection modes
– Up to 4 Kbytes of RAM
•
2 ultra-low-power comparators
– 1 with fixed threshold 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 programming and non-intrusive
debugging with SWIM, Bootloader using
USART
•
96-bit unique ID
DS6948 Rev 11
1/147
www.st.com
STM8L151x6/8 STM8L152x6/8
Table 1. Device summary
Reference
STM8L151x6/8
STM8L152x6/8
Part number
STM8L151R6, STM8L151C8, STM8L151M8, STM8L151R8
STM8L152R6, STM8L152C8, STM8L152K8, STM8L152M8, STM8L152R8
2/147
DS6948 Rev 11
STM8L151x6/8 STM8L152x6/8
Contents
Contents
1
2
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
2.1
2.2
2.3
STM8L ultra-low-power 8-bit family benefits . . . . . . . . . . . . . . . . . . . . . . .11
Device overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
Ultra-low-power continuum . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
3
Functional overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
3.1
3.2
Low-power modes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
Central processing unit STM8 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
3.2.1
3.2.2
Advanced STM8 Core . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
Interrupt controller . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
Power supply scheme . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
Power supply supervisor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
Voltage regulator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
3.3
Reset and supply management . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
3.3.1
3.3.2
3.3.3
3.4
3.5
3.6
3.7
3.8
3.9
3.10
3.11
3.12
3.13
3.14
Clock management . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
Low-power real-time clock . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
LCD (Liquid crystal display) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
Memories . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
DMA . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
Analog-to-digital converter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
Digital-to-analog converter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
Ultra-low-power comparators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
System configuration controller and routing interface . . . . . . . . . . . . . . . 22
Touch sensing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
Timers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
3.14.1
3.14.2
3.14.3
16-bit advanced control timer (TIM1) . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
16-bit general purpose timers (TIM2, TIM3, TIM5) . . . . . . . . . . . . . . . . 23
8-bit basic timer (TIM4) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
Window watchdog timer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
3.15
Watchdog timers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
3.15.1
DS6948 Rev 11
3/147
5
Contents
3.15.2
STM8L151x6/8 STM8L152x6/8
Independent watchdog timer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
3.16
3.17
Beeper . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
Communication interfaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
3.17.1
3.17.2
3.17.3
SPI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
I
2
C . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
USART . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
3.18
3.19
Infrared (IR) interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
Development support . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
4
5
Pin description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
Memory and register map . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
5.1
5.2
Memory mapping . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
Register map . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
6
7
8
9
Interrupt vector mapping . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
Option bytes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64
Unique ID . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
Electrical parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
9.1
Parameter conditions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
9.1.1
9.1.2
9.1.3
9.1.4
9.1.5
Minimum and maximum values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
Typical values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
Typical curves . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
Loading capacitor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
Pin input voltage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
9.2
9.3
Absolute maximum ratings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
Operating conditions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
9.3.1
9.3.2
9.3.3
9.3.4
9.3.5
9.3.6
9.3.7
General operating conditions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
Embedded reset and power control block characteristics
. . . . . . . . . . 72
Supply current characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75
Clock and timing characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90
Memory characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95
I/O current injection characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97
I/O port pin characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97
DS6948 Rev 11
4/147
STM8L151x6/8 STM8L152x6/8
9.3.8
9.3.9
9.3.10
9.3.11
9.3.12
9.3.13
9.3.14
9.3.15
Contents
Communication interfaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105
LCD controller (STM8L152x6/8 only) . . . . . . . . . . . . . . . . . . . . . . . . . 110
Embedded reference voltage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111
Temperature sensor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112
Comparator characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112
12-bit DAC characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114
12-bit ADC1 characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 116
EMC characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122
9.4
Thermal characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124
10
Package information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125
10.1
10.2
10.3
10.4
10.5
LQFP80 package information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125
LQFP64 package information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129
LQFP48 package information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132
UFQFPN48 package information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 136
WLCSP32 package information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 139
11
12
Ordering information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 142
Revision history . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 143
DS6948 Rev 11
5/147
5