STM8L101 Manual
STM8L101 Manual
Features
■ Main microcontroller features
– Supply voltage range 1.65 V to 3.6 V
– Low power consumption (Halt: 0.3 µA, UFQFPN32 LQFP32
Active-halt: 0.8 µA, Dynamic Run:
150 µA/MHz)
– STM8 Core with up to 16 CISC MIPS
throughput
UFQFPN28 UFQFPN20 TSSOP20
– Temp. range: -40 to 85 °C and 125 °C
■ Memories ■ Peripherals
– Up to 8 Kbytes of Flash program including – Two 16-bit general purpose timers (TIM2
up to 2 Kbytes of data EEPROM and TIM3) with up and down counter and 2
– Error correction code (ECC) channels (used as IC, OC, PWM)
– Flexible write and read protection modes – One 8-bit timer (TIM4) with 7-bit prescaler
– In-application and in-circuit programming – Infrared remote control (IR)
– Data EEPROM capability – Independent watchdog
– 1.5 Kbytes of static RAM – Auto-wakeup unit
■ Clock management – Beeper timer with 1, 2 or 4 kHz frequencies
– Internal 16 MHz RC with fast wakeup time – SPI synchronous serial interface
(typ. 4 µs) – Fast I2C Multimaster/slave 400 kHz
– Internal low consumption 38 kHz RC – USART with fractional baud rate generator
driving both the IWDG and the AWU – 2 comparators with 4 inputs each
■ Reset and supply management ■ Development support
– Ultralow power, ultrasafe power-on-reset – Hardware single wire interface module
/power down reset (SWIM) for fast on-chip programming and
– Three low power modes: Wait, Active-halt, non intrusive debugging
Halt – In-circuit emulation (ICE)
■ Interrupt management ■ 96-bit unique ID
– Nested interrupt controller with software
priority control Table 1. Device summary
– Up to 29 external interrupt sources Reference Part number
■ I/Os
STM8L101F1, STM8L101F2,
– Up to 30 I/Os, all mappable on external STM8L101F3,
interrupt vectors STM8L101xx
STM8L101G2, STM8L101G3
– I/Os with prog. input pull-ups, high STM8L101K3
sink/source capability and one LED driver
infrared output
Contents
1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
2 Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
3 Product overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
3.1 Central processing unit STM8 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
3.2 Development tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
3.3 Single wire data interface (SWIM) and debug module . . . . . . . . . . . . . . . 10
3.4 Interrupt controller . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
3.5 Memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
3.6 Low power modes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
3.7 Voltage regulators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
3.8 Clock control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
3.9 Independent watchdog . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
3.10 Auto-wakeup counter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
3.11 General purpose and basic timers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
3.12 Beeper . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
3.13 Infrared (IR) interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
3.14 Comparators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
3.15 USART . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
3.16 SPI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
3.17 I²C . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
4 Pin description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
7 Option bytes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
8 Unique ID . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
9 Electrical parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
9.1 Parameter conditions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
9.1.1 Minimum and maximum values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
9.1.2 Typical values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
9.1.3 Typical curves . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
9.1.4 Loading capacitor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
9.1.5 Pin input voltage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
9.2 Absolute maximum ratings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
9.3 Operating conditions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
9.3.1 General operating conditions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
9.3.2 Power-up / power-down operating conditions . . . . . . . . . . . . . . . . . . . . 41
9.3.3 Supply current characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
9.3.4 Clock and timing characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
9.3.5 Memory characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
9.3.6 I/O port pin characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
9.3.7 Communication interfaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
9.3.8 Comparator characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
9.3.9 EMC characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
9.4 Thermal characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64
10 Package characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
10.1 ECOPACK . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
10.2 Package mechanical data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
13 Revision history . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76
List of tables
List of figures
1 Introduction
This datasheet provides the STM8L101xx pinout, ordering information, mechanical and
electrical device characteristics.
For complete information on the STM8L101xx microcontroller memory, registers and
peripherals, please refer to the STM8L reference manual.
The STM8L101xx devices are members of the STM8L low power 8-bit family. They are
referred to as low-density devices in the STM8L101xx microcontroller family reference
manual (RM0013) and in the STM8L Flash programming manual (PM0054).
All devices of the SM8L product line provide the following benefits:
● Reduced system cost
– Up to 8 Kbytes of low-density embedded Flash program memory including up to
2 Kbytes of data EEPROM
– High system integration level with internal clock oscillators and watchdogs.
– Smaller battery and cheaper power supplies.
● Low power consumption and advanced features
– Up to 16 MIPS at 16 MHz CPU clock frequency
– Less than 150 µA/MH, 0.8 µA in Active-halt mode, and 0.3 µA in Halt mode
– Clock gated system and optimized power management
● Short development cycles
– Application scalability across a common family product architecture with
compatible pinout, memory map and modular peripherals.
– Full documentation and a wide choice of development tools
● Product longevity
– Advanced core and peripherals made in a state-of-the art technology
– Product family operating from 1.65 V to 3.6 V supply
2 Description
The STM8L101xx low power family features the 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 ultrafast Flash programming.
All STM8L101xx microcontrollers feature low power low-voltage single-supply program
Flash memory. The 8-Kbyte devices embed data EEPROM.
The STM8L101xx low power family is based on a generic set of state-of-the-art peripherals.
The modular design of the peripheral set allows the same peripherals to be found in different
ST microcontroller families including 32-bit families. This makes any transition to a different
family very easy, and simplified even more by the use of a common set of development
tools.
All STM8L low power products are based on the same architecture with the same memory
mapping and a coherent pinout.
3 Product overview
@VDD
VDD18 Power VDD =1.65 V
16 MHz int RC Clock to 3.6 V
VSS
controller Volt. reg.
38 kHz int RC
Clocks NRST
to core and Reset
peripherals
POR/PDR
STM8
Core
up to 16 MHz Up to 8 Kbytes
Flash memory
(including
up to 2 Kbytes
data EEPROM)
Nested interrupt
controller
1.5 Kbytes
up to 29 external
SRAM
interrupts
SWIM
(SWIM)
I²C1 SDA, SCL
multimaster
IR_TIM Infrared interface
MOSI, MISO,
SPI SCK, NSS
PA[6:0] Port A
16-bit Timer 2 TIM2_CH[2:1]
TIM2_TRIG
PB[7:0] Port B
TIM3_CH[2:1]
PC[6:0] Port C 16-bit Timer 3 TIM3_TRIG
PD[7:0]
Port D 8-bit Timer 4
COMP1_CH[4:1]
COMP1 IWDG
COMP_REF
AWU
COMP2_CH[4:1] COMP2 Beeper BEEP
Legend:
AWU: Auto-wakeup unit
Int. RC: internal RC oscillator
I²C: Inter-integrated circuit multimaster interface
POR/PDR: Power on reset / power down reset
SPI: Serial peripheral interface
SWIM: Single wire interface module
USART: Universal synchronous / asynchronous receiver / transmitter
IWDG: Independent watchdog
3.5 Memory
The STM8L101xx devices have the following main features:
● 1.5 Kbytes of RAM
● The EEPROM is divided into two memory arrays (see the STM8L reference manual for
details on the memory mapping):
– Up to 8 Kbytes of low-density embedded Flash program including up to 2 Kbytes
of data EEPROM. Data EEPROM and Flash program areas can be write protected
independently by using the memory access security mechanism (MASS).
– 64 option bytes (one block) of which 5 bytes are already used for the device.
Error correction code is implemented on the EEPROM.
3.12 Beeper
The STM8L101xx devices include a beeper function used to generate a beep signal in the
range of 1, 2 or 4 kHz when the LSI clock is operating at a frequency of 38 kHz.
3.14 Comparators
The STM8L101xx features two zero-crossing comparators (COMP1 and COMP2) sharing
the same current bias and voltage reference. The voltage reference can be internal
(comparison with ground) or external (comparison to a reference pin voltage).
Each comparator is connected to 4 channels, which can be used to generate interrupt, timer
input capture or timer break. Their polarity can be inverted.
3.15 USART
The USART interface (USART) allows full duplex, asynchronous communications with
external devices requiring an industry standard NRZ asynchronous serial data format. It
offers a very wide range of baud rates.
3.16 SPI
The serial peripheral interface (SPI) provides half/ full duplex synchronous serial
communication with external devices. It can be configured as the master and in this case it
provides the communication clock (SCK) to the external slave device. The interface can also
operate in multi-master configuration.
3.17 I²C
The inter-integrated circuit (I2C) bus interface is designed to serve as an interface between
the microcontroller and the serial I2C bus. It provides multi-master capability, and controls all
I²C bus-specific sequencing, protocol, arbitration and timing. It manages standard and fast
speed modes.
4 Pin description
PC1 / I²C_SCL
20 19 18 17 16
NRST / PA1 (HS) 1 15 PC0 / I²C_SDA
PA2 (HS) 2 14 PB7 (HS) / SPI_MISO
PA3 (HS) 3 13 PB6 (HS) / SPI_MOSI
VSS 4 12 PB5 (HS) / SPI_SCK
VDD 5 11 PB4 (HS) / SPI_NSS
6 7 8 9 10
PB1 (HS) / TIM3_CH1 /COMP1_CH2
PC1 / I²C_SCL
20 19 18 17 16
NRST / PA1 (HS) 1 15 PC0 / I²C_SDA
PA2 (HS) 2 14 PB7 (HS) / SPI_MISO
PA6 (HS) / COMP_REF 3 13 PB6 (HS) / SPI_MOSI
VSS 4 12 PB5 (HS) / SPI_SCK
VDD 5 11 PB4 (HS) / SPI_NSS
6 7 8 9 10
PB3 (HS) / TIM2_TRIG / COMP2_CH2
PD0 (HS) / TIM3_CH2 / COMP1_CH3
PB0 (HS) / TIM2_CH1 / COMP1_CH1
PC1 / I²C_SCL
PC6 (HS)
PC5 (HS)
28 27 26 25 24 23 22
1 21 PC0 / I²C_SDA
NRST / PA1 (HS)
PD2(HS) / COMP2_CH3
/ COMP2_CH4
PD0 (HS) / TIM3_CH2 / COMP1_CH3
PC1 / I²C_SCL
PC6 (HS)
PC5 (HS)
28 27 26 25 24 23 22
1 21 PC0 / I²C_SDA
NRST / PA1 (HS)
PD2(HS) / COMP2_CH3
PD3(HS) / COMP2_CH4
PD0 (HS) / TIM3_CH2 / COMP1_CH3
PC0 / I²C_SDA
PC1 / I²C_SCL
PC6 (HS)
PC5 (HS)
32 31 30 29 28 27 26 25
NRST / PA1 (HS) 1 24 PD7 (HS)
PA2 (HS) 2 23 PD6 (HS)
PA3 (HS) 3 22 PD5 (HS)
PA4 (HS) / TIM2_BKIN 4 21 PD4 (HS)
PA5 (HS) / TIM3_BKIN 5 20 PB7 (HS) / SPI_MISO
PA6 (HS) / COMP_REF 6 19 PB6 (HS) / SPI_MOSI
VSS 7 18 PB5 (HS) / SPI_SCK
VDD 8 17 PB4 (HS) / SPI_NSS
9 10 11 12 13 14 15 16
1. Example given for the UFQFPN32 package. The pinout is the same for the LQFP32 package.
2. HS corresponds to 20 mA high sink/source capability.
3. High sink LED driver capability available on PA0. Refer to the description of the IR_CR register in the
STM8L reference manual (RM0013).
standard UFQFPN28
Main function
High sink/source
(after reset)
Ext. interrupt
Type
TSSOP20
floating
OD
PP
standard UFQFPN28
Main function
High sink/source
(after reset)
Ext. interrupt
Type
TSSOP20
floating
Pin name Alternate function
wpu
OD
PP
Timer 2 - channel 1 /
PB0/TIM2_CH1/
7 7 10 12 12 13 I/O X(3) X(3) X HS X X Port B0 Comparator 1 -
COMP1_CH1 (3)
channel 1
Timer 3 - channel 1 /
PB1/TIM3_CH1/
8 8 11 13 13 14 I/O X X X HS X X Port B1 Comparator 1 -
COMP1_CH2
channel 2
Timer 2 - channel 2 /
PB2/ TIM2_CH2/
9 9 12 14 14 15 I/O X X X HS X X Port B2 Comparator 2 -
COMP2_CH1/
channel 1
Timer 2 - trigger /
PB3/TIM2_TRIG/
10 10 13 15 15 16 I/O X X X HS X X Port B3 Comparator 2 -
COMP2_CH2
channel 2
SPI master/slave
11 11 14 16 16 17 PB4/SPI_NSS(3) I/O X(3) X(3) X HS X X Port B4
select
12 12 15 17 17 18 PB5/SPI_SCK I/O X X X HS X X Port B5 SPI clock
SPI master out/ slave
13 13 16 18 18 19 PB6/SPI_MOSI I/O X X X HS X X Port B6
in
SPI master in/ slave
14 14 17 19 19 20 PB7/SPI_MISO I/O X X X HS X X Port B7
out
- - - 20 20 21 PD4 I/O X X X HS X X Port D4
- - - - - 22 PD5 I/O X X X HS X X Port D5
- - - - - 23 PD6 I/O X X X HS X X Port D6
- - - - - 24 PD7 I/O X X X HS X X Port D7
(4)
15 15 18 21 21 25 PC0/I2C_SDA I/O X X T Port C0 I2C data
16 16 19 22 22 26 PC1/I2C_SCL I/O X X T(4) Port C1 I2C clock
17 17 20 23 23 27 PC2/USART_RX I/O X X X HS X X Port C2 USART receive
18 18 1 24 24 28 PC3/USART_TX I/O X X X HS X X Port C3 USART transmit
USART synchronous
PC4/USART_CK/
19 19 2 25 25 29 I/O X X X HS X X Port C4 clock / Configurable
CCO
clock output
- - - 26 26 30 PC5 I/O X X X HS X X Port C5
standard UFQFPN28
Main function
High sink/source
(after reset)
Ext. interrupt
Type
TSSOP20
floating
Pin name Alternate function
wpu
OD
PP
- - - 27 27 31 PC6 I/O X X X HS X X Port C6
SWIM input and out-
PA0(5)/SWIM/ put /Beep out-
20 20 3 28 28 32 I/O X X(5) X HS(6) X X Port A0
BEEP/IR_TIM (6) put/Timer Infrared
output
1. Please refer to the warning below.
2. At power-up, the PA1/NRST pin is a reset input pin with pull-up. To be used as a general purpose pin (PA1), it can be
configured only as output open-drain or push-pull, not as a general purpose input. Refer to Section Configuring NRST/PA1
pin as general purpose output in the STM8L101xx reference manual (RM0013).
3. A pull-up is applied to PB0 and PB4 during the reset phase. These two pins are input floating after reset release.
4. In the open-drain output column, ‘T’ defines a true open-drain I/O (P-buffer and protection diode to VDD are not
implemented).
5. The PA0 pin is in input pull-up during the reset phase and after reset release.
6. High sink LED driver capability available on PA0.
Option bytes
0x00 48FF
0x 004900
Reserved
0x 004924
0x 004925 Unique ID
0x 004930
0x 004931
Reserved
0x00 49FF
0x00 5000
GPIO and peripheral registers(2)
0x00 57FF
0x00 5800
Reserved
0x00 7EFF
0x00 7F00 CPU/SWIM/Debug/ITC
Registers
0x00 7FFF
0x00 8000
Interrupt vectors
0x00 807F
0x00 8080
Low-density
Flash program memory
(up to 8 Kbytes) (1)
including
Data EEPROM
(up to 2 Kbytes)
0x00 9FFF
1. Table 5 lists the boundary addresses for each memory size. The top of the stack is at the RAM end
address.
2. Refer to Table 7 for an overview of hardware register mapping, to Table 6 for details on I/O port hardware
registers, and to Table 8 for information on CPU/SWIM/debug module controller registers.
0x00 521E
to Reserved area (18 bytes)
0x00 522F
0x00 5230 USART_SR USART status register 0xC0
0x00 5231 USART_DR USART data register 0xXX
0x00 5232 USART_BRR1 USART baud rate register 1 0x00
0x00 5233 USART_BRR2 USART baud rate register 2 0x00
USART
0x00 5234 USART_CR1 USART control register 1 0x00
0x00 5235 USART_CR2 USART control register 2 0x00
0x00 5236 USART_CR3 USART control register 3 0x00
0x00 5237 USART_CR4 USART control register 4 0x00
0x00 5238
to Reserved area (18 bytes)
0x00 524F
0x00 52E9
to Reserved area (23 bytes)
0x00 52FE
0x00 52FF IRTIM IR_CR Infra-red control register 0x00
0x00 5300 COMP_CR Comparator control register 0x00
0x00 5301 COMP COMP_CSR Comparator status register 0x00
0x00 5302 COMP_CCS Comparator channel selection register 0x00
0x00 7F78
to Reserved area (2 bytes)
0x00 7F79
0x00 7F80 SWIM SWIM_CSR SWIM control status register 0x00
0x00 7F81
to Reserved area (15 bytes)
0x00 7F8F
0x00 7F90 DM_BK1RE Breakpoint 1 register extended byte 0xFF
0x00 7F91 DM_BK1RH Breakpoint 1 register high byte 0xFF
0x00 7F92 DM_BK1RL Breakpoint 1 register low byte 0xFF
0x00 7F93 DM_BK2RE Breakpoint 2 register extended byte 0xFF
0x00 7F94 DM_BK2RH Breakpoint 2 register high byte 0xFF
0x00 7F95 DM DM_BK2RL Breakpoint 2 register low byte 0xFF
0x00 7F96 DM_CR1 Debug module control register 1 0x00
0x00 7F97 DM_CR2 Debug module control register 2 0x00
0x00 7F98 DM_CSR1 Debug module control/status register 1 0x10
0x00 7F99 DM_CSR2 Debug module control/status register 2 0x00
0x00 7F9A DM_ENFCTR Enable function register 0xFF
1. Refer to Table 7: General hardware register map on page 25 (addresses 0x00 50A0 to 0x00 50A5) for a
list of external interrupt registers.
Transmission
27 USART complete/transmit data - - Yes Yes(1) 0x00 8074
register empty
Receive Register DATA
28 USART FULL/overrun/idle line - - Yes Yes(1) 0x00 8078
detected/parity error
29 I2C I2C interrupt(2) Yes Yes Yes Yes(1) 0x00 807C
1. In WFE mode, this interrupt is served if it has been previously enabled. After processing the interrupt, the processor goes
back to WFE mode. Refer to SectionWait for event (WFE) mode in the RM0013 reference manual.
2. The device is woken up from Halt or Active-halt mode only when the address received matches the interface address.
7 Option bytes
Option bytes contain configurations for device hardware features as well as the memory
protection of the device. They are stored in a dedicated row of the memory.
All option bytes can be modified only in ICP mode (with SWIM) by accessing the EEPROM
address. See Table 10 for details on option byte addresses.
Refer to the STM8L Flash programming manual (PM0054) and STM8 SWIM and Debug
Manual (UM0320) for information on SWIM programming procedures.
Read-out
0x4800 protection OPT1 ROP[7:0] 0x00
(ROP)
0x4807 - - Must be programmed to 0x00 0x00
UBC (User
0x4802 OPT2 UBC[7:0] 0x00
Boot code size)
0x4803 DATASIZE OPT3 DATASIZE[7:0] 0x00
Independent
OPT4 IWDG IWDG
0x4808 watchdog Reserved 0x00
[1:0] _HALT _HW
option
Caution: After a device reset, read access to the program memory is not guaranteed if address
0x4807 is not programmed to 0x00.
8 Unique ID
STM8L101xx devices feature a 96-bit unique device identifier which provides a reference
number that is unique for any device and in any context. The 96 bits of the identifier can
never be altered by the user.
The unique device identifier can be read in single bytes and may then be concatenated
using a custom algorithm.
The unique device identifier is ideally suited:
● For use as serial numbers
● For use as security keys to increase the code security in the program memory while
using and combining this unique ID with software cryptograhic primitives and protocols
before programming the internal memory
● To activate secure boot processes.
9 Electrical parameters
STM8L PIN
50 pF
STM8L PIN
VIN
Figure 11. IDD(RUN) vs. VDD, fCPU = 2 MHz Figure 12. IDD(RUN) vs. VDD, fCPU = 16 MHz
1 3
0.9 2.9
0.8 2.8
0.7 2.7
IDD(RUN)HSI [mA]
IDD(RUN)HSI [mA]
0.6 2.6
0.5 -40°C
2.5
0.4 -40°C 25°C
2.4
0.3 25°C 85°C
2.3
0.2 85°C 125°C
2.2
0.1 125°C
0 2.1
1.6 1.7 1.8 1.9 2 2.1 2.2 2.3 2.4 2.5 2.6 2.7 2.8 2.9 3 3.1 3.2 3.3 3.4 3.5 3.6 2
1.6 1.7 1.8 1.9 2 2.1 2.2 2.3 2.4 2.5 2.6 2.7 2.8 2.9 3 3.1 3.2 3.3 3.4 3.5 3.6
VDD [V] VDD [V]
ai17017 ai17018
Figure 13. IDD(WAIT) vs. VDD, fCPU = 2 MHz Figure 14. IDD(WAIT) vs. VDD, fCPU = 16 MHz
600
300
550
250
500
IDD(RUN)HSI [µA]
200
-40°C
IDD(WFI)HSI [µA]
450
150 25°C -40°C
400
85°C 25°C
100 350
125°C 85°C
50 300 125°C
0 250
1.6 1.7 1.8 1.9 2 2.1 2.2 2.3 2.4 2.5 2.6 2.7 2.8 2.9 3 3.1 3.2 3.3 3.4 3.5 3.6
200
1.6 2.1 2.6 3.1 3.6
VDD [V] VDD [V]
ai17015 ai17016
Table 20. Total current consumption and timing in Halt and Active-halt mode at
VDD = 1.65 V to 3.6 V (1)(2)
Symbol Parameter Conditions Typ Max Unit
TA = -40 °C to 25 °C 0.8 2 μA
TA = 55 °C 1 2.5 μA
Supply current in Active-halt LSI RC osc.
IDD(AH) TA = 85 °C 1.4 3.2 μA
mode (at 37 kHz)
TA = 105 °C 2.9 7.5 μA
TA = 125 °C 5.8 13 μA
Supply current during
IDD(WUFAH) wakeup time from Active-halt 2 - mA
mode
Wakeup time from Active-
tWU(AH)(3) fCPU= 16 MHz 4 6.5 μs
halt mode to Run mode
TA = -40 °C to 25 °C 0.35 1.2(4) μA
TA = 55 °C 0.6 1.8 μA
IDD(Halt) Supply current in Halt mode TA = 85 °C 1 2.5(4) μA
TA = 105 °C 2.5 6.5 μA
TA = 125 °C 5.4 12(4) μA
Supply current during
IDD(WUFH) 2 - mA
wakeup time from Halt mode
Wakeup time from Halt mode
tWU(Halt)(3) fCPU = 16 MHz 4 6.5 μs
to Run mode
1. TA = -40 to 125 °C, no floating I/O, unless otherwise specified.
2. Data based on characterization results, not tested in production.
3. Measured from interrupt event to interrupt vector fetch.
To get tWU for another CPU frequency use tWU(FREQ) = tWU(16 MHz) + 1.5 (TFREQ-T16 MHz).
The first word of interrupt routine is fetched 5 CPU cycles after tWU.
4. Data guaranteed, each individual device tested in production.
Figure 15. Typ. IDD(Halt) vs. VDD, fCPU = 2 MHz and 16 MHz
6
-40°C
5 25°C
IDD(HALT) [µA]
4 85°C
125°C
3
0
1.6 2.1 2.6 3.1 3.6
VDD [V]
ai17014b
IDD(TIM2) (1)
TIM2 supply current 9
IDD(TIM3) TIM3 supply current (1) 9
(1)
IDD(TIM4) TIM4 timer supply current 4
µA/MHz
IDD(USART) (2)
USART supply current 7
IDD(SPI) SPI supply current (2) 4
IDD(I²C1) I2C supply current (2) 4
IDD(COMP) (2)
Comparator supply current 20 µA
1. Data based on a differential IDD measurement between all peripherals off and a timer counter running at
16 MHz. The CPU is in Wait mode in both cases. No IC/OC programmed, no I/O pin toggling. Not tested in
production.
2. Data based on a differential IDD measurement between the on-chip peripheral when kept under reset and
not clocked and the on-chip peripheral when clocked and not kept under reset. The CPU is in Wait mode in
both cases. No I/O pin toggling. Not tested in production.
16.4
16.2 125°C
16
15.8
15.6
15.4
15.2
15
1.65 1.8 1.95 2.1 2.25 2.4 2.55 2.7 2.85 3 3.15 3.3 3.45 3.6
VDD [V]
ai17013
3.0%
3V min
2.5%
3V typical
2.0% 3V max
1.5%
1.0%
0.5%
0.0%
RC accuracy
-50 -40 -30 -20 -10 0 10 20 30 40 50 60 70 80 90 100 110 120 130 140
-0.5%
-1.0%
-1.5%
-2.0%
-2.5%
-3.0%
-3.5%
-4.0%
-4.5%
-5.0%
Temperature (°C) ai17021
Figure 18. Typical HSI accuracy vs. temperature, VDD = 1.65 V to 3.6 V
3.5%
1.5%
1.0%
0.5%
0.0%
RC accuracy
-50 -40 -30 -20 -10 0 10 20 30 40 50 60 70 80 90 100 110 120 130 140
-0.5%
-1.0%
-1.5%
-2.0%
-2.5%
-3.0%
-3.5%
-4.0%
-4.5%
-5.0%
Temperature (°C) ai17019
45
43
41
39
35
33
31 -40°C
29
25°C
85°C
27
125°C
25
1.6 2.1 2.6 3.1 3.6
VDD [V]
ai17012b
VRM Data retention mode (1) Halt mode (or Reset) 1.4 - - V
1. Minimum supply voltage without losing data stored in RAM (in Halt mode or under Reset) or in hardware
registers (only in Halt mode). Guaranteed by characterization, not tested in production.
Flash memory
Operating voltage
VDD fMASTER = 16 MHz 1.65 - 3.6 V
(all modes, read/write/erase)
Programming time for 1- or 64-byte (block)
- 6 - ms
erase/write cycles (on programmed byte)
tprog
Programming time for 1- to 64-byte (block)
- 3 - ms
write cycles (on erased byte)
TA=+25 °C, VDD = 3.0 V - -
Iprog Programming/ erasing consumption 0.7 mA
TA=+25 °C, VDD = 1.8 V - -
Data retention (program memory)
after 10k erase/write cycles TRET = 55 °C 20(1) - -
at TA = +85 °C
Data retention (data memory)
tRET after 10k erase/write cycles TRET = 55 °C 20(1) - - years
at TA = +85 °C
Data retention (data memory)
after 300k erase/write cycles TRET = 85 °C 1(1) - -
at TA = +125 °C
Erase/write cycles (program memory) See notes (1)(2) 10(1) - -
NRW kcycles
(1)(3) (1)(4)
Erase/write cycles (data memory) See notes 300 - -
1. Data based on characterization results, not tested in production.
2. Retention guaranteed after cycling is 10 years at 55 °C.
3. Retention guaranteed after cycling is 1 year at 55 °C.
4. Data based on characterization performed on the whole data memory (2 Kbytes).
Figure 20. Typical VIL and VIH vs. VDD (standard I/Os)
-40°C
3 -40°C
3 25°C
25°C
85°C
2.5
2.5
85°C
125°C
125°C
2
2
1
1
0.5
0.5
0
0
1.6 2.1 2.6 3.1 3.6
1.6 2.1 2.6 3.1 3.6
VDD [V]
VDD [V]
ai17011
Figure 21. Typical VIL and VIH vs. VDD (true open drain I/Os)
3
-40°C
25°C
2.5
85°C
2 125°C
VIL and VIH [V]
1.5
0.5
0
1.6 2.1 2.6 3.1 3.6
VDD [V]
ai17010
Figure 22. Typical pull-up resistance RPU vs. VDD with VIN=VSS
60 -40°C
25°C
55
85°C
Pull-Up resistance [k ]
125°C
50
45
40
35
30
1.65 1.8 1.95 2.1 2.25 2.4 2.55 2.7 2.85 3 3.15 3.3 3.45 3.6
VDD [V]
ai17009
Figure 23. Typical pull-up current IPU vs. VDD with VIN=VSS
120 -40°C
25°C
100
85°C
60
40
20
0
1.65 1.8 1.95 2.1 2.25 2.4 2.55 2.7 2.85 3 3.15 3.3 3.45 3.6
VDD [V]
ai17008
IIO = +2 mA,
- 0.45 V
VDD = 3.0 V
Output low level voltage for an I/O pin IIO = +2 mA,
VOL (1) - 0.45 V
VDD = 1.8 V
IIO = +10 mA,
Standard
- 1.2 V
VDD = 3.0 V
IIO = -2 mA,
VDD-0.45 - V
VDD = 3.0 V
IIO = -1 mA,
VOH (2) Output high level voltage for an I/O pin VDD-0.45 - V
VDD = 1.8 V
IIO = -10 mA,
VDD-1.2 - V
VDD = 3.0 V
1. The IIO current sunk must always respect the absolute maximum rating specified in Table 14 and the sum
of IIO (I/O ports and control pins) must not exceed IVSS.
2. The IIO current sourced must always respect the absolute maximum rating specified in Table 14 and the
sum of IIO (I/O ports and control pins) must not exceed IVDD.
IIO = +3 mA,
Open drain
- 0.45 V
VDD = 3.0 V
VOL (1) Output low level voltage for an I/O pin
IIO = +1 mA,
- 0.45 V
VDD = 1.8 V
1. The IIO current sunk must always respect the absolute maximum rating specified in Table 14 and the sum
of IIO (I/O ports and control pins) must not exceed IVSS.
Table 29. Output driving current (PA0 with high sink LED driver capability)
I/O
Symbol Parameter Conditions Min Max Unit
Type
Figure 24. Typ. VOL at VDD = 3.0 V (standard Figure 25. Typ. VOL at VDD = 1.8 V (standard
ports) ports)
-40°C
1.5 0.5
25°C
1.25 -40°C 85°C
0.4
25°C 125°C
1 85°C
0.3
VOL [V]
125°C
VOL [V]
0.75
0.2
0.5
0.1
0.25
0 0
0 5 10 15 20 25 0 1 2 3 4 5 6 7
IOL [mA] IOL [mA]
ai17005 ai17004
Figure 26. Typ. VOL at VDD = 3.0 V (true open Figure 27. Typ. VOL at VDD = 1.8 V (true open
drain ports) drain ports)
0.5 0.5
-40°C
0.4 25°C 0.4 -40°C
85°C 25°C
0.3 125°C 0.3 85°C
VOL [V]
VOL [V]
125°C
0.2 0.2
0.1 0.1
0 0
0 1 2 3 4 5 6 0 0.5 1 1.5 2 2.5 3
IOL [mA] IOL [mA]
ai17003 ai17002
Figure 28. Typ. VDD - VOH at VDD = 3.0 V Figure 29. Typ. VDD - VOH at VDD = 1.8 V
(standard ports) (standard ports)
2
0.4 -40°C
1.75 -40°C 25°C
1.5 25°C 85°C
85°C 0.3
1.25 125°C
VDD - VOH [V]
125°C
VDD - VOH [V]
1
0.2
0.75
0.5
0.1
0.25
0
0 2 4 6 8 10 12 14 16 18 20 22 24 0
IOH [mA] 0 1 2 3 4 5 6
IOH [mA]
ai17001
NRST pin
The NRST pin input driver is CMOS. A permanent pull-up is present.
RPU(NRST) has the same value as RPU (see Table 26 on page 50).
Subject to general operating conditions for VDD and TA unless otherwise specified.
60 -40°C
25°C
55
85°C
Pull-Up resistance [k ]
50
125°C
45
40
35
30
1.65 1.8 1.95 2.1 2.25 2.4 2.55 2.7 2.85 3 3.15 3.3 3.45 3.6
VDD [V]
ai17007
120
-40°C
100
25°C
85°C
60
40
20
0
1.65 1.8 1.95 2.1 2.25 2.4 2.55 2.7 2.85 3 3.15 3.3 3.45 3.6
VDD [V]
ai17006
The reset network shown in Figure 32 protects the device against parasitic resets. The user
must ensure that the level on the NRST pin can go below the VIL max. level specified in
Table 30. Otherwise the reset is not taken into account internally. For power consumption-
sensitive applications, the capacity of the external reset capacitor can be reduced to limit the
charge/discharge current. If the NRST signal is used to reset the external circuitry, the user
must pay attention to the charge/discharge time of the external capacitor to meet the reset
timing conditions of the external devices. The minimum recommended capacity is 10 nF
VDD
RPU
EXTERNAL RSTIN INTERNAL RESET
RESET Filter
CIRCUIT
0.1μF STM8L
NSS input
tSU(NSS) tc(SCK) th(NSS)
CPHA= 0
SCK Input
CPOL=0
tw(SCKH)
CPHA= 0 tw(SCKL)
CPOL=1
Figure 34. SPI timing diagram - slave mode and CPHA = 1(1)
NSS input
tSU(NSS) tc(SCK) th(NSS)
CPHA=1
SCK Input
CPOL=0
tw(SCKH)
CPHA=1 tw(SCKL)
CPOL=1
ai14135
High
NSS input
tc(SCK)
CPHA= 0
SCK Input
CPOL=0
CPHA= 0
CPOL=1
CPHA=1
SCK Input
CPOL=0
CPHA=1
CPOL=1
tw(SCKH) tr(SCK)
tsu(MI) tw(SCKL) tf(SCK)
MISO
INP UT MS BIN BI T6 IN LSB IN
th(MI)
MOSI
M SB OUT B I T1 OUT LSB OUT
OUTUT
tv(MO) th(MO)
ai14136
Note: For speeds around 200 kHz, achieved speed can have ± 5% tolerance
For other speed ranges, achieved speed can have ± 2% tolerance
The above variations depend on the accuracy of the external components used.
Figure 36. Typical application with I2C bus and timing diagram 1)
VDD VDD
SCL
1. Measurement points are done at CMOS levels: 0.3 x VDD and 0.7 x VDD
Static latch-up
● LU: 2 complementary static tests are required on 10 parts to assess the latch-up
performance. A supply overvoltage (applied to each power supply pin) and a current
injection (applied to each input, output and configurable I/O pin) are performed on each
sample. This test conforms to the EIA/JESD 78 IC latch-up standard. For more details,
refer to the application note AN1181.
10 Package characteristics
10.1 ECOPACK
In order to meet environmental requirements, ST offers these devices in different grades of
ECOPACK® packages, depending on their level of environmental compliance. ECOPACK®
specifications, grade definitions and product status are available at: www.st.com.
ECOPACK® is an ST trademark.
Figure 37. UFQFPN32 - 32-lead ultra thin fine pitch Figure 38. UFQFPN32 recommended
quad flat no-lead package outline footprint(1)(4)
(5 x 5)(1)(2)(3)
Seating plane
C
ddd C
A
A3 A1
D
e
9 16
8 17
E2 b E
24
1
L
32
Pin # 1 ID
R = 0.30 D2
L
Bottom view A0B8_ME
Table 39. UFQFPN32 - 32-lead ultra thin fine pitch quad flat no-lead package (5 x 5),
package mechanical data
mm inches(1)
Dim.
Min Typ Max Min Typ Max
e 0.500 0.0197
Table 39. UFQFPN32 - 32-lead ultra thin fine pitch quad flat no-lead package (5 x 5),
package mechanical data (continued)
mm inches(1)
Dim.
Min Typ Max Min Typ Max
Figure 39. LQFP32 - 32-pin low profile quad flat Figure 40. LQFP32 recommended
package outline (7 x 7)(1) footprint(1)(2)
Seating
plane
C
A A2
24 17
A1 c 25 16
b 0.25 mm
Gage plane
ccc C
D
K
D1 A1 L
D3 L1
24 17
25 16
32 9
1 8
E3 E1 E
32 9
Pin 1
identification
1 8 5V_FT
e
5V_ME
Table 40. LQFP32- 32-pin low profile quad flat package (7x7), package mechanical data
mm inches(1)
Dim.
Min Typ Max Min Typ Max
A 1.6 0.063
A1 0.05 0.15 0.002 0.0059
A2 1.35 1.4 1.45 0.0531 0.0551 0.0571
b 0.3 0.37 0.45 0.0118 0.0146 0.0177
c 0.09 0.2 0.0035 0.0079
D 8.8 9 9.2 0.3465 0.3543 0.3622
D1 6.8 7 7.2 0.2677 0.2756 0.2835
D3 5.6 0.2205
E 8.8 9 9.2 0.3465 0.3543 0.3622
E1 6.8 7 7.2 0.2677 0.2756 0.2835
E3 5.6 0.2205
e 0.8 0.0315
L 0.45 0.6 0.75 0.0177 0.0236 0.0295
L1 1 0.0394
K 0.0° 3.5° 7.0° 0.0° 3.5° 7.0°
Number of pins
N 32
1. Values in inches are converted from mm and rounded to 4 decimal digits.
Figure 41. UFQFPN28 - 28-lead ultra thin fine pitch Figure 42. UFQFPN28 recommended
quad flat no-lead package outline (4 x 4)(1) footprint(1)(2)
A
ddd
A3 A1
e 14
7 15
e
b
E
1 21
L2 L1
28 22
A0B0_ME
Table 41. UFQFPN28 - 28-lead ultra thin fine pitch quad flat no-lead package (4 x 4),
package mechanical data
mm inches(1)
Dim.
Min Typ Max Min Typ Max
L1
D ddd
L4
e
10 A3
L2
5 11 e
b
E
1 15
20 16
L3 A1
A
BJ
A0A5_ME
Figure 45. TSSOP20 - 20-lead thin shrink small Figure 46. TSSOP20 recommended
package outline (1) footprint (1)(2)
20 11
c
E1 E
1 10
A1 L
A A2
L1
CP
b e
TSSOP20-M
BJ
A 1.2 0.0472
A1 0.05 0.15 0.002 0.0059
A2 0.8 1 1.05 0.0315 0.0394 0.0413
b 0.19 0.3 0.0075 0.0118
CP 0.1 0.0039
c 0.09 0.2 0.0035 0.0079
D 6.4 6.5 6.6 0.252 0.2559 0.2598
E 6.2 6.4 6.6 0.2441 0.252 0.2598
E1 4.3 4.4 4.5 0.1693 0.1732 0.1772
e - 0.65 - 0.1693 0.0256 -
L 0.45 0.6 0.75 0.1693 0.0236 0.0295
L1 1 0.0394
a 0° 8° 0° 8°
Number of pins
N 20
1. Values in inches are converted from mm and rounded to 4 decimal digits.
Product class
STM8 microcontroller
Family type
L = Low power
Sub-family type
101 = sub-family
Pin count
K = 32 pins
G = 28 pins
F = 20 pins
Package
U = UFQFPN
T = LQFP
P = TSSOP
Temperature range
3 = -40 °C to 125 °C
6 = -40 °C to 85 °C
Shipping
TR = Tape and reel
Blank = Tray
1. For a list of available options (e.g. memory size, package) and orderable part numbers or for further
information on any aspect of this device, please go to www.st.com or contact the ST Sales Office nearest to
you.
Development tools for the STM8 microcontrollers include the full-featured STice emulation
system supported by a complete software tool package including C compiler, assembler and
integrated development environment with high-level language debugger. In addition, the
STM8 is to be supported by a complete range of tools including starter kits, evaluation
boards and a low-cost in-circuit debugger/programmer.
13 Revision history
Information in this document is provided solely in connection with ST products. STMicroelectronics NV and its subsidiaries (“ST”) reserve the
right to make changes, corrections, modifications or improvements, to this document, and the products and services described herein at any
time, without notice.
All ST products are sold pursuant to ST’s terms and conditions of sale.
Purchasers are solely responsible for the choice, selection and use of the ST products and services described herein, and ST assumes no
liability whatsoever relating to the choice, selection or use of the ST products and services described herein.
No license, express or implied, by estoppel or otherwise, to any intellectual property rights is granted under this document. If any part of this
document refers to any third party products or services it shall not be deemed a license grant by ST for the use of such third party products
or services, or any intellectual property contained therein or considered as a warranty covering the use in any manner whatsoever of such
third party products or services or any intellectual property contained therein.
UNLESS OTHERWISE SET FORTH IN ST’S TERMS AND CONDITIONS OF SALE ST DISCLAIMS ANY EXPRESS OR IMPLIED
WARRANTY WITH RESPECT TO THE USE AND/OR SALE OF ST PRODUCTS INCLUDING WITHOUT LIMITATION IMPLIED
WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE (AND THEIR EQUIVALENTS UNDER THE LAWS
OF ANY JURISDICTION), OR INFRINGEMENT OF ANY PATENT, COPYRIGHT OR OTHER INTELLECTUAL PROPERTY RIGHT.
UNLESS EXPRESSLY APPROVED IN WRITING BY AN AUTHORIZED ST REPRESENTATIVE, ST PRODUCTS ARE NOT
RECOMMENDED, AUTHORIZED OR WARRANTED FOR USE IN MILITARY, AIR CRAFT, SPACE, LIFE SAVING, OR LIFE SUSTAINING
APPLICATIONS, NOR IN PRODUCTS OR SYSTEMS WHERE FAILURE OR MALFUNCTION MAY RESULT IN PERSONAL INJURY,
DEATH, OR SEVERE PROPERTY OR ENVIRONMENTAL DAMAGE. ST PRODUCTS WHICH ARE NOT SPECIFIED AS "AUTOMOTIVE
GRADE" MAY ONLY BE USED IN AUTOMOTIVE APPLICATIONS AT USER’S OWN RISK.
Resale of ST products with provisions different from the statements and/or technical features set forth in this document shall immediately void
any warranty granted by ST for the ST product or service described herein and shall not create or extend in any manner whatsoever, any
liability of ST.
Information in this document supersedes and replaces all information previously supplied.
The ST logo is a registered trademark of STMicroelectronics. All other names are the property of their respective owners.