STM8L052C6
STM8L052C6
Features
Operating conditions
– Operating power supply: 1.8 V to 3.6 V
– Temperature range: -40 °C to 85 °C
LQFP48
Low-power features 7 x 7 mm
– Five low-power modes: Wait, Low-power
run (5.1 µA), Low-power wait (3 µA), Active- DMA
halt with full RTC (1.3 µA), Halt (350 nA) – Four channels supporting ADC, SPI, I2C,
– Consumption: 195 µA/MHz + 440 µA USART, timers
– Ultra-low leakage per I/0: 50 nA – One channel for memory-to-memory
– Fast wakeup from Halt: 4.7 µs 12-bit ADC up to 1 Msps/25 channels
Advanced STM8 core – Internal reference voltage
– Harvard architecture and 3-stage pipeline Timers
– Max freq. 16 MHz, 16 CISC MIPS peak – Two 16-bit timers with two channels (used
– Up to 40 external interrupt sources as IC, OC, PWM), quadrature encoder
– One 16-bit advanced control timer with three
Reset and supply management
channels, supporting motor control
– Low-power, ultra-safe BOR reset with five
– One 8-bit timer with 7-bit prescaler
selectable thresholds
– Two watchdogs: one Window, one
– Ultra-low-power POR/PDR
Independent
– Programmable voltage detector (PVD)
– Beeper timer with 1-, 2- or 4-kHz
Clock management frequencies
– 32 kHz and 1 to 16 MHz crystal oscillator Communication interfaces
– Internal 16 MHz factory-trimmed RC
– Synchronous serial interface (SPI)
– Internal 38 kHz low consumption RC
– Fast I2C 400 kHz SMBus and PMBus
– Clock security system
– USART (ISO 7816 interface and IrDA)
Low-power RTC
Up to 41 I/Os, all mappable on interrupt vectors
– BCD calendar with alarm interrupt
– Auto-wakeup from Halt w/ periodic interrupt Development support
LCD: up to 4x28 segments w/ step-up – Fast on-chip programming and non-
converter intrusive debugging with SWIM
– Bootloader using USART
Memories
– 32 KB Flash program memory and
256 bytes data EEPROM with ECC, RWW
– Flexible write and read protection modes
– 2 Kbytes of RAM
Contents
1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
2 Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
2.1 Device overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
2.2 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 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
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 System configuration controller and routing interface . . . . . . . . . . . . . . . 19
3.11 Timers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
3.11.1 TIM1 - 16-bit advanced control timer . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
3.11.2 16-bit general purpose timers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
3.11.3 8-bit basic timer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
3.12 Watchdog timers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
3.12.1 Window watchdog timer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
3.12.2 Independent watchdog timer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
3.13 Beeper . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
3.14 Communication interfaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
3.14.1 SPI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
3.14.2 I²C . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
3.14.3 USART . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
3.15 Infrared (IR) interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
3.16 Development support . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
4 Pin description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
4.1 System configuration options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
7 Option bytes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
8 Electrical parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
8.1 Parameter conditions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
8.1.1 Minimum and maximum values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
8.1.2 Typical values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
8.1.3 Typical curves . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
8.1.4 Loading capacitor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
8.1.5 Pin input voltage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
8.2 Absolute maximum ratings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
8.3 Operating conditions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
8.3.1 General operating conditions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
8.3.2 Embedded reset and power control block characteristics . . . . . . . . . . . 56
8.3.3 Supply current characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
8.3.4 Clock and timing characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
8.3.5 Memory characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73
8.3.6 I/O current injection characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73
8.3.7 I/O port pin characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74
8.3.8 Communication interfaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82
8.3.9 LCD controller . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87
8.3.10 Embedded reference voltage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88
8.3.11 12-bit ADC1 characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89
8.3.12 EMC characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95
9 Package information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98
9.1 LQFP48 package information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98
List of tables
List of figures
1 Introduction
This document describes the features, pinout, mechanical data and ordering information of
the medium-density value line STM8L052C6 microcontroller with 32-Kbyte Flash memory
density. For further details on the whole STMicroelectronics medium-density 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).
Medium density value line devices provide the following benefits:
Integrated system
– 32 Kbytes of medium-density embedded Flash program memory
– 256 bytes of data EEPROM
– 2 Kbytes of RAM
– Internal high-speed and low-power low-speed RC
– Embedded reset
Ultra-low-power consumption
– 195 µA/MHZ + 440 µA (consumption)
– 0.9 µA with LSI in Active-halt mode
– Clock gated system and optimized power management
– Capability to execute from RAM for low-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 across a common family product 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 1: Medium-density value line STM8L052C6 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 medium-density value line STM8L052C6 device.
2 Description
The medium-density value line STM8L052C6 devices are members of the STM8L ultra-low-
power 8-bit family.
The value line STM8L05xxx ultra-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 ultra-fast Flash programming.
Medium-density value line STM8L052C6 microcontrollers feature embedded data EEPROM
and low-power, low-voltage, single-supply program Flash memory.
All devices offer 12-bit ADC, real-time clock, 16-bit timers, one 8-bit timer as well as
standard communication interface such as SPI, I2C, USART and 4x28-segment LCD. The
4x 28-segment LCD is available on the medium-density value line STM8L052C6.
The STM8L052C6 operates from 1.8 V to 3.6 V and is available in the -40 to +85 °C
temperature range.
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 value line STM8L ultra-low-power products are based on the same architecture with the
same memory mapping and a coherent pinout.
Flash (Kbytes) 32
Data EEPROM (bytes) 256
RAM (Kbytes) 2
LCD 4x28
1
Basic
(8-bit)
2
Timers General purpose
(16-bit)
1
Advanced control
(16-bit)
SPI 1
Communication
I2C 1
interfaces
USART 1
GPIOs 41(1)
12-bit synchronized ADC 1
(number of channels) (25)
RTC, window watchdog, independent watchdog,
Others 16-MHz and 38-kHz internal RC,
1- to 16-MHz and 32-kHz external oscillator
CPU frequency 16 MHz
Operating voltage 1.8 V to 3.6 V
Operating temperature -40 to +85 °C
Package LQFP48
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).
Performance
All families incorporate highly energy-efficient cores with both Harvard architecture and
pipelined execution: advanced STM8 core for 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
STM8L05x, STM8L15x 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
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
3 Functional overview
DMA1
(4 channels)
Port A PA[7:0]
SCL, SDA,
SMB I²C1 Port B PB[7:0]
MOSI, MISO,
SCK, NSS SPI1 Port C PC[7:0]
VDDA PE[7:0]
VSSA @VDDA/VSSA Port E
ADC1_INx Port F PF0
VREF+ 12-bit ADC1
VREF-
Beeper BEEP
WWDG
VLCD = 2.5 V to
3.6 V LCD booster
LCD driver SEGx, COMx
4x28
1. Legend:
ADC: Analog-to-digital converter
BOR: Brownout reset
DMA: Direct memory access
I²C: Inter-integrated circuit multimaster interface
LCD: Liquid crystal display
POR/PDR: Power on reset / power down reset
RTC: Real-time clock
SPI: Serial peripheral interface
SWIM: Single wire interface module
USART: Universal synchronous asynchronous receiver transmitter
WWDG: Window watchdog
IWDG: independent watchdog
Addressing
20 addressing modes
Indexed indirect addressing mode for lookup tables located anywhere in the address
space
Stack pointer relative addressing mode for local variables and parameter passing
Instruction set
80 instructions with 2-byte average instruction size
Standard data movement and logic/arithmetic functions
8-bit by 8-bit multiplication
16-bit by 8-bit and 16-bit by 16-bit division
Bit manipulation
Data transfer between stack and accumulator (push/pop) with direct stack access
Data transfer using the X and Y registers or direct memory-to-memory transfers
Features
Clock prescaler: To get the best compromise between speed and current
consumption the clock frequency to the CPU and peripherals can be adjusted by a
programmable prescaler.
Safe clock switching: Clock sources can be changed safely on the fly in run mode
through a configuration register.
Clock management: To reduce power consumption, the clock controller can stop the
clock to the core, individual peripherals or memory.
System clock sources: 4 different clock sources can be used to drive the system
clock:
– 1-16 MHz High speed external crystal (HSE)
– 16 MHz High speed internal RC oscillator (HSI)
– 32.768 kHz Low speed external crystal (LSE)
– 38 kHz Low speed internal RC (LSI)
RTC and LCD clock sources: The above four sources can be chosen to clock the
RTC and the LCD, whatever the system clock.
Startup clock: After reset, the microcontroller restarts by default with an internal
2 MHz clock (HSI/8). The prescaler ratio and clock source can be changed by the
application program as soon as the code execution starts.
Clock security system (CSS): This feature can be enabled by software. If a HSE
clock failure occurs, the system clock is automatically switched to HSI.
Configurable main clock output (CCO): This outputs an external clock for use by the
application.
&66
/6( %((3&/.
WR%((3
/6,5& /6, &/.%((36(/>@ ,:'*&/.
N+] WR,:'*
57&&/.
WR57&
/&'SHULSKHUDO
57&6(/>@
FORFNHQDEOH ELW
57& 57&&/.
SUHVFDOHU 57&&/. WR/&'
26&B,1 /6(26&
26&B287 N+]
+DOW
/&'&/.
&RQILJXUDEOH 6<6&/. WR/&'
&&2 +6,
FORFNRXWSXW /6, /&'SHULSKHUDO
&&2 SUHVFDOHU +6( FORFNHQDEOH ELW
/6(
DLK
1. The HSE clock source can be either an external crystal/ceramic resonator or an external source (HSE
bypass). Refer to Section HSE clock in the STM8L15x and STM8L16x reference manual (RM0031).
2. The LSE clock source can be either an external crystal/ceramic resonator or a external source (LSE
bypass). Refer to Section LSE clock in the STM8L15x and STM8L16x reference manual (RM0031).
3.7 Memories
The medium-density value line STM8L052C6 has the following main features:
2 Kbytes of RAM
The non-volatile memory is divided into three arrays:
– 32 Kbytes of medium-density embedded Flash program memory
– 256 bytes of data EEPROM
– Option bytes
The EEPROM embeds the error correction code (ECC) feature. It supports the read-while-
write (RWW): it is possible to execute the code from the program matrix while
programming/erasing the data matrix.
The option byte protects part of the Flash program memory from write and readout piracy.
3.8 DMA
A 4-channel direct memory access controller (DMA1) offers a memory-to-memory and
peripherals-from/to-memory transfer capability. The 4 channels are shared between the
following IPs with DMA capability: ADC1, I2C1, SPI1, USART1 and the four timers.
3.11 Timers
The medium-density value line STM8L052C6 contains one advanced control timer (TIM1),
two 16-bit general purpose timers (TIM2 and TIM3) and one 8-bit basic timer (TIM4).
All the timers can be served by DMA1.
Table 2 compares the features of the advanced control, general-purpose and basic timers.
Any integer
TIM1 3+1 3
from 1 to 65536
16-bit up/down
TIM2 Any power of 2
Yes 2
TIM3 from 1 to 128
None
Any power of 2
TIM4 8-bit up 0
from 1 to 32768
It is clocked by the internal LSI RC clock source, and thus stays active even in case of a
CPU clock failure.
3.13 Beeper
The beeper function outputs a signal on the BEEP pin for sound generation. The signal is in
the range of 1, 2 or 4 kHz.
3.14.1 SPI
The serial peripheral interface (SPI1) provides half/ full duplex synchronous serial
communication with external devices.
Maximum speed: 8 Mbit/s (fSYSCLK/2) both for master and slave
Full duplex synchronous transfers
Simplex synchronous transfers on 2 lines with a possible bidirectional data line
Master or slave operation - selectable by hardware or software
Hardware CRC calculation
Slave/master selection input pin
Note: SPI1 can be served by the DMA1 Controller.
3.14.2 I²C
The I2C bus interface (I2C1) provides multi-master capability, and controls all I²C bus-
specific sequencing, protocol, arbitration and timing.
Master, slave and multi-master capability
Standard mode up to 100 kHz and fast speed modes up to 400 kHz
7-bit and 10-bit addressing modes
SMBus 2.0 and PMBus support
Hardware CRC calculation
Note: I2C1 can be served by the DMA1 Controller.
3.14.3 USART
The USART interface (USART1) 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.
1 Mbit/s full duplex SCI
SPI1 emulation
High precision baud rate generator
SmartCard emulation
IrDA SIR encoder decoder
Single wire half duplex mode
Note: USART1 can be served by the DMA1 Controller.
Bootloader
A bootloader is available to reprogram the Flash memory using the USART1 interface. The
reference document for the bootloader is UM0560: STM8 bootloader user manual.
The bootloader is used to download application software into the device memories,
including RAM, program and data memory, using standard serial interfaces. It is a
complementary solution to programming via the SWIM debugging interface.
4 Pin description
VDD2
VSS2
PE7
PE6
PC7
PC6
PC5
PC4
PC3
PC2
PC1
PC0
48 47 46 45 44 43 42 41 40 39 38 37
PA0 1 36 PD7
NRST/PA1 2 35 PD6
PA2 3 34 PD5
PA3 4 33 PD4
PA4 5 32 PF0
PA5 6 31 PB7
PA6 7 30 PB6
PA7 8 29 PB5
VSS1/VSSA/VREF- 9 28 PB4
VDD1 10 27 PB3
VDDA 11 26 PB2
VREF+ 12 25 PB1
13 14 15 16 17 18 19 20 21 22 23 24
VLCD
PE0
PE1
PE2
PE3
PE4
PE5
PD0
PD1
PD2
PD3
PB0
Table 3. Legend/abbreviation for Table 4
Type I= input, O = output, S = power supply
FT Five-volt tolerant
Level TT 3.6 V tolerant
Output HS = high sink/source (20 mA)
(after reset)
Ext. interrupt
I/O level
Type
LQFP48
floating
OD
PP
Main function
High sink/source
(after reset)
Ext. interrupt
I/O level
Type
LQFP48
floating
Pin name Default alternate function
wpu
OD
PP
PA4/TIM2_BKIN/
Timer 2 - break input /
5 I/O TT(2) X X X HS X X Port A4
LCD COM 0 / ADC1 input 2
LCD_COM0/ADC1_IN2
PA5/TIM3_BKIN/ Timer 3 - break input /
6 I/O TT(2) X X X HS X X Port A5
LCD_COM1/ADC1_IN1 LCD_COM 1 / ADC1 input 1
PA6/[ADC1_TRIG]/ [ADC1 - trigger] / LCD_COM2
7 I/O TT(2) X X X HS X X Port A6
LCD_COM2/ADC1_IN0 /ADC1 input 0
8 PA7/LCD_SEG0(3) I/O FT X X X HS X X Port A7 LCD segment 0
PB0(4)/TIM2_CH1/ Timer 2 - channel 1 / LCD
24 I/O TT(2) X(4) X(4) X HS X X Port B0
LCD_SEG10/ADC1_IN18 segment 10 / ADC1_IN18
PB1/TIM3_CH1/
Timer 3 - channel 1 / LCD
25 LCD_SEG11/ I/O TT(2) X X X HS X X Port B1
segment 11 / ADC1_IN17
ADC1_IN17
PB2/ TIM2_CH2/
Timer 2 - channel 2 / LCD
26 LCD_SEG12/ I/O TT(2) X X X HS X X Port B2
segment 12 / ADC1_IN16
ADC1_IN16
PB3/TIM2_ETR/
Timer 2 - external trigger /
27 LCD_SEG13/ I/O TT(2) X X X HS X X Port B3
LCD segment 13 /ADC1_IN15
ADC1_IN15
PB4(4)/[SPI1_NSS](8)/ [SPI1 master/slave select] /
28 LCD_SEG14/ I/O TT(2) X(4) X(4) X HS X X Port B4 LCD segment 14 /
ADC1_IN14 ADC1_IN14
PB5/[SPI1_SCK](8)/
[SPI1 clock] / LCD segment 15
29 LCD_SEG15/ I/O TT(2) X X X HS X X Port B5
/ ADC1_IN13
ADC1_IN13
PB6/[SPI1_MOSI](8)/ [SPI1 master out/slave in]/
30 LCD_SEG16/ I/O TT(2) X X X HS X X Port B6 LCD segment 16 /
ADC1_IN12 ADC1_IN12
PB7/[SPI1_MISO](8)/ [SPI1 master in- slave out]
31 LCD_SEG17/ I/O TT(2) X X X HS X X Port B7 /LCD segment 17 /
ADC1_IN11 ADC1_IN11
37 PC0(3)/I2C1_SDA I/O FT X X T(5) Port C0 I2C1 data
38 PC1(3)/I2C1_SCL I/O FT X X T(5) Port C1 I2C1 clock
USART1 receive /
PC2/USART1_RX/
LCD segment 22 / ADC1_IN6
41 LCD_SEG22/ADC1_IN6/ I/O TT(2) X X X HS X X Port C2
/Internal voltage reference
VREFINT
output
Main function
High sink/source
(after reset)
Ext. interrupt
I/O level
Type
LQFP48
floating
Pin name Default alternate function
wpu
OD
PP
PC3/USART1_TX/
USART1 transmit /
42 LCD_SEG23/ I/O TT(2) X X X HS X X Port C3
LCD segment 23 / ADC1_IN5
ADC1_IN5
USART1 synchronous clock /
PC4/USART1_CK/
I2C1_SMB / Configurable
I2C1_SMB/CCO/
43 I/O TT(2) X X X HS X X Port C4 clock output /
LCD_SEG24/
LCD segment 24/
ADC1_IN4
ADC1_IN4
PC5/OSC32_IN LSE oscillator input / [SPI1
44 /[SPI1_NSS](8)/ I/O X X X HS X X Port C5 master/slave select] /
[USART1_TX](8) [USART1 transmit]
PC6/OSC32_OUT/
LSE oscillator output / [SPI1
45 [SPI1_SCK](8)/ I/O X X X HS X X Port C6
clock] / [USART1 receive]
[USART1_RX](8)
PC7/LCD_SEG25/
46 I/O TT(2) X X X HS X X Port C7 LCD segment 25 /ADC1_IN3
ADC1_IN3
PD0/TIM3_CH2/ Timer 3 - channel 2 /
20 [ADC1_TRIG](8)/ I/O TT(2) X X X HS X X Port D0 [ADC1_Trigger] / LCD
LCD_SEG7/ADC1_IN22/ segment 7 / ADC1_IN22
PD1/TIM3_ETR/
Timer 3 - external trigger /
21 LCD_COM3/ I/O TT(2) X X X HS X X Port D1
LCD_COM3 / ADC1_IN21
ADC1_IN21
PD2/TIM1_CH1
Timer 1 - channel 1 / LCD
22 /LCD_SEG8/ I/O TT(2) X X X HS X X Port D2
segment 8 / ADC1_IN20
ADC1_IN20
PD3/ TIM1_ETR/ Timer 1 - external trigger /
23 I/O TT(2) X X X HS X X Port D3
LCD_SEG9/ADC1_IN19 LCD segment 9 / ADC1_IN19
PD4/TIM1_CH2
Timer 1 - channel 2 / LCD
33 /LCD_SEG18/ I/O TT(2) X X X HS X X Port D4
segment 18 / ADC1_IN10
ADC1_IN10
PD5/TIM1_CH3
Timer 1 - channel 3 / LCD
34 /LCD_SEG19/ I/O TT(2) X X X HS X X Port D5
segment 19 / ADC1_IN9
ADC1_IN9
PD6/TIM1_BKIN Timer 1 - break input / LCD
/LCD_SEG20/ (2) segment 20 / ADC1_IN8 /
35 I/O TT X X X HS X X Port D6
ADC1_IN8/RTC_CALIB/ RTC calibration / Internal
/VREFINT voltage reference output
Main function
High sink/source
(after reset)
Ext. interrupt
I/O level
Type
LQFP48
floating
Pin name Default alternate function
wpu
OD
PP
PD7/TIM1_CH1N Timer 1 - inverted channel 1/
/LCD_SEG21/ LCD segment 21 / ADC1_IN7 /
36 I/O TT(2) X X X HS X X Port D7
ADC1_IN7/RTC_ALARM/V RTC alarm / Internal voltage
REFINT reference output
14 PE0(3)/LCD_SEG1 I/O FT X X X HS X X Port E0 LCD segment 1
PE1/TIM1_CH2N/ Timer 1 - inverted channel 2 /
15 I/O TT(2) X X X HS X X Port E1
LCD_SEG2 LCD segment 2
PE2/TIM1_CH3N/ Timer 1 - inverted channel 3 /
16 I/O TT(2) X X X HS X X Port E2
LCD_SEG3 LCD segment 3
17 PE3/LCD_SEG4 I/O TT(2) X X X HS X X Port E3 LCD segment 4
18 PE4/LCD_SEG5 I/O TT(2) X X X HS X X Port E4 LCD segment 5
PE5/LCD_SEG6/
19 I/O TT(2) X X X HS X X Port E5 LCD segment 6 / ADC1_IN23
ADC1_IN23
PE6/LCD_SEG26/
47 I/O TT(2) X X X HS X X Port E6 LCD segment 26/PVD_IN
PVD_IN
PE7/LCD_SEG27
48 I/O TT(2) X X X HS X X Port E7 LCD segment 27
ADC1_IN24
32 PF0/ADC1_IN24 I/O X X X HS X X Port F0
Note: The slope control of all GPIO pins, except true open drain pins, can be programmed. By
default, the slope control is limited to 2 MHz.
0x00 0000
RAM (2 Kbytes) (1)
including
0x00 07FF Stack (513 bytes) (1)
0x00 0800
Reserved
0x00 0FFF
0x00 1000
Data EEPROM
(256 bytes)
0x00 10FF
0x00 1100 0x00 5000
GPIO Ports
Reserved 0x00 5050
Flash
0x00 5070
0x00 47FF DMA1
0x00 4800 0x00 509E
SYSCFG
Option bytes 0x00 50A0
0x00 48FF ITC-EXTI
0x00 4900 0x00 50A6
WFE
0x00 50B0
RST
0x00 50B2
PWR
0x00 50C0
CLK
Reserved 0x00 50D3
WWDG
0x00 50E0
IWDG
0x00 50F3
BEEP
0x00 5140
RTC
0x00 4FFF 0x00 5200
SPI1
0x00 5000 0x00 5210
I2C1
GPIO and peripheral registers 0x00 5230
USART1
0x00 57FF 0x00 5250
0x00 5800 TIM2
0x00 5280
Reserved TIM3
0x00 5FFF 0x00 52B0
TIM1
0x00 6000 0x00 52E0
Boot ROM TIM4
0x00 52FF
(2 Kbytes) IRTIM
0x00 67FF 0x00 5340
ADC1
0x00 6800 0x00 5380
Reserved Reserved
0x00 5400
0x00 7EFF LCD
0x00 5430
0x00 7F00 RI
CPU/SWIM/Debug/ITC 0x00 5440
Reserved
Registers
0x00 7FFF
0x00 8000
Reset and interrupt vectors
0x00 807F
0x00 8080
Medium density
Flash program memory
(32 Kbytes)
0x00 FFFF
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 501E to
Reserved area (44 bytes)
0x00 5049
0x00 5050 FLASH_CR1 Flash control register 1 0x00
0x00 5051 FLASH_CR2 Flash control register 2 0x00
Flash program memory unprotection key
0x00 5052 FLASH _PUKR 0x00
Flash register
0x00 5053 FLASH _DUKR Data EEPROM unprotection key register 0x00
Flash in-application programming status
0x00 5054 FLASH _IAPSR 0x00
register
0x00 5055 to
Reserved area (27 bytes)
0x00 506F
0x00 5408 to
Reserved area (4 bytes)
0x00 540B
0x00 540C LCD_RAM0 LCD display memory 0 0x00
0x00 540D LCD_RAM1 LCD display memory 1 0x00
0x00 540E LCD_RAM2 LCD display memory 2 0x00
0x00 540F LCD_RAM3 LCD display memory 3 0x00
0x00 5410 LCD_RAM4 LCD display memory 4 0x00
0x00 5411 LCD_RAM5 LCD display memory 5 0x00
0x00 5412 LCD_RAM6 LCD display memory 6 0x00
0x00 5413 LCD_RAM7 LCD display memory 7 0x00
0x00 5414 LCD_RAM8 LCD display memory 8 0x00
0x00 5415 LCD_RAM9 LCD display memory 9 0x00
LCD
0x00 5416 LCD_RAM10 LCD display memory 10 0x00
0x00 5417 LCD_RAM11 LCD display memory 11 0x00
0x00 5418 LCD_RAM12 LCD display memory 12 0x00
0x00 5419 LCD_RAM13 LCD display memory 13 0x00
0x00 541A to
Reserved area (22 bytes)
0x00 542F
0x00 7F0B to
Reserved area (85 bytes)
0x00 7F5F CPU
0x00 7F60 CFG_GCR Global configuration register 0x00
0x00 7F70 ITC_SPR1 Interrupt Software priority register 1 0xFF
0x00 7F71 ITC_SPR2 Interrupt Software priority register 2 0xFF
0x00 7F72 ITC_SPR3 Interrupt Software priority register 3 0xFF
0x00 7F73 ITC_SPR4 Interrupt Software priority register 4 0xFF
ITC-SPR
0x00 7F74 ITC_SPR5 Interrupt Software priority register 5 0xFF
0x00 7F75 ITC_SPR6 Interrupt Software priority register 6 0xFF
0x00 7F76 ITC_SPR7 Interrupt Software priority register 7 0xFF
0x00 7F77 ITC_SPR8 Interrupt Software priority register 8 0xFF
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 DM breakpoint 1 register extended byte 0xFF
0x00 7F91 DM_BK1RH DM breakpoint 1 register high byte 0xFF
0x00 7F92 DM_BK1RL DM breakpoint 1 register low byte 0xFF
0x00 7F93 DM_BK2RE DM breakpoint 2 register extended byte 0xFF
0x00 7F94 DM_BK2RH DM breakpoint 2 register high byte 0xFF
0x00 7F95 DM DM_BK2RL DM breakpoint 2 register low byte 0xFF
0x00 7F96 DM_CR1 DM Debug module control register 1 0x00
0x00 7F97 DM_CR2 DM Debug module control register 2 0x00
0x00 7F98 DM_CSR1 DM Debug module control/status register 1 0x10
0x00 7F99 DM_CSR2 DM Debug module control/status register 2 0x00
0x00 7F9A DM_ENFCTR DM enable function register 0xFF
0x00 7F9B to
Reserved area (5 bytes)
0x00 7F9F
1. Accessible by debug module only
TIM2 update/overflow/
19 TIM2 trigger/break - - Yes Yes 0x00 8054
interrupt
TIM2capture/
20 TIM2 - - Yes Yes 0x00 8058
compare interrupt
TIM3 update/overflow/
21 TIM3 - - Yes Yes 0x00 805C
trigger/break interrupt
TIM3 capture/compare
22 TIM3 - - Yes Yes 0x00 8060
interrupt
Update /overflow/trigger/
23 TIM1 - - - Yes 0x00 8064
COM
24 TIM1 Capture/compare - - - Yes 0x00 8068
TIM4 update/overflow/
25 TIM4 - - Yes Yes 0x00 806C
trigger interrupt
SPI1 TX buffer empty/
26 SPI1 RX buffer not empty/ Yes Yes Yes Yes 0x00 8070
error/wakeup interrupt
USART1transmit data
register empty/
27 USART1 - - Yes Yes 0x00 8074
transmission complete
interrupt
USART1 received data
ready/overrun error/
28 USART1 - - Yes Yes 0x00 8078
idle line detected/parity
error/global error interrupt
29 I2C1 I2C1 interrupt(3) Yes Yes Yes Yes 0x00 807C
1. The Low power wait mode is entered when executing a WFE instruction in Low power run mode. In WFE mode, the
interrupt is served if it has been previously enabled. After processing the interrupt, the processor goes back to WFE mode.
When the interrupt is configured as a wakeup event, the CPU wakes up and resumes processing.
2. The interrupt from PVD is logically OR-ed with Port E and F interrupts. Register EXTI_CONF allows to select between Port
E and Port F interrupt (see External interrupt port select register (EXTI_CONF) in the RM0031).
3. 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 memory block.
All option bytes can be modified in ICP mode (with SWIM) by accessing the EEPROM
address. See Table 10 for details on option byte addresses.
The option bytes can also be modified ‘on the fly’ by the application in IAP mode, except for
the ROP and UBC values which can only be taken into account when they are modified in
ICP mode (with the SWIM).
Refer to the STM8L05x/15x Flash programming manual (PM0054) and STM8 SWIM and
Debug Manual (UM0470) for information on SWIM programming procedures.
Read-out
0x00 4800 protection OPT0 ROP[7:0] 0xAA
(ROP)
UBC (User
0x00 4802 OPT1 UBC[7:0] 0x00
Boot code size)
0x00 4807 Reserved 0x00
Independent
OPT3 WWDG WWDG IWDG IWDG
0x00 4808 watchdog Reserved 0x00
[3:0] _HALT _HW _HALT _HW
option
Number of
stabilization
0x00 4809 clock cycles for OPT4 Reserved LSECNT[1:0] HSECNT[1:0] 0x00
HSE and LSE
oscillators
Brownout reset OPT5 BOR_
0x00 480A Reserved BOR_TH 0x00
(BOR) [3:0] ON
0x00 480B Bootloader 0x00
OPTBL
option bytes OPTBL[15:0]
0x00 480C [15:0] 0x00
(OPTBL)
BOR_ON:
0: Brownout reset off
OPT5 1: Brownout reset on
BOR_TH[3:1]: Brownout reset thresholds. Refer to Table 20 for details on the thresholds according to
the value of BOR_TH bits.
OPTBL[15:0]:
This option is checked by the boot ROM code after reset. Depending on
OPTBL content of addresses 00 480B, 00 480C and 0x8000 (reset vector) the
CPU jumps to the bootloader or to the reset vector.
Refer to the UM0560 bootloader user manual for more details.
8 Electrical parameters
STM8L PIN
50 pF
STM8L PIN
VIN
Injected current on five-volt tolerant (FT) pins (PA7 and PE0) (1) - 5 / +0
IINJ(PIN)
Injected current on 3.6 V tolerant (TT) pins (1) - 5 / +0
IINJ(PIN) Total injected current (sum of all I/O and control pins) (3) ± 25
1. Positive injection is not possible on these I/Os. A negative injection is induced by VIN<VSS. IINJ(PIN) must
never be exceeded. Refer to Table 12. for maximum allowed input voltage values.
2. A positive injection is induced by VIN>VDD while a negative injection is induced by VIN<VSS. IINJ(PIN) must
never be exceeded. Refer to Table 12. for maximum allowed input voltage values.
3. When several inputs are submitted to a current injection, the maximum IINJ(PIN) is the absolute sum of the
positive and negative injected currents (instantaneous values).
System clock
fSYSCLK(1) 1.8 V VDD 3.6 V 0 16 MHz
frequency
Standard operating
VDD - 1.8 3.6 V
voltage
Analog operating Must be at the same
VDDA 1.8 3.6 V
voltage potential as VDD
Power dissipation at
PD(2) LQFP48 - 288 mW
TA= 85 °C
Power dissipation at
PD(3) TSSOP20 - 181 mW
TA= 85 °C
TA Temperature range 1.8 V VDD 3.6 V -40 85 °C
Junction temperature
TJ -40 °C TA 85 °C -40 105(4) °C
range
1. fSYSCLK = fCPU
2. To calculate PDmax(TA), use the formula PDmax=(TJmax -TA)/JA with TJmax in this table and JA in “Thermal
characteristics” table.
3. To calculate PDmax(TA), use the formula PDmax=(TJmax -TA)/JA with TJmax in this table and JA in “Thermal
characteristics” table.
4. TJmax is given by the test limit. Above this value, the product behavior is not guaranteed.
BOR detector
VDD rise time rate
enabled 0(1) - (1)
tVDD µs/V
BOR detector
VDD fall time rate
enabled 20 (1) - (1)
9
2SHUDWLQJ SRZHUVXSSO\
9''
%25WKUHVKROGB
9 %25WKUHVKROG
9%25
ZLWKRXW%25 EDWWHU\OLIHH[WHQVLRQ
6DIHUHVHWUHOHDVH
93'5
6DIHUHVHW
3'5WKUHVKROG
5HVHW
,QWHUQDO1567
%25DOZD\VDFWLYH 7LPH
%25DFWLYDWHGE\XVHU
DWSRZHUXS IRUSRZHUGRZQGHWHFWLRQ
$,
4. Oscillator bypassed (HSEBYP = 1 in CLK_ECKCR). When configured for external crystal, the HSE
consumption
(IDD HSE) must be added. Refer to Table 28.
5. Tested in production.
6. The run from Flash consumption can be approximated with the linear formula:
IDD(run_from_Flash) = Freq * 195 µA/MHz + 440 µA
7. Oscillator bypassed (LSEBYP = 1 in CLK_ECKCR). When configured for external crystal, the LSE
consumption
(IDD LSE) must be added. Refer to Table 29.
&
&
&
,'' 581 +6,>P$@
9''>9@
DL9
In the following table, data is based on characterization results, unless otherwise specified.
LSE(5)
external clock fCPU = fLSE 0.032 0.036 0.038
(32.768 kHz)
fCPU = 125 kHz 0.38 0.48 0.49
fCPU = 1 MHz 0.41 0.49 0.51
LSE(5)
external clock fCPU = fLSE 0.051 0.056 0.060
(32.768 kHz)
1. All peripherals OFF, VDD from 1.8 V to 3.6 V, HSI internal RC oscillator, fCPU = fSYSCLK
2. For temperature range 6.
3. Flash is configured in IDDQ mode in Wait mode by setting the EPM or WAITM bit in the Flash_CR1 register.
4. Oscillator bypassed (HSEBYP = 1 in CLK_ECKCR). When configured for external crystal, the HSE
consumption
(IDD HSE) must be added. Refer to Table 28.
5. Oscillator bypassed (LSEBYP = 1 in CLK_ECKCR). When configured for external crystal, the LSE
consumption
(IDD HSE) must be added. Refer to Table 29.
,'' :$,7 +6, >$@
&
&
&
9''>9@
DL9
1. Typical current consumption measured with code executed from Flash memory.
In the following table, data is based on characterization results, unless otherwise specified.
Table 19. Total current consumption and timing in Low power run mode at VDD = 1.8 V
to 3.6 V
Symbol Parameter Conditions(1) Typ Max Unit
&
&
,'' /35 /6,>$@
&
9''>9@
DL9
In the following table, data is based on characterization results, unless otherwise specified.
Table 20. Total current consumption in Low power wait mode at VDD = 1.8 V to 3.6 V
Symbol Parameter Conditions(1) Typ Max Unit
TA = -40 °C to 25 °C 3 3.3
all peripherals OFF TA = 55 °C 3.3 3.6
LSI RC osc. TA = 85 °C 4.4 5
(at 38 kHz) TA = -40 °C to 25 °C 3.4 3.7
with TIM2 active(2) TA = 55 °C 3.7 4
Supply current in TA = 85 °C 4.8 5.4
IDD(LPW) Low power wait A
mode TA = -40 °C to 25 °C 2.35 2.7
all peripherals OFF TA = 55 °C 2.42 2.82
LSE external
TA = 85 °C 3.10 3.71
clock(3)
TA = -40 °C to 25 °C 2.46 2.75
(32.768 kHz)
with TIM2 active (2) TA = 55 °C 2.50 2.81
TA = 85 °C 3.16 3.82
1. No floating I/Os.
2. Timer 2 clock enabled and counter is running.
3. Oscillator bypassed (LSEBYP = 1 in CLK_ECKCR). When configured for external crystal, the LSE consumption
(IDD LSE) must be added. Refer to Table 29.
&
&
,'' /3: /6,>$@
&
9''>9@
DL9
In the following table, data is based on characterization results, unless otherwise specified.
Table 21. Total current consumption and timing in Active-halt mode at VDD = 1.8 V to 3.6 V
Symbol Parameter Conditions (1) Typ Max Unit
Table 21. Total current consumption and timing in Active-halt mode at VDD = 1.8 V to 3.6 V
Symbol Parameter Conditions (1) Typ Max Unit
Table 22. Typical current consumption in Active-halt mode, RTC clocked by LSE
external crystal
Symbol Parameter Condition(1) Typ Unit
LSE 1.15
VDD = 1.8 V
(3)
LSE/32 1.05
In the following table, data is based on characterization results, unless otherwise specified.
Table 23. Total current consumption and timing in Halt mode at VDD = 1.8 to 3.6 V
Symbol Parameter Condition(1) Typ Max Unit
VDD = 1.8 V 48
Supply current under All pins are externally
IDD(RST) VDD = 3 V 76 µA
external reset (1) tied to VDD
VDD = 3.6 V 91
1. All pins except PA0, PB0 and PB4 are floating under reset. PA0, PB0 and PB4 are configured with pull-up under reset.
VLSEH(2) OSC32_IN input pin high level voltage 0.7 x VDD - VDD
V
VLSEL(2) OSC32_IN input pin low level voltage VSS - 0.3 x VDD
CO RF
Lm
CL1
Cm OSC_IN
gm
Resonator
Consumption
control
Resonator
STM8
OSC_OUT
CL2
- - - 1.4(3) µA
VDD = 1.8 V - 450 -
IDD(LSE) LSE oscillator power consumption
VDD = 3 V - 600 - nA
VDD = 3.6 V - 750 -
gm Oscillator transconductance - 3(3) - µA/V
tSU(LSE)(4) Startup time VDD is stabilized - 1 - s
1. C=CL1=CL2 is approximately equivalent to 2 x crystal CLOAD.
2. The oscillator selection can be optimized in terms of supply current using a high quality resonator with a small Rm value.
Refer to crystal manufacturer for more details.
3. Data guaranteed by Design. Not tested in production.
4. tSU(LSE) is the startup time measured from the moment it is enabled (by software) to a stabilized 32.768 kHz oscillation.
This value is measured for a standard crystal resonator and it can vary significantly with the crystal manufacturer.
CO RF
Lm
CL1
Cm OSC_IN
gm
Resonator
Consumption
control
Resonator
STM8
OSC_OUT
CL2
+6,IUHTXHQF\>0+]@
&
&
&
9''>9@
DL9
&
&
&
9''>9@
DL9
VRM Data retention mode (1) Halt mode (or Reset) 1.8 - - 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 fSYSCLK = 16 MHz 1.8 3.6 V
(all modes, read/write/erase)
Programming time for 1 or 64 bytes (block)
- - 6 - ms
erase/write cycles (on programmed byte)
tprog
Programming time for 1 to 64 bytes (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 100
TRET+85 °C 30(1) - -
erase/write cycles at TA–40 to +85 °C
tRET(2) years
Data retention (data memory) after 100000
TRET +85 °C 30(1) - -
erase/write cycles at TA= –40 to +85 °C
Erase/write cycles (program memory) 100(1) - - cycles
NRW (3) TA –40 to +85 °C 100(1)
Erase/write cycles (data memory) (4) - - kcycles
Figure 16. Typical VIL and VIH vs. VDD (high sink I/Os)
&
&
&
9,/DQG9,+>9@
9''>9@
DL9
Figure 17. Typical VIL and VIH vs. VDD (true open drain I/Os)
&
&
&
9,/DQG9,+>9@
9''>9@
DL9
Figure 18. Typical pull-up resistance RPU vs. VDD with VIN=VSS
&
&
3XOOXSUHVLVWDQFH>N@ &
9''>9@
DL9
Figure 19. Typical pull-up current Ipu vs. VDD with VIN=VSS
&
&
&
3XOOXSFXUUHQW>$@
9''>9@
DL9
IIO = +2 mA,
- 0.45 V
VDD = 3.0 V
IIO = +2 mA,
VOL (1) Output low level voltage for an I/O pin - 0.45 V
VDD = 1.8 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
1. The IIO current sunk must always respect the absolute maximum rating specified in Table 13 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 13 and the
sum of IIO (I/O ports and control pins) must not exceed IVDD.
IIO = +3 mA,
Open drain
- 0.45
VDD = 3.0 V
VOL (1) Output low level voltage for an I/O pin V
IIO = +1 mA,
- 0.45
VDD = 1.8 V
1. The IIO current sunk must always respect the absolute maximum rating specified in Table 13 and the sum
of IIO (I/O ports and control pins) must not exceed IVSS.
Table 38. Output driving current (PA0 with high sink LED driver capability)
I/O
Symbol Parameter Conditions Min Max Unit
Type
1. The IIO current sunk must always respect the absolute maximum rating specified in Table 13 and the sum
of IIO (I/O ports and control pins) must not exceed IVSS.
Figure 20. Typ. VOL @ VDD = 3.0 V (high sink Figure 21. Typ. VOL @ VDD = 1.8 V (high sink
ports) ports)
&
&
&
&
&
&
92/ >9@
92/ >9@
, 2/>P$@
,2/ >P$@ DL9
DL9
Figure 22. Typ. VOL @ VDD = 3.0 V (true open Figure 23. Typ. VOL @ VDD = 1.8 V (true open
drain ports) drain ports)
&
& &
& &
&
92/ >9@
92/ >9@
,2/ >P$@ ,2/ >P$@
DL9 BJ7
Figure 24. Typ. VDD - VOH @ VDD = 3.0 V (high Figure 25. Typ. VDD - VOH @ VDD = 1.8 V (high
sink ports) sink ports)
&
&
&
&
&
&
9''92+ >9@
9''92+ >9@
,2+ >P$@ ,2+ >P$@
DL9 BJ7
NRST pin
Subject to general operating conditions for VDD and TA unless otherwise specified.
IOL = 2 mA
for 2.7 V VDD 3.6 - - V
10%VDD
VHYST NRST input hysteresis(3) - (2) - - mV
&
&
3XOOXSUHVLVWDQFH>N@
&
9''>9@
DL9
&
&
&
3XOOXSFXUUHQW>$@
9''>9@
DL9
The reset network shown in Figure 28 protects the device against parasitic resets. The user
must ensure that the level on the NRST pin can go below the VIL(NRST) max. level specified
in Table 39. Otherwise the reset is not taken into account internally.
For power consumption sensitive applications, the external reset capacitor value can be
reduced to limit the charge/discharge current. If the NRST signal is used to reset the
external circuitry, attention must be paid to the charge/discharge time of the external
capacitor to fulfill the external devices reset timing conditions. The minimum recommended
capacity is 10 nF.
VDD
RPU
EXTERNAL NRST INTERNAL RESET
RESET Filter
CIRCUIT
0.1 µF STM8
(Optional)
E^^ŝŶƉƵƚ
ƚĐ;^<Ϳ
ƚ^h;E^^Ϳ ƚŚ;E^^Ϳ
W,сϬ
^</ŶƉƵƚ
WK>сϬ
ƚǁ;^<,Ϳ
W,сϬ ƚǁ;^<>Ϳ
WK>сϭ
166LQSXW
W68 166 WF 6&. WK 166
&3+$
6&.,QSXW
&32/
WZ 6&.+
&3+$ WZ 6&./
&32/
WY 62 WK 62 WU 6&. WGLV 62
WD 62 WI 6&.
0,62
287 3 87 06 % 2 87 %, 7 287 /6% 287
WVX 6, WK 6,
026,
0 6% ,1 % , 7 ,1 /6% ,1
, 1387
DL
.33 INPUT
TC3#+
3#+ /UTPUT
#0(!
#0/,
#0(!
#0/,
3#+ /UTPUT
#0(!
#0/,
#0(!
#0/,
TW3#+( TR3#+
TSU-) TW3#+, TF3#+
-)3/
).0 54 -3 "). ") 4 ). ,3" ).
TH-)
-/3)
- 3" /54 " ) 4 /54 ,3" /54
/54054
TV-/ TH-/
AI6
tf(SDA)
SDA and SCL fall time - 300 - 300
tf(SCL)
Note: For speeds around 200 kHz, the achieved speed can have a 5% tolerance
For other speed ranges, the achieved speed can have a 2% tolerance
The above variations depend on the accuracy of the external components used.
Figure 32. 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
External trigger
fTRIG - - - tconv 1/fADC
frequency
tLAT External trigger latency - - - 3.5 1/fSYSCLK
In the following three tables, data is guaranteed by characterization result, not tested in
production.
95() 9''$
>/6%,'($/ RUGHSHQGLQJRQSDFNDJH
(* ([DPSOHRIDQDFWX DOWUDQVIH UFXUYH
7KHLGHDOWUDQVIHUFX UYH
(QGSRLQWFRUUHODWLRQOLQH
(7 7RWDOXQDGMXVWHG(UURUPD[LPXPGHYLDWLRQ
(7 EHWZHHQWKHDFWXDODQGWKHLGHDOWUDQVIHUFXUYHV
(2 2IIVHW(UURUGHYLDWLRQEHWZHHQWKHILUVWDFWXDO
WUDQVLWLRQDQGWKHODVWDFWXDORQH
(* *DLQ(UURUGHYLDWLRQEHWZHHQWKHODVWLGHDO
WUDQVLWLRQDQGWKHODVWDFWXDORQH
(2 (/ (' 'LIIHUHQWLDO/LQHDULW\(UURUPD[LPXPGHYLDWLRQ
EHWZHHQDFWXDOVWHSVDQGWKHLGHDORQH
(' (/ ,QWHJUDO/LQHDULW\(UURUPD[LPXPGHYLDWLRQ
EHWZHHQDQ\DFWXDOWUDQVLWLRQDQGWKHHQGSRLQW
/6%,'($/ FRUUHODWLRQOLQH
966$ 9''$
DLH
DLI
Figure 35. Maximum dynamic current consumption on VREF+ supply pin during ADC
conversion
ADC clock
Iref+
700µA
300µA
Figure 36. Power supply and reference decoupling (VREF+ not connected to VDDA)
670/
9 5()
([WHUQDO
UHIHUHQFH
)Q) 9 ''$
6XSSO\
)Q)
)Q)
9 66$9 5()
DLF
Figure 37. Power supply and reference decoupling (VREF+ connected to VDDA)
670/
6XSSO\ 95()9''$
)Q)
95()9''$
DLF
Static latch-up
LU: 3 complementary static tests are required on 6 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.
9 Package information
3%!4).'
0,!.%
#
!
!
!
C
MM
'!5'% 0,!.%
CCC #
$
! +
,
$ ,
$
B
%
%
0).
)$%.4)&)#!4)/.
E "?-%?6
Table 53. LQFP48 - 48-pin, 7 x 7 mm low-profile quad flat package mechanical data
millimeters inches(1)
Symbol
Min Typ Max Min Typ Max
A - - 1.600 - - 0.0630
A1 0.050 - 0.150 0.0020 - 0.0059
A2 1.350 1.400 1.450 0.0531 0.0551 0.0571
b 0.170 0.220 0.270 0.0067 0.0087 0.0106
c 0.090 - 0.200 0.0035 - 0.0079
D 8.800 9.000 9.200 0.3465 0.3543 0.3622
D1 6.800 7.000 7.200 0.2677 0.2756 0.2835
D3 - 5.500 - - 0.2165 -
E 8.800 9.000 9.200 0.3465 0.3543 0.3622
E1 6.800 7.000 7.200 0.2677 0.2756 0.2835
E3 - 5.500 - - 0.2165 -
e - 0.500 - - 0.0197 -
L 0.450 0.600 0.750 0.0177 0.0236 0.0295
L1 - 1.000 - - 0.0394 -
k 0° 3.5° 7° 0° 3.5° 7°
ccc - - 0.080 - - 0.0031
1. Values in inches are converted from mm and rounded to 4 decimal digits.
AID
Device marking
The following figure gives an example of topside marking orientation versus pin 1 identifier
location.
3URGXFW
LGHQWLILFDWLRQ 45.-
$5
'DWHFRGH
6WDQGDUG67ORJR
: 88
5HYLVLRQFRGH
3LQLGHQWLILHU
069
1. Parts marked as “ES”, “E” or accompanied by an Engineering Sample notification letter, are not yet
qualified and therefore not yet ready to be used in production and any consequences deriving from such
usage will not be at ST charge. In no event, ST will be liable for any customer usage of these engineering
samples in production. ST Quality has to be contacted prior to any decision to use these Engineering
Samples to run qualification activity.
10 Part numbering
For a list of available options (memory, package, and so on) or for further information on any
aspect of this device, please contact your nearest ST sales office.
Device family
STM8 microcontroller
Product type
L = Low-power
Sub-family
052 = STM8L052xx, ultra-low power with LCD
Pin count
C = 48 pins
Code size
6 = 32 Kbytes
Package
T = LQFP
Temperature range
6 = –40 to 85 °C
Options
xxx = programmed parts
TR = tape and reel
11 Revision history
STMicroelectronics NV and its subsidiaries (“ST”) reserve the right to make changes, corrections, enhancements, modifications, and
improvements to ST products and/or to this document at any time without notice. Purchasers should obtain the latest relevant information on
ST products before placing orders. ST products are sold pursuant to ST’s terms and conditions of sale in place at the time of order
acknowledgement.
Purchasers are solely responsible for the choice, selection, and use of ST products and ST assumes no liability for application assistance or
the design of Purchasers’ products.
Resale of ST products with provisions different from the information set forth herein shall void any warranty granted by ST for such product.
ST and the ST logo are trademarks of ST. All other product or service names are the property of their respective owners.
Information in this document supersedes and replaces information previously supplied in any prior versions of this document.