STM8AL313x/4x/6x
STM8AL3L4x/6x
Automotive 8-bit ultra-low-power MCU, up to 32 Kbyte Flash, RTC,
data EEPROM, LCD, timers, USART, I2C, SPI, ADC, DAC, COMPs
Datasheet
-
production data
Features
•
AEC-Q100 grade 1 conform
qualification
•
Operating conditions
– Operating power supply range 1.8 V to
3.6 V (down to 1.65 V at power down)
– Temperature range: - 40 °C to 85 or 125 °C
•
Low power features
– Five low-power modes: Wait, low-power
run (5.1
μA),
low-power wait (3
μA),
active-
halt with full RTC (1.3
μA),
halt with PDR
(400 nA)
– Run from Flash: 195
μA/MHz
+ 440
μA
– Run from RAM: 90
μA/MHz
+ 400
μA
– Ultra-low leakage per I/0: 50 nA
– Fast wakeup from Halt: 4.7 µ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 5
selectable thresholds
– Ultra-low power POR/PDR
– Programmable voltage detector (PVD)
•
Clock management
– 1 to 16 MHz crystal oscillator
– 32 kHz crystal oscillator
– Internal 16 MHz factory-trimmed RC
– Internal 38 kHz low consumption RC
– Clock security system
•
Low power RTC
– BCD calendar with alarm interrupt
– Auto-wakeup from Halt (0.95 ppm
resolution) w/ periodic interrupt
•
LCD: up to 4x28 segments w/ step-up converter
•
Memories
LQFP48
7 x 7 mm
LQFP32
7 x 7 mm
VFQFPN32
5 x 5 mm
– Program memory: up to 32 Kbyte Flash
program; data retention 20 years at 55 °C
– Data memory: up to 1 Kbyte true data
EEPROM; endurance 300 kcycle
– RAM: up to 2 Kbyte
•
DMA
– Four channels; supported peripherals:
ADC, DAC, SPI, I2C, USART, timers
– One channel for memory-to-memory
•
12-bit DAC with output buffer
•
12-bit ADC up to 1 Mbps/25 channels
– Temp sensor and internal reference voltage
•
Two ultra-low-power comparators
– One with fixed threshold and one rail to rail
– Wakeup capability
•
Timers
– Two 16-bit timers with two channels (used
as IC, OC, PWM), quadrature encoder
– One 16-bit advanced control timer with
three channels, supporting motor control
– One 8-bit timer with 7-bit prescaler
– Two watchdogs: one window, one
independent
– Beeper timer with 1-, 2- or 4 kHz
frequencies
•
Communication interfaces
– Synchronous serial interface (SPI)
– Fast I2C 400 kHz SMBus and PMBus
– USART (ISO 7816 interface, IrDA, LIN 1.3,
LIN 2.0)
•
Up to 41 I/Os, all mappable on interrupt vectors
October 2016
This is information on a product in full production.
DocID18474 Rev 7
1/124
www.st.com
STM8AL313x/4x/6x STM8AL3L4x/6x
•
Development support
– Fast on-chip programming and non intrusive debugging with SWIM
– Bootloader using USART
•
96-bit unique ID
Table 1. Device summary
Reference
STM8AL313x/4x/6x
(without LCD)
STM8AL3L4x/6x
(with LCD)
Part number
STM8AL3136, STM8AL3138, STM8AL3146, STM8AL3148, STM8AL3166,
STM8AL3168
STM8AL3L46, STM8AL3L48, STM8AL3L66, STM8AL3L68
2/124
DocID18474 Rev 7
STM8AL313x/4x/6x STM8AL3L4x/6x
Contents
Contents
1
2
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
2.1
Device overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
3
Functional overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
3.1
3.2
Low-power modes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
Central processing unit STM8 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
3.2.1
3.2.2
Advanced STM8 core . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
Interrupt controller . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
Power supply scheme . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
Power supply supervisor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
Voltage regulator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
3.3
Reset and supply management . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
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
Clock management . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
Low power real-time clock . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
LCD (Liquid crystal display) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
Memories . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
DMA . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
Analog-to-digital converter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
Digital-to-analog converter (DAC) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
Ultra-low-power comparators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
System configuration controller and routing interface . . . . . . . . . . . . . . . 20
Timers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
3.13.1
3.13.2
3.13.3
TIM1 - 16-bit advanced control timer . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
16-bit general purpose timers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
8-bit basic timer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
Window watchdog timer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
Independent watchdog timer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
3.14
Watchdog timers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
3.14.1
3.14.2
3.15
3.16
Beeper . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
Communication interfaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
DocID18474 Rev 7
3/124
5
Contents
3.16.1
3.16.2
3.16.3
STM8AL313x/4x/6x STM8AL3L4x/6x
SPI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
I²C . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
USART . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
3.17
3.18
Infrared (IR) interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
Development support . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
4
Pin description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
4.1
System configuration options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
5
Memory and register map . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
5.1
5.2
Memory mapping . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
Register map . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
6
7
8
9
Interrupt vector mapping . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
Option bytes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
Unique ID . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
Electrical parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
9.1
Parameter conditions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
9.1.1
9.1.2
9.1.3
9.1.4
9.1.5
Minimum and maximum values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
Typical values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
Typical curves . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
Loading capacitor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
Pin input voltage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
9.2
9.3
Absolute maximum ratings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
Operating conditions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
9.3.1
9.3.2
9.3.3
9.3.4
9.3.5
9.3.6
9.3.7
9.3.8
9.3.9
General operating conditions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
Embedded reset and power control block characteristics . . . . . . . . . . . 63
Supply current characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
Clock and timing characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74
Memory characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80
I/O current injection characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81
I/O port pin characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82
Communication interfaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89
LCD controller (STM8AL3Lxx only) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94
4/124
DocID18474 Rev 7
STM8AL313x/4x/6x STM8AL3L4x/6x
9.3.10
9.3.11
9.3.12
9.3.13
9.3.14
9.3.15
Contents
Embedded reference voltage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95
Temperature sensor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96
Comparator characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96
12-bit DAC characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98
12-bit ADC1 characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100
EMC characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106
10
Package information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109
10.1
10.2
10.3
10.4
10.5
ECOPACK . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109
LQFP48 package information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109
LQFP32 package information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .112
VFQFPN32 package information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .115
Thermal characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .119
11
12
Device ordering information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120
Revision history . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121
DocID18474 Rev 7
5/124
5