www.st.com/mcuwww.st.com/mcu
February 2010
STM8S/STM8A/STM8L
8-bit microcontroller families
2
STM8 stands for a platform of technologies, IPs and tools which form the basis of STMicroelectronics’ comprehensive
family of 8-bit microcontrollers. These cover a wide range of applications from low-power and consumer electronics
through home appliances and factory automation to automotive.
The platform provides outstanding levels of digital and analog performance combined with a high level of cost-
effectiveness.
Implemented around a high-performance 8-bit core and a state-of-the-art set of peripherals, the microcontrollers in the
STM8 family are manufactured using an ST-proprietary 130 nm embedded non-volatile memory technology.
STM8 core
The STM8 core is an evolution of the
industry-standard ST7 core. It has
been significantly improved to reach
1.6 cycles per instruction and up to
24 MHz clock frequency.
STM8 core
Fetch
Decode
Execute
Data
memory
3-stage
pipeline
Complete instructions
32-bit
memory
B1B2B3B4
The key features of the STM8 core
are:
Harvard architectureQQ
16-bit index registers and stack QQ
pointer
32-bit memory interface and QQ
3-stage pipeline
Extended instruction setQQ
Enhanced stack pointer QQ
operations
Move instruction for fast data QQ
transfer
Hardware division (16 / 8)QQ
Faster multiplication (8 x 8)QQ
8-bit signed arithmetic supportQQ
Advanced addressing modes QQ
including indexed addressing
Statistically optimized instruction QQ
tables
STM8 8-bit microcontroller families
Embedded EEPROM
technology
Based on STMicroelectronics’
in-house 130 nm non-volatile
embedded technologies, the
STM8 families are leading the
8-bit microcontroller market in
terms of analog, digital and NVM
performance. These technologies
are highly competitive due to the
outstanding integration level.
As a result, all STM8 devices feature
real data EEPROM with read while
write capability. This means an
easy-to-use data NVM eliminating
the need for complex EEPROM
emulation software.
The performance of the integrated
EEPROM is at the same level as
standalone devices, meeting even
the most demanding automotive
reliability standards.
Low-power technology
The ultra-low-power design (clock
gating, low-power Flash with power-
off capability) ensures reduced
overall run and wait mode current
consumption by turning off clocks of
unused peripherals or Flash. Multiple
modular-technology options allow
solutions for high-speed, ultra-low
leakage and power, high integration
level or analog performance.
Rich portfolio
Up to 128 Kbytes of program
memory, up to 80-pin packages, and
145 °C max. operating temperature
make the STM8 a perfect fit for
strategic platform choices, and
facilitates reuse of design concepts.
Large voltage range
With a voltage range from 1.65 to
5.5 V, the STM8 families can cover a
wide scope of application segments.
Family concept
The compatibility within and across
the families through a modular
peripheral set simplifies design
reuse, so improving time to market.
The hardware implementation in the
STM8 devices provides a consistent
migration across the package
families. Increasing or decreasing
the pin count with a similar location
for supply, control or peripheral pins
simplifies the hardware design and
validation.
Analog Inputs System
Timers Communications
Moreover, the flexible alternate
function mapping ensures all
communication peripherals
(U(S)ART, I²C or SPI) are always
available and brings the versatility
of low pin count packages to a new
level.
33
Robustness
The products are designed to withstand a high level of external disturbance, ensuring robust applications without
the expense of external protection elements. Immune against EMS and robust against latch-up or ESD, with built-
in checksum mechanisms, the products support IEC 60335 class B compliance.
The main contributors to this robustness are the clock controller with 2 independent watchdogs and the clock
security system (CSS), as well as a protection mechanism for critical registers and illegal opcodes.
Mux
1 to 24 MHz Xtal and external clock
128 kHz internal RC oscillator
Window watchdog
16 MHz internal RC oscillator
CSS
WDG
timer
Clock control unit
CPU and peripherals
The I/Os of the devices feature a high level of robustness against current injection when the protection diodes are
used for clamping. During reset of the microcontroller, the I/Os are in high-impedance state.
I/O - 4 mA injected current
I/O < 1 µA leakage on adjacent pins
Debug module and SWIM interface
SWIM
A single-wire interface module allows direct access to the debug module, the
registers and the device memory. The interface can be activated in all device
operation modes and supports debugging and programming of the device.
Debug module
The non-intrusive debug module is present on each STM8 device. It is
conncected to the internal bus and allows breakpoint setting and CPU
monitoring and control.
In-circuit debugging
Application debugging on microcontroller products has never been easier
or more affordable. Using the advanced single-wire SWIM interface and the
integrated debug module, a simple USB adapter turns your PC into a powerful
development tool featuring:
Non-intrusive debugging – no wasted target resources, no reserved NVM QQ
addresses, no monitor
Real-time read and write of RAM and peripheral registers – no wait, no stallQQ
On-the-fly access to CPU via shadow registersQQ
Hot-plug during application execution and post-mortem debugQQ
Unlimited breakpoints on all memory instructionsQQ
Hardware breakpoints – 23 configurationsQQ
Step-by-step code executionQQ
Fast Flash programmingQQ
For the most demanding applications, ST offers the FPGA based STice
emulator, which complements the environment with solutions for code tracing,
code coverage measurement and profiling.
Tools for everyone
The ecosystem of advanced STM8
tools is a scalable offer to satisfy all
needs. From free-of-charge software
tools, including free compiler
licenses, to low-cost starter kits and
affordable evaluation boards for
multiple applications, ST tools and
support open the door to the ST
microcontroller universe.
ST’s fully tested, optimized and
validated downloadable source-code
libraries are immediately available for
new application development.
4
Features and benefits
Features Benefits
2.95 to 5.5 V, -40 to +125 °C range Ideal for industrial and appliance requirements
Up to 20 MIPS @ 24 MHz, Harvard architecture Optimized core performance and code-size efficiency
16-bit advanced control timer Satisfies all needs with configurable modes, motor control, capture, compare, PWM
Embedded true EEPROM, 300 Kcycles Lower system cost
CAN, 2xU(S)ART, SPI, I²C All essential communication peripherals supporting various protocols
Single-voltage Flash memory with single-byte
programming granularity
In-application programming (IAP), in-circuit
programming (ICP)
4 low-power modes Efficient power management
Trimmable 16 MHz and 128 kHz internal RC
oscillators with dual independent watchdogs
and 2 µs fast switching between clock sources
Reduced cost, robust clock architecture,
optimized power consumption
Integrated POR and BOR Reliable reset mechanism during power up and down
Low emission and high current injection
immunity Outstanding EMC, no need for extra protection
4 to 128 Kbyte Flash in 20- to 80-pin packages Package compatible across family, ideal choice of platform
On-chip debugging and programming through
single-wire interface, SWIM
Easy-to-use, non-intrusive and low-cost
development tools
Up to 16-channel 10-bit ADC ±1 LSB with scan
mode, conversion time < 3 µs Fast and accurate A/D converter
STM8S MCU family for industrial applications
STMicroelectronics’ STM8S family of general-purpose 8-bit Flash microcontrollers offers ideal solutions for industrial
and appliance market requirements. An advanced core version combined with a 3-stage pipeline ranks the STM8S
microcontroller in the top position for performance. The true embedded EEPROM and the calibrated RC oscillator bring
a significant cost effectiveness to the majority of applications. An easy-to-use and intuitive development environment
contributes to improving time to market.
AWU
Up to 68 I/Os
Clock detector
Power supply
2.95 V to 5.5 V
(1.8 V internal regulator)
POR / BOR
Xtal oscillator
1-24 MHz
Internal RC oscillators
128 kHz and 16 MHz
Clock control
2x watchdogs
(independent and window)
System
CAN 2.0 B
2xU(S)ART
LIN
Smartcard / IrDA
Connectivity
SPI
I²C
Boot ROM
Up to 2-Kbyte EEPROM
4- to 128-Kbyte
Flash memory
Up to 6-Kbyte SRAM
10-bit ADC
16 channels
Analog
Nested vector
interrupt
controller (NVIC)
SWIM debug
module
STM8 CPU
Up to 24 MHz
2x16-bit timer
2/3 CAPCOM
Beeper
1/2/4 kHz
8-bit timer
16-bit timer, 4 CAPCOM +
3 comparator outputs
Control
Applications
Appliances, power toolsQQ
HVACQQ
Power managementQQ
LightingQQ
Factory automationQQ
Devices with rechargeable batteriesQQ
Motor controlQQ
e-vehiclesQQ
Toys and gamesQQ
SensorsQQ
Power suppliesQQ
User interfacesQQ
STM8 Simply smarter
Family description
Upgrade to a higher or downgrade to
a lower memory size or use a different
package across lines is possible
without changing the initial layout or
software.
STM8 24 MHz CPUQQ
8 to128 Kbytes of embedded QQ
Flash, up to 6 Kbytes of SRAM
Supply voltage: 2.95 V to 5.5 VQQ
Up to four low-power modes: QQ
down to 4 µA with complete
context retention
State-of-the-art digital and analog QQ
peripherals
Specific interfaces such as IrDA QQ
and smartcard for support of
consumer applications
-40 to +85 °C, or up to 125 °C QQ
temperature range
Free Class B self-diagnostic QQ
library for IEC 60335/IEC 60730
compliant applications
Many software libraries and QQ
examples for download
5
Simple device selection
The STM8S family is available in two lines: the Performance line and Access
line. With FCPU specified up to 24 MHz, the Performance line is ideal when
processing power is needed. The Access line is an affordable solution when
cost efficiency is the main concern. Both lines share the same architecture
and peripheral set making navigation possible across the portfolio.
STM8S product lines
STM8S product lines
Up to
6-Kbyte
SRAM
Up to
2-Kbyte
EEPROM
Up to
128-Kbyte
Flash
CAN
2.0B
2nd
UART
STM8S20x Performance line
Up to
2-Kbyte
SRAM
Up to
1-Kbyte
EEPROM
Up to
32-Kbyte
Flash
STM8 core
@ 24 MHz
STM8 core
@ 24 MHz
STM8S10x Access line
UART
LIN/smartcard/IrDA
I²C
400 kHz multimaster
SPI
10 MHz
Up to 3 x 16-bit timer
8-bit timer
2x watchdogs
(IWDG and WWDG)
Xtal
16 MHz and 128 kHz
internal RC oscillators
SWIM
debug module
10-bit ADC
Up to 16 channels
AWU
Beeper 1/2/4 kHz
Safety
ST offers a Class B self-
diagnostic library for IEC 60335/
IEC 60730 compliant products.
The free-of-charge library has
been certified by the VDE and
is ready to be included in the
application software to enhance
the robustness and control of the
application.
It features a self-test library for
startup and runtime:
CPU register testQQ
RAM functional test (March C QQ
and X algorithms)
Flash integrity test via CRCQQ
Watchdog self testQQ
External clock frequency QQ
measurement
Stack overflow check (only in QQ
runtime)
In addition, the specific hardware
robustness features (watchdogs,
clock security system, robust
I/Os) of the STM8 platform
support compliance with safety
regulations.
Capacitive sensing
A capacitive sensing library is available, supporting touch, slider and
wheel configurations and the STM8S touch sensing evaluation board.
This library can be downloaded from the ST website. It is the ideal solution
for implementations with few buttons, and satisfies a majority of low-cost
applications.
128 KB
64 KB
32 KB
8 KB
4 KB STM8S103F2
16 KB STM8S105S4STM8S105K4 STM8S105C4
Pin count
Memory size
STM8S105S6STM8S105K6 STM8S105C6
STM8S207S6 STM8S207C6 STM8S207R6STM8S207K6
STM8S207C8 STM8S207R8STM8S207S8 STM8S207M8
STM8S208M8
STM8S207RB STM8S207MBSTM8S207CB
STM8S208MBSTM8S208RBSTM8S208CB
Performance line
Access line
Application specific
STM8S103F3 STM8S103K3
STM8S903K3STM8S903F3
STM8S208S6 STM8S208C6 STM8S208R6
STM8S208C8 STM8S208R8STM8S208S8
STM8S207SB
STM8S208SB
TSSOP20/
UFQFN20/
SO20*
20 pins
LQFP48
48 pins
LQFP44
44 pins
LQFP64
64 pins
LQFP80
80 pins
LQFP32/
UFQFN32/
SDPI32
32 pins
*in development
STM8S portfolio
Design elegant and attractive interfaces
6
Motor control software and hardware solutions
For developers of STM8-based motor control applications, the STM8S motor control starter kit (STM8/128-MCKIT)
provides a complete development platform with all the hardware and software required to get applications started easily.
Brushless DC motors
Six-step drive with support for both Hall sensors and sensorless position feedback
Current or voltage modeQQ
Open or closed speed loop QQ
AC induction motors
Open speed loop with/without load compensationQQ
Closed speed loopQQ
V/f and slip control for optimized dynamic driveQQ
Maximum torque per ampere (MTPA) control for current-optimized drive efficiencyQQ
STM8S product selection guide
Part number
Program
memory
RAM
(bytes)
Data
EEPROM
(bytes)
A/D
inputs
Timer functions
Serial interface LVD levels
I/Os
(high
current)
Packages
Supply
voltage
(V)
Special
features*Type Size 16-bit (IC/OC/
PWM)
8-bit
(IC/OC/
PWM)
Others
Flash ( Kbytes)
STM8S20x Performance line
32
pins STM8S207K6
l 32 2 K 1 K 7x10-bit 3x16-bit (8/8/11)
1x8-bit 2xWDG, beep
1xSPI, 1xI²C, 1xUART
(IrDA, ISO 7816)
1
25(12) LQFP32 (7x7)
2.95 to
5.5
2
44
pins
STM8S207S6 l 32 2 K 1 K 9x10-bit
3x16-bit
(8/8/11)
1xSPI, 1xI²C, 2xUART
(IrDA, ISO 7816) 34(15) LQFP44 (10x10)
STM8S208S6 l 32 4 K 1.5 K 9x10-bit 1xSPI, 1xI²C, 2xUART (IrDA, ISO 7816), 1xCAN 34(15) LQFP44 (10x10)
STM8S207S8 l 64 4 K 1.5 K 9x10-bit 1xSPI, 1xI²C, 2xUART (IrDA, ISO 7816) 34(15) LQFP44 (10x10)
STM8S208S8 l 64 4 K 1.5 K 9x10-bit 1xSPI, 1xI²C, 2xUART (IrDA, ISO 7816), 1xCAN 34(15) LQFP44 (10x10)
STM8S207SB l 128 4 K 1.5 K 9x10-bit 1xSPI, 1xI²C, 2xUART (IrDA, ISO 7816) 34(15) LQFP44 (10x10)
STM8S208SB l 128 4 K 1.5 K 9x10-bit 1xSPI, 1xI²C, 2xUART (IrDA, ISO 7816), 1xCAN 34(15) LQFP44 (10x10)
48
pins
STM8S207C6 l 32 2 K 1 K 10x10-bit
3x16-bit
(9/9/12)
1xSPI, 1xI²C, 2xUART
(IrDA, ISO 7816) 38(16) LQFP48 (7x7) 2
STM8S208C6 l 32 6 K 2 K 10x10-bit 1xSPI, 1xI²C, 2xUART (IrDA, ISO 7816), 1xCAN 38(16) LQFP48 (7x7) 1
STM8S207C8 l 64 4 K 1.5 K 10x10-bit 1xSPI, 1xI²C, 2xUART (IrDA, ISO 7816) 38(16) LQFP48 (7x7) 2
STM8S208C8 l 64 6 K 2 K 10x10-bit 1xSPI, 1xI²C, 2xUART (IrDA, ISO 7816), 1xCAN 38(16) LQFP48 (7x7) 1
STM8S207CB l 128 6 K 2 K 10x10-bit 1xSPI, 1xI²C, 2xUART (IrDA, ISO 7816) 38(16) LQFP48 (7x7) 2
STM8S208CB l 128 6 K 2 K 10x10-bit 1xSPI, 1xI²C, 2xUART (IrDA, ISO 7816), 1xCAN 38(16) LQFP48 (7x7) 1
64
pins
STM8S207R6 l 32 2 K 1 K 16x10-bit
3x16-bit
(9/9/12)
1xSPI, 1xI²C, 2xUART
(IrDA, ISO 7816) 52(16) LQFP64 (10x10)
2
STM8S208R6 l 32 6 K 2 K 16x10-bit 1xSPI, 1xI²C, 2xUART (IrDA, ISO 7816), 1xCAN 52(16) LQFP64 (10x10)
STM8S207R8 l 64 4 K 1.5 K 16x10-bit 1xSPI, 1xI²C, 2xUART (IrDA, ISO 7816) 52(16)
LQFP64 (10x10),
LQFP64 (14x14)
STM8S208R8 l 64 6 K 2 K 16x10-bit 1xSPI, 1xI²C, 2xUART (IrDA, ISO 7816), 1xCAN 52(16) LQFP64 (10x10)
STM8S207RB l 128 6K 2 K 16x10-bit 1xSPI, 1xI²C, 2xUART (IrDA, ISO 7816) 52(16)
LQFP64 (10x10),
LQFP64 (14x14)
STM8S208RB l 128 6 K 2 K 16x10-bit 1xSPI, 1xI²C, 2xUART (IrDA, ISO 7816), 1xCAN 52(16) LQFP64 (10x10)
80
pins
STM8S207M8 l 64 6 K 2 K 16x10-bit
3x16-bit
(9/9/12)
1xSPI, 1xI²C, 2xUART
(IrDA, ISO 7816) 68(18) LQFP80 (14x14)
2
STM8S208M8 l 64 6 K 2 K 16x10-bit 1xSPI, 1xI²C, 2xUART (IrDA, ISO 7816), 1xCAN 68(18) LQFP80 (14x14)
STM8S207MB l 128 6 K 2 K 16x10-bit 1xSPI, 1xI²C, 2xUART (IrDA, ISO 7816) 68(18) LQFP80 (14x14)
STM8S208MB l 128 6 K 2 K 16x10-bit 1xSPI, 1xI²C, 2xUART (IrDA, ISO 7816), 1xCAN 68(18) LQFP80 (14x14)
STM8S10x Access line
20
pins
STM8S103F2 l 4 1 K 640 5x10-bit 2x16-bit
(7/7/7)
1x8-bit 2xWDG, beep
1xSPI, 1xI²C, 1xUART
(IrDA, ISO 7816)
1
16(12)
TSSOP20,QFN20
2.95 to
5.5 1
STM8S103F3 l 8 1 K 640 5x10-bit 16(12)
32
pins
STM8S103K3 l 8 1 K 640 5x10-bit 2x16-bit (7/7/10)
1xSPI, 1xI²C, 1xUART
(IrDA, ISO 7816) 28(21)
LQFP32 (7x7),
QFN32 (5x5)
STM8S105K4 l 16 2 K 1 K 7x10-bit 3x16-bit
(8/8/11)
1xSPI, 1xI²C, 1xUART
(IrDA, ISO 7816)
25(12) SDIP32, LQFP32
(7x7), QFN32 (5x5)STM8S105K6 l 32 2 K 1 K 7x10-bit 25(12)
44
pins
STM8S105S4 l 16 2 K 1 K 9x10-bit 3x16-bit
(8/8/11)
1xSPI, 1xI²C, 1xUART
(IrDA, ISO 7816)
34(15)
LQFP44 (10x10)
STM8S105S6 l 32 2 K 1 K 9x10-bit 34(15)
48
pins
STM8S105C4 l 16 2 K 1 K 10x10-bit 3x16-bit
(9/9/12)
1xSPI, 1xI²C, 1xUART
(IrDA, ISO 7816)
38(16)
LQFP48 (7x7)
STM8S105C6 l 32 2 K 1 K 10x10-bit 38(16)
STM8S90x Application specific line
20
pins STM8S903F3
l
8 1 K 640 7x10-bit 2x16-bit (7/7/10) 1x8-bit
2xWDG,
beep
1xSPI, 1xI²C, 1xUART
(IrDA, ISO 7816) 1
16(12) TSSOP20, S020
2.95 to
5.5 132
pins STM8S903K3
l 28(21) LQFP32 (7x7) SDIP32
*Special features:
1 16 MHz CPU speed, POR, BOR, SWIM, 16 MHz and 128 kHz internal RC oscillators, ICP, IAP, boot ROM, beeper, TLI
2 24 MHz CPU speed, POR, BOR, SWIM, 16 MHz and 128 kHz internal RC oscillators, ICP, IAP, boot ROM, beeper, TLI
77
This product line of 8-bit Flash microcontrollers responds to the specific needs of automotive applications. From
product specifications, on through design and manufacturing, the focus is on reliability, application robustness and low
system cost. The integrated true data EEPROM features top notch endurance and data retention throughout the full
temperature range. With its extended temperature range up to 145 °C ambient temperature, the STM8A is the ideal
and economic solution for the growing market of automotive 8-bit applications.
Applications
ControllersQQ
LIN nodesQQ
ActuatorsQQ
SensorsQQ
Safety microcontrollersQQ
Car radiosQQ
DC motor controlQQ
HVACQQ
Keyless entryQQ
ImmobilizersQQ
Tire pressure monitorsQQ
AWU
Up to 68 I/Os
Clock detector
Power supply
2.95 V to 5.5 V
(1.8 V internal regulator)
POR / BOR
Xtal oscillator
1-24 MHz
Internal RC oscillators
128 kHz and 16 MHz
Clock control
2x watchdogs
(independent and window)
System
2x16-bit timer
2/3 CAPCOM
Beeper
1/2/4 kHz
8-bit timer
16-bit timer, 4 CAPCOM +
3 comparator outputs
Control
CAN 2.0 B
2xU(S)ART
LIN
Smartcard / IrDA
Connectivity
SPI
I²C
Boot ROM
Up to 2-Kbyte EEPROM
8- to 128-Kbyte
Flash memory
Up to 6-Kbyte SRAM
10-bit ADC
16 channels
Analog
Nested vector
interrupt
controller (NVIC)
STM8 CPU
Up to 24 MHz
SWIM debug
module
STM8A automotive MCU family
Features and benefits
Features Benefits
Integrated true data EEPROM
Reduced system cost
Internal supervisor circuits: power-on reset, window
watchdog and standard watchdog timers, supply
brown-out reset
Integrated, factory-trimmed 16 MHz and 128 kHz RC
oscillators
Injection robust I/Os
Product line compatibility enabling application
scalability
Short development cyclesAdvanced development tools
Flash program memory for easy software
development and product qualifcation
Efficient STM8 core: 10 MIPS at 16 MHz
High application safety. Application power
and robustness
Independent watchdog timers and clock security
system
LIN 2.1 with auto-synchronization on all products
Modern core and peripherals
Design longevity
Up to 145 °C maximum operating temperature
STM8 Simply smarter
Family description
Upgrade to a higher or downgrade
to a lower memory size or use a
different package across lines is
possible without changing the initial
layout or software.
STM8 24 MHz CPUQQ
8 to 128 Kbytes of embedded QQ
Flash, up to 6 Kbytes of SRAM
and up to 2-Kbyte data EEPROM
Packages up to 80 pinsQQ
Supply