Figure 52: STM8S105xx access line ordering information scheme ......................................................... 89
DocID14771 Rev 13 7/99
Introduction
STM8S105xx
1 Introduction
This datasheet contains the description of the device features, pinout, electrical
characteristics, mechanical data and ordering information.
•For complete information on the STM8S microcontroller memory, registers and
peripherals, please refer to the STM8S microcont roller family reference manual
(RM0016).
•For information on programming, erasing and protection of the internal Flash memory
please refer to the STM8S Flash programming manu al (P M 0051).
•For information on the debug and SWIM (single wire interface module) refer to the
STM8 SWIM communication protocol and debug mo dul e user manual (UM0470).
•For information on the STM8 core, please refer to the S T M 8 CP U programming
manual (PM0044).
8/99 DocID14771 Rev 13
STM8S105xx
Description
2 Description
The STM8S105xx access line 8-bit microcontrollers offer from 16 to 32 Kbytes Flash
program memory, plus integrated true data EE PROM. They are referred to as mediumdensity devices in the STM8S microcontroller family reference manual (RM0016).
All devices of the STM8S105xx access line provide t he f ol l owing benefits: reduced system
cost, performance and robustness, short development cycles, and product longevity.
The system cost is reduced thanks to an integrated true data EEPROM for up to 300k
write/erase cycles and a high system integration level with internal clock oscillators,
watchdog, and brown-out reset.
Device performance is ensured by a 16 MHz CPU clock frequency and enhanced
characteristics which include robust I/O, indepe ndent watchdogs (with a separate clock
source), and a clock security system.
Short development cycles are guaranteed due to ap plication scalability across common
family product architecture with compatible pinout , memory map and modular peripherals.
Full documentation is offered with a wide choi ce of development tools.
Product longevity is ensured in the STM8S family t hanks to their advanced core which is
made in a state-of-the art technology for applications with 2.95 V to 5.5 V operating supply.
Advanced control t i me r (TI M1 ) , G en eral-purpose timers (TIM2 and TIM3), Basic timer (TIM4) SPI, I2C,
48
38
35
9
3
10
16
16K
1024
2K
UART, Window WDG, Independent WDG, ADC
44
34
31
8
3
9
15
32K
1024
2K
44
34
31
8
3
9
15
16K
1024
2K
32
25
23
8
3
7
12
32K
1024
2K
32
25
23
8
3
7
12
16K
1024
2K
DocID14771 Rev 13 9/99
Block diagram
STM8S105xx
3 Block diagram
Figure 1: STM8S105xx access line block diagram
10/99 DocID14771 Rev 13
STM8S105xx
Product overview
4 Product overview
The following section intends to give an overview of the basic features of the device
functional modules and peripherals.
For more detailed information please refer to t he corresponding family reference manual
(RM0016).
Central processing unit STM8
The 8-bit STM8 core is designed for code efficien cy and performance.
It contains 6 internal registers which are directly addressable in each execution context, 20
addressing modes including indexed indirect and relative addressing and 80 instructions.
Architecture and registers
• Harvard architecture
• 3-stage pipeline
• 32-bit wide program memory bus - single cycle fetching for most instructions
• X and Y 16-bit index registers - enabling indexed addres sing m odes with or without
offset and read-modify-write type data manipulations
• 8-bit accumulator
• 24-bit program counter - 16-Mbyte linear memory space
• 16-bit stack pointer - access to a 64 K-level stack
• 8-bit condition code register - 7 condition flags for the result of the last instruction
Addressing
• 20 addressing modes
• Indexed indirect addressing mode for look-up table s 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 siz e
• 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
4.1 Single wire interface module (SWIM) a nd debug module
(DM)
The single wire interface module and debug module permi ts non-intrusive, real-time incircuit debugging and fast memory programming.
SWIM
Single wire interface module for direct access to the debug module and memory
programming. The interface can be activated in all device operation modes. The maximum
data transmission speed is 145 bytes/ms.
DocID14771 Rev 13 11/99
Product overview
STM8S105xx
Debug module
The non-intrusive debugging module features a pe rf ormance close to a full-featured
emulator. Beside memory and peripherals, also CPU operat i on can be monitored in realtime by means of shadow registers.
• R/W to RAM and peripheral registers in real-time
• R/W access to all resources by stalling the CPU
• Breakpoints on all program-memory instructions (software breakpoi nts)
• Two advanced breakpoints, 23 predefined configurati ons
4.2 Interrupt controller
• Nested interrupts with three software priority l evels
• 32 interrupt vectors with hardware priority
• Up to 37 external interrupts on 6 vectors including TLI
• Trap and reset interrupts
4.3 Flash program and data EEPROM memory
• Up to 32 Kbytes of Flash program single voltage Flash m em ory
• Up to 1 Kbytes true data EEPROM
• Read while write: Writing in data memory possible whil e executing code in program
memory
•User option byte area Write protection (WP)
Write protection of Flash program memory and data EEPROM is provided to avoid
unintentional overwriting of memory that could re sult from a user software malfunction.
There are two levels of write protection. The first level is known as MASS (memory access
security system). MASS is always enabled and prot ects the main Flash program memory,
data EEPROM and option bytes.
To perform in-application programming (IA P), this write protection can be removed by
writing a MASS key sequence in a control register. T his all ows the application to write to
data EEPROM, modify the contents of main progr am memory or the device option bytes.
A second level of write protection, can be enabl ed to further protect a specific area of
memory known as UBC (user boot code). Refer to t he figure below.
The size of the UBC is programmable through the UBC option byte, in increments of 1
page (512 bytes) by programming the UBC option byte in I CP mode.
This divides the program memory into two areas:
• Main program memory: Up to 32 Kbytes minus UBC
• User-specific boot code (UBC): Configurable up to 32 Kbytes
The UBC area remains write-protected during in-appl i cat i on programming. This means that
the MASS keys do not unlock the UBC area. It protects the m emory used to store the boot
program, specific code libraries, reset and int errupt vectors, the reset routine and usually
the IAP and communication routines.
12/99 DocID14771 Rev 13
STM8S105xx
Product overview
Figure 2: Flash memory organization
Read-out protection (ROP)
The read-out protection blocks reading and writing t he Flash program memory and data
EEPROM memory in ICP mode (and debug mode). Onc e the read-out protection is
activated, any attempt to toggle its status triggers a global erase of the program and data
memory. Even if no protection can be considered as totally unbreakable, the feature
provides a very high level of protection for a general purpose microcontroller.
4.4 Clock controller
The clock controller distributes the system clock (f
to the core and the peripherals. It also manages clo ck gating for low power modes and
ensures clock robustness.
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. The clock sig nal is not switched until the new clock
source is ready. The design guarantees glitch-f ree switching.
•Clock management: To reduce power consumption, t he cloc k controller can stop the
clock to the core, individual peripherals or memory .
•Master clock sources: Four different clock sour ces can be used to drive the master
clock:
− 1-16 MHz high-speed external crystal (HSE)
− Up to 16 MHz high-speed user-external clock (HSE user-ext)
− 16 MHz high-speed internal RC oscillator (HSI)
− 128 kHz low-speed internal RC (LSI)
) coming from different oscillators
MASTER
DocID14771 Rev 13 13/99
Product overview
STM8S105xx
•Startup clock: After reset, the microcontroller restarts by default with an internal 2
MHz clock (HSI/8). The prescaler ratio and clock so urce can be changed by the
application program as soon as the code execution st art s.
•Clock security system (CSS): This feature can be e nabled by software. If an HSE
clock failure occurs, the internal RC (16 MHz/8) is a ut om atically selected by the CSS
and an interrupt can optionally be generated.
•Configurable main clock output (CCO): This outputs an external clock for use by
the application.
Table 3: Peripheral clock gating bit assignments in CLK_PCKENR1/2 registers
For efficient power management, the application can be put in one of four different lowpower modes. You can configure each mode to obtain the best compromise between
lowest power consumption, fastest start-up time and available wakeup sources.
•Wait mode: In this mode, the CPU is stopped, but peripheral s are kept running. The
wakeup is performed by an internal or external interrupt or reset.
•Active halt mode with regulator on: In this mode, the CPU and peripheral clocks are
stopped. An internal wakeup is generated at program mabl e i ntervals by the auto wake
up unit (AWU). The main voltage regulator is kept powered on, so current
consumption is higher than in active halt mode with regulator off, but the wakeup time
is faster. Wakeup is triggered by the internal AW U interrupt, external interrupt or reset.
•Active halt mode with regulator off: This mode is the same as active halt with
regulator on, except that the main voltage regulator is powered off, so the wake up
time is slower.
•Halt mode :In this mode the microcontroller uses the least power. The CPU and
peripheral clocks are stopped, the main voltage regulator is powered off. Wakeup is
triggered by external event or reset.
Bit Peripheral
clock
SPI PCKEN25 Reserved PCKEN21 Reserved
I2C PCKEN24 Reserved PCKEN20 Reserved
Bit Peripheral
clock
4.6 Watchdog timers
14/99 DocID14771 Rev 13
The watchdog system is based on two independent timers providing maximum security to
the applications.
Activation of the watchdog timers is controlled by option bytes or by software. Once
activated, the watchdogs cannot be disabled by the user program without performing a
reset.
Window watchdog timer
The window watchdog is used to detect the occurrence of a software fault, usually
generated by external interferences or by unexpected logical conditions, which cause the
application program to abandon its normal sequence.
The window function can be used to trim the watchdo g behavior to match the application
perfectly.
STM8S105xx
Product overview
The application software must refresh the counter b efore time-out and during a limited time
window.
A reset is generated in two situations:
1. Timeout: At 16 MHz CPU clock the time-out period can be adjusted between 75 µs up
to 64 ms.
2. Refresh out of window: The downcounter is refreshed bef ore i t s value is lower than
the one stored in the window register.
Independent watchdog timer
The independent watchdog peripheral can be us ed to resolve processor malfunctions due
to hardware or software failures.
It is clocked by the 128 kHz LSI internal RC clock source, an d thus stays active even in
case of a CPU clock failure
The IWDG time base spans from 60 µs to 1 s.
4.7 Auto wakeup counter
• Used for auto wakeup from active halt mode
• Clock source: Internal 128 kHz internal low frequency RC oscillator or external clock
• LSI clock can be internally connected to TIM3 input capture channel 1 for calibration
4.8 Beeper
The beeper function outputs a signal on the BEE P pin for so und generation. The signal is
in the range of 1, 2 or 4 kHz.
The beeper output port is only available through the alternate function remap option bit
AFR7.
4.9 TIM1 - 16-bit advanced control timer
This is a high-end timer designed for a wide range of cont rol applications. With its
complementary outputs, dead-time control and c enter-aligned PWM capability, the field of
applications is extended to motor control, lighting and half-bridge driver
• 16-bit up, down and up/down autoreload counter with 16-bit prescaler
• Four independent capture/compare channels (CAPCOM) configurable as input
capture, output compare, PWM generation (edge and center aligned mode) and single
pulse mode output
• Synchronization module to control the timer with external signals
• Break input to force the timer outputs into a defined state
• Three complementary outputs with adjustable dead ti m e
• Encoder mode
• Interrupt sources: 3 x input capture/output compare, 1 x overflow/update, 1 x break
4.10 TIM2, TIM3 - 16-bit general purpose timers
• 16-bit autoreload (AR) up-counter
• 15-bit prescaler adjustable to fixed power of 2 ratios 1… 32768
• Timers with 3 or 2 individually configurable capture/compare channels
• PWM mode
• Interrupt sources: 2 or 3 x input capture/output compare, 1 x overflow/update
DocID14771 Rev 13 15/99
Product overview
STM8S105xx
Additional AIN12 analog input is not selectable in A DC scan mode or with analog
4.11 TIM4 - 8-bit basic timer
• 8-bit autoreload, adjustable prescaler ratio to any power of 2 from 1 to 128
• Clock source: CPU clock
• Interrupt source: 1 x overflow/update
Table 4: TIM timer features
Timer Counter
size
(bits)
TIM1 16 Any
TIM2 16 Any
TIM3 16 Any
TIM4 8 Any
Prescaler Counting
mode
Up/Down 4 3 Yes No
integer
from 1 to
65536
Up 3 0 No
power of 2
from 1 to
32768
Up 2 0 No
power of 2
from 1 to
32768
Up 0 0 No
power of 2
from 1 to
128
CAPCOM
channels
4.12 Analog-to-digital converter (ADC1)
The STM8S105xx products contain a 10-bit successive approximation A/D converter
(ADC1) with up to 10 multiplexed input channels and the following main features:
Complem.
outputs
Ext.
trigger
Timer
synchronization/
chaining
• Input voltage range: 0 to V
• Input voltage range: 0 to V
DD
DDA
• Conversion time: 14 clock cycles
• Single and continuous and buffered continuous conver sion m odes
• Buffer size (n x 10 bits) where n = number of input channels
• Scan mode for single and continuous conversion of a sequence of channels
• Analog watchdog capability with programmable uppe r and l ower thresholds
• Analog watchdog interrupt
• External trigger input
• Trigger from TIM1 TRGO
• End of conversion (EOC) interrupt
watchdog. Values converted from AIN12 are stored only into the
ADC_DRH/ADC_DRL registers.
16/99 DocID14771 Rev 13
STM8S105xx
Product overview
4.13 Communication interfaces
The following communication interfaces are implem ented:
As shown in the rightmost column of the pin descripti on table, some alternate functions can
be remapped at different I/O ports by programming one of eight AFR (alternate function
remap) option bits. When the remapping option is act i ve, the default alternate function is no
longer available.
To use an alternate function, the corresponding peri pheral must be enabled in the
peripheral registers.
Alternate function remapping does not aff ect GPIO capabilities of the I/O ports (see the
GPIO section of the family reference manual, RM0 016).
24/99 DocID14771 Rev 13
STM8S105xx
Memory and register map
6 Memory and register map
6.1 Memory map
Figure 7: Memory map
The following table lists the boundary addresses for each memory size. The top of the
stack is at the RAM end address in each case.
DocID14771 Rev 13 25/99
Memory and register map
STM8S105xx
Table 7: Flash, Data EEPROM and RAM boundary addresses
Memory area Size (bytes) Start address End address
Flash program memory 32K 0x00 8000 0x00 FFFF
RAM 2K 0x00 0000 0x00 07FF
Data EEPROM 1024 0x00 4000 0x00 43FF
6.2 Register map
6.2.1 I/O port hardware register map
Table 8: I/O port hardware register map
Address Block Register label Register name Reset status
0x00 5000 Port A PA_ODR Port A data output latch register 0x00
0x00 5001 PA_IDR P ort A input pin value register 0xXX
0x00 5002 PA_DDR Port A data direction register 0x00
0x00 5003 PA_CR1 Port A control register 1 0x00
0x00 5004 PA_CR2 Port A control register 2 0x00
0x00 5005 Port B PB_ODR Port B data output latch register 0x00
0x00 5006 PB_IDR P ort B input pin value register 0xXX
0x00 5007 PB_DDR Port B data direction register 0x00
0x00 5008 PB_CR1 Port B control register 1 0x00
0x00 5009 PB_CR2 Port B control register 2 0x00
0x00 500A Port C PC_ODR Port C data output latch register 0x00
0x00 500B PC_IDR Port C input pin value register 0xXX
0x00 500C PC_DDR Port C data direction register 0x00
0x00 500D PC_CR1 Port C control register 1 0x00
0x00 500E PC_CR2 Port C control register 2 0x00
0x00 500F Port D PD_ODR Port D data output latch register 0x00
0x00 5010 PD_IDR Port D input pin value register 0xXX
0x00 5011 PD_DDR Port D data direction re gister 0x00
0x00 5012 PD_CR1 Port D control register 1 0x02
0x00 5013 PD_CR2 Port D control register 2 0x00
0x00 5014 Port E PE_ODR Port E data output latch register 0x00
0x00 5015 PE_IDR P ort E input pin value register 0xXX
0x00 5016 PE_DDR Port E data direction register 0x00
0x00 5017 PE_CR1 Port E control register 1 0x00
0x00 5018 PE_CR2 Port E control register 2 0x00
0x00 5019 Port F PF_ODR Port F data output latch register 0x00
16K 0x00 8000 0x00 BFFF
26/99 DocID14771 Rev 13
STM8S105xx
Memory and register map
Address Block Register label Register name Reset status
0x00 501A PF_IDR Port F input pin value register 0xXX
0x00 501B PF_DDR Port F data direction re gister 0x00
0x00 501C PF_CR1 Port F control register 1 0x00
0x00 501D PF_CR2 Port F control register 2 0x00
0x00 501E Port G PG_ODR Port G data output latch register 0x00
0x00 501F PG_IDR Port G input pin value register 0xXX
0x00 5020 PG_DDR Port G data direction register 0x00
0x00 5021 PG_CR1 Port G control register 1 0x00
0x00 5022 PG_CR2 Port G control register 2 0x00
0x00 5023 Port H PH_ODR Port H data output latch regis ter 0x00
0x00 5024 PH_IDR Port H input pin value register 0xXX
0x00 5025 PH_DDR Port H data direction re gister 0x00
0x00 5026 PH_CR1 Port H control register 1 0x00
0x00 5027 PH_CR2 Port H control register 2 0x00
0x00 5028 Port I PI_ODR Port I data output latch register 0x00
0x00 5029 PI_IDR Port I input pin value register 0xXX
0x00 502A PI_DDR Port I data direction register 0x00
0x00 502B PI_CR1 Port I control register 1 0x00
0x00 502C PI_CR2 Port I control register 2 0x00
6.2.2 General hardware register map
Table 9: General hardware register m ap
Address Block Register label Register name Reset
0x00 5050 to
0x00 5059
0x00 505A Flash FLASH_CR1 Flash control r egister 1 0x00
0x00 505B FLASH_CR2 Flash control register 2 0x00
0x00 505C FLASH_NCR2 Flash complementary control
0x00 7F00 CPU
0x00 7F01 PCE Program counter extended 0x00
(1)
A Accumulator 0x00
0x00 7F02 PCH Program counter high 0x00
0x00 7F03 PCL Program counter low 0x00
0x00 7F04 XH X index register high 0x00
0x00 7F05 XL X index register low 0x00
0x00 7F06 YH Y index register high 0x00
0x00 7F07 YL Y index register low 0x00
0x00 7F08 SPH Stack pointer high 0x07
0x00 7F09 SPL Stack pointer low 0xFF
analog watchdog interrupt
23 TIM4 TIM update/ overflow - - 0x00 8064
24 Flash EOP/ WR_PG_DIS - - 0x00 8068
Reserved
0x00 806C to
0x00807C
Notes:
(1)
Except PA1
36/99 DocID14771 Rev 13
STM8S105xx
Option bytes
8 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 block of the memory. Except for the
ROP (read-out protection) byte, each option byt e has to be stored twice, in a regular form
(OPTx) and a complemented one (NOPTx) for redundancy.
Option bytes can be modified in ICP mode (via SWIM) by accessing the EEPROM address
shown in the table below.
Option bytes can also be modified ‘on the fly’ by the application in IAP mode, except the
ROP option that can only be modified in ICP mode (v ia S WIM).
Refer to the STM8S Flash programming manual (PM0051) and STM8 SWIM
communication protocol and debug module user m anual (UM0470) for information on
SWIM programming procedures.
Addr.
Option
name
0x4800 Read-out
protection
(ROP)
0x4801 User boot
0x4802
0x4803 Alternate
0x4804
AAh: Enable readout protection (write access via SWIM protocol)
Note: Refer to the family reference ma nual (RM0016) section on Flash/EEP R OM
memory readout protection for detai ls.
UBC[7:0] User boot code area
0x00: no UBC, no write-protection
0x01: Page 0 to 1 defined as UBC, memory write-protected
0x02: Page 0 to 3 defined as UBC, memory write-protected
0x03: Page 0 to 4 defined as UBC, memory write-protected
...
0x3E: Pages 0 to 63 defined as UBC, memory write-protected
Other values: Reserved
Note: Refer to the family reference ma nual (RM0016) section on Flash write pr otection
for more details.
AFR[7:0]
Refer to following table for the alt ernate function remapping decriptions of bits [7:2].
HSITRIM:High speed internal clock tr i m ming register size
0: 3-bit trimming supported in CLK_HS ITRIMR register
1: 4-bit trimming supported in CLK_HS ITRIMR register
LSI_EN:Low speed internal clock enable
0: LSI clock is not available as CPU clock source
1: LSI clock is available as CPU clock source
IWDG_HW: Independent watchdog
0: IWDG Independent watchdog activ ated by software
1: IWDG Independent watchdog activ ated by hardware
WWDG_HW: Window watchdog activation
0: WWDG window watchdog activated by software
1: WWDG window watchdog activated by hardware
WWDG_HALT: Window watchdog reset on halt
0: No reset generated on halt if WWDG active
1: Reset generated on halt if WWDG ac tive
EXTCLK: External clock selection
0: External crystal connected t o OSCIN/OSCOUT
1: External clock signal on OSCIN
CKAWUSEL:Auto wake-up unit/clock
0: LSI clock source selected for AWU
1: HSE clock with prescaler selected as clock source for for AWU
38/99 DocID14771 Rev 13
STM8S105xx
Option bytes
Option
Description
byte no.
PRSC[1:0] AWU clock prescaler
0x: 16 MHz to 128 kHz prescaler
10: 8 MHz to 128 kHz prescaler
11: 4 MHz to 128 kHz prescaler
OPT5
HSECNT[7:0]:HSE crystal oscillator stabilization time
0x00: 2048 HSE cycles
0xB4: 128 HSE cycles
0xD2: 8 HSE cycles
0xE1: 0.5 HSE cycles
OPT6 Reserved
OPT7 Reserved
OPTBL
BL[7:0] Bootloader option byte
For STM8S products, this option is checked by the boot ROM code after reset.
Depending on the content of addresses 0x487E, 0x487F, and 0x8000 (reset vector), the
CPU jumps to the bootloader or to the reset vector. Refer to the UM0560 (STM8L/S
bootloader manual) for more details.
For STM8L products, the bootloader option bytes are on addresses 0xXXXX a nd
0xXXXX+1 (2 bytes). These option bytes control whether the bootloader is active or not.
For more details, refer to the UM0560 (S TM8L/S bootloader manual) for more details.
Table 14: Description of alternate function remapping bits [7:0] of OPT2
Option
byte no.
OPT2
AFR7 Alternate function remapping option 7
0: AFR7 remapping option inactiv e: Default alternate function
1: Port A3 alternate function = TIM3_C H1; port D2 alternate function TIM2_CH3.
Option
byte no.
Description
AFR0 Alternate function remapping option 0
0: AFR0 remapping option inactiv e: Default alternate function
1: Port D3 alternate function = ADC_ETR.
Notes:
(1)
Do not use more than one remapping option in the same port.
(2)
Refer to pinout description.
(2)
.
40/99 DocID14771 Rev 13
STM8S105xx
Unique ID
9 Unique ID
The devices feature a 96-bit unique device identifier which provides a reference number
that is unique for any device and in any context. T he 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 cr yptographic primitives and
protocols before programming the internal memo ry .
•To activate secure boot processes
Address Content description Unique ID bits
0x48CD X co-ordinate on the wafer U_ID[7:0]
0x48CE U_ID[15:8]
0x48CF Y co-ordinate on the wafer U_ID[23:16]
0x48D0 U_ID[31:24]
0x48D1 Wafer number U_ID[39:32]
0x48D2 Lot number U_ID[47:40]
0x48D3 U_ID[55:48]
0x48D4 U_ID[63:56]
0x48D5 U_ID[71:64]
0x48D6 U_ID[79:72]
0x48D7 U_ID[87:80]
0x48D8 U_ID[95:88]
Table 15: Unique ID registers (96 bits)
7 6 5 4 3 2 1 0
DocID14771 Rev 13 41/99
Electrical characteristics
STM8S105xx
10 Electrical characteristics
10.1 Parameter conditions
Unless otherwise specified, all voltages are referr ed to VSS.
10.1.1 Minimum and maximum values
Unless otherwise specified the minimum and maximum values are guaranteed in the worst
conditions of ambient temperature, supply voltage and frequencies by tests in production
on 100 % of the devices with an ambient temperature at T
by the selected temperature range).
Data based on characterization results, desi gn simulation and/or technology characteristics
are indicated in the table footnotes and are not tested i n production. Based on
characterization, the minimum and maximum values refer to sample tests and represent
the mean value plus or minus three times the standard deviation (mean ± 3 Σ).
10.1.2 Typical values
= 25 °C and TA = T
A
Amax
(given
Unless otherwise specified, typical data are based on TA = 25 °C, V
only as design guidelines and are not tested.
Typical ADC accuracy values are determined by characterization of a batch of samples
from a standard diffusion lot over the full temper ature range, where 95% of the devices
have an error less than or equal to the value indicated (mean ± 2 Σ).
10.1.3 Typical curves
Unless otherwise specified, all typical curves are given only as design guidelines and are
not tested.
10.1.4 Typical current consumption
For typical current consumption measurements, VDD, V
together in the configuration shown in the following f i gure.
Figure 8: Supply current measurement conditions
DDIO
and V
= 5 V. They are given
DD
are connected
DDA
42/99 DocID14771 Rev 13
STM8S105xx
Electrical characteristics
10.1.5 Loading capacitor
The loading conditions used for pin parameter measurement are shown in the following
figure.
10.1.6 Pin input voltage
The input voltage measurement on a pin of the device is described in the following figure.
Figure 9: Pin loading conditions
Figure 10: Pin input voltage
10.2 Absolute maximum ratings
Stresses above those listed as ‘absolute maximum r atings’ may cause permanent damage
to the device. This is a stress rating only and functio nal operation of the device under these
conditions is not implied. Exposure to maximum rat i ng conditions for extended periods may
affect device reliability.
Table 16: Voltage characteristics
Symbol Ratings Min Max Unit
V
- VSS Supply voltage (including V
DDx
V
DDIO
(1)
)
VIN Input voltage on true ope n drain
pins (PE1, PE2)
Input voltage on any other pin
|V
- Variations between different power
DDx
DocID14771 Rev 13 43/99
DDA and
(2)
(2)
V
-0.3 6.5 V
- 0.3 6.5
V
SS
- 0.3 V
SS
+ 0.3
DD
50 mV
Electrical characteristics
STM8S105xx
VDD|
pins
When several inputs are submitted to a current injection, the maximum ΣI
INJ(PIN)
is the absolute sum of the
Symbol Ratings Min Max Unit
|V
SSx
V
SS
V
ESD
Variations between all the different
-
|
ground pins
50
Electrostatic discharge voltage see Section 13.3.12.4: "Absolute maximum ratings
(electrical sensitivity)"
Notes:
(1)
All power (VDD, V
power supply
(2)
I
INJ(PIN)
must never be exceeded. This is implicitly insured if VIN maximum is respected. If VIN maximum cannot
be respected, the injection current must be limited externally to the I
while a negative injection is induced by VIN<VSS. For true open-drain pads, there is no positive injection
V
IN>VDD
current, and the corresponding V
DDIO
, V
) and ground (VSS, V
DDA
maximum must always be respected
IN
SSIO
, V
) pins must always be connected to the external
SSA
value. A positive injection is induced by
INJ(PIN)
Table 17: Current characteristics
Symbol Ratings Max.
I
Total current into V
VDD
I
Total curr ent out of V
VSS
power lines (source)
DD
ground lines (sink)
SS
(2)
60 mA
(2)
60
(1)
IIO Output current sunk by any I/O and control pin 20
Output current source by any I/Os and control pin 20
ΣI
Total output current sourced (sum of all I/O and control pi ns) for devices
I
INJ(PIN)
IO
with two V
DDIO
Total output current sourced (sum of al l I/O and control pins) for devices
with one V
DDIO
Total output current sunk (sum of all I/O and control pins) for devices
with two V
SSIO
Total output current sunk (sum of all I/O and control pins) for devices
with one V
(4)(5)
Injected current on NRST pin ±4
SSIO
pins
pin
pins
pin
(3)
(3)
(3)
(3)
200
100
160
80
Injected current on OSCIN pin ±4
(6)
±4
(6)
±20
ΣI
INJ(PIN)
Injected current on any other pin
(4)
Total injected current (sum of all I/O and control pins)
Notes:
(1)
Data based on characterization results, not tested in production.
(2)
All power (VDD, V
supply.
(3)
I/O pins used simultaneously for high current source/sink must be uniformly spaced around the package
between the V
(4)
I
INJ(PIN)
DDIO/VSSIO
must never be exceeded. This is implicitly insured if VIN maximum is respected. If VIN maximum cannot
be respected, the injection current must be limited externally to the I
V
while a negative injection is induced by VIN<VSS. For true open-drain pads, there is no positive injection
IN>VDD
current, and the corresponding V
(5)
Negative injection disturbs the analog performance of the device. See note in Section 7.11: "TIM2, TIM3 -
DDIO
, V
) and ground (VSS, V
DDA
pins.
maximum must always be respected
IN
SSIO
, V
) pins must always be connected to the external
SSA
value. A positive injection is induced by
INJ(PIN)
16-bit general purpose timers".
(6)
Unit
44/99 DocID14771 Rev 13
STM8S105xx
Electrical characteristics
positive and negative injected currents (instantaneous values). These results are based on characterization with
ΣI
maximum current injection on four I/O port pins of the device.
INJ(PIN)
Table 18: Thermal characteristics
Symbol Ratings Value Unit
T
Storage temperature range -65 to 150 °C
STG
TJ Maximum junction t emperature 150
10.3 Operating conditions
The device must be used in operating conditions that respect the parameters in the table
below. In addition, full account must be taken of all physical capacitor characteristics and
tolerances.
Table 19: General operating conditions
Symbol Parameter Conditions Min Max Unit
f
Internal CPU clock
CPU
VDD/
V
DD_IO
VCAP
(1)
(3)
P
Power dissipation at TA
D
TA Ambient temperature for
TJ Junction temperature
Notes:
(1)
Care should be taken when selecting the capacitor, due to its tolerance, as well as the parameter dependency
on temperature, DC bias and frequency in addition to other factors. The parameter maximum value must be
respected for the full application range.
(2)
This frequency of 1 MHz as a condition for VCAP parameters is given by design of internal regulator.
(3)
To calculate P
the value for T
(4)
Refer to Section 7.7: "Watchdog timers"
frequency
Standard operating
voltage
: capacitance of
C
EXT
external capacitor
ESR of external
capacitor
ESL of external
capacitor
= 85 °C for suffix 6or
TA= 125° C for suffix 3
6 suffix version
Ambient temperature for
3 suffix version
range
), use the formula P
Dmax(TA
given in the current table and the value for Θ
Jmax
at 1 MHz
(2)
44 and 48-pin devices, with output on
eight standard ports, two high sink
ports and two open drain ports
simultaneously
(4)
32-pin package, with output on eight
standard ports and two high sink ports
simultaneously
(4)
Maximum power dissipation -40 85 °C
Maximum power dissipation -40 125
6 suffix version -40 105
3 suffix version -40 130
= (T
- T
)/Θ
Dmax
Jmax
(see Section 7.7: "Watchdog timers" ) with
A
JA
given in Section 7.7: "Watchdog timer s ".
JA
0 16 MHz
2.95 5.5 V
470 3300 nF
- 0.3
Ohm
- 15 nH
- 443 mW
- 360
DocID14771 Rev 13 45/99
Electrical characteristics
STM8S105xx
Figure 11: fCPUmax versus VDD
Table 20: Operating condition s at power-up/power-down
Symbol Parameter Conditions Min Typ Max Unit
t
VDD rise time rate
VDD
VDD fall time rate
t
Reset releasedelay VDD rising
TEMP
V
Power-on reset thres hold
IT+
V
Brown-out reset threshold
IT-
V
Brown-out reset hysteresis
HYS(BOR)
(1)
2.0
2.0
(1)
∞ µs/V
∞
(1)
1.7
ms
2.65 2.8 2.95 V
2.58 2.7 2.88
70
mV
Notes:
(1)
Guaranteed by design, not tested in production.
10.3.1 VCAP external capacitor
Stabilization for the main regulator is achieved c onnecting an external capacitor C
pin. C
V
CAP
the series inductance to less than 15 nH.
46/99 DocID14771 Rev 13
is specified in the Operating conditions section. Care should be taken to limit
EXT
EXT
to the
STM8S105xx
Electrical characteristics
Figure 12: External capacitor CEXT
1. ESR is the equivalent series resistance and ESL is the equivalent inductance.
10.3.2 Supply current characteristics
The current consumption is measured as described i n Section 7.3: "Interrupt controller".
10.3.2.1 Total current consumption in run mode
Table 21: Total current consumption with code execution in run mode at VDD = 5 V
Symbol
I
DD(RUN)
I
DD(RUN)
Parameter Conditions Typ Max
Supply current in run mode,
code executed from RAM
Supply current in run mode,
code executed from Flash
f
CPU
= 16 MHz
f
= f
CPU
125 kHz
f
= f
CPU
15.625 kHz
f
CPU
= 128 kHz
f
CPU
= 16 MHz
f
CPU
= f
MASTER
MASTER
MASTER
= f
MASTER
= f
MASTER
= f
MASTER
HSE crystal
osc.
(16 MHz)
HSE user
ext. clock
(16 MHz)
HSI RC osc.
(16 MHz)
/128 =
HSE user
ext. clock
(16 MHz)
HSI RC osc.
(16 MHz)
/128 =
HSI RC osc.
(16 MH3z/8)
LSI RC osc.
(128 kHz)
HSE crystal
osc.
(16 MHz)
HSE user
ext. clock
(16 MHz)
HSI RC osc.
(16 MHz)
HSI RC osc. 1.5
(1)
3.2
2.6 3.2
2.5 3.2
1.6 2.2
1.3 2.0
0.75
0.55
7.7
7.0 8.0
7.0 8.0
Unit
mA
DocID14771 Rev 13 47/99
Electrical characteristics
STM8S105xx
= 2 MHz
(16 MHz/8)
Symbol
Parameter Conditions Typ Max
(2)
f
= f
CPU
125 kHz
f
= f
CPU
15.625 kHz
f
CPU
= 128 kHz
MASTER
MASTER
= f
MASTER
/128 =
/128 =
HSI RC osc.
(16 MHz)
HSI RC osc.
(16 MHz/8)
LSI RC osc.
(128 kHz)
1.35 2.0
0.75
0.6
Notes:
(1)
Data based on characterization results, not tested in production.
(2)
Default clock configuration measured with all peripherals off.
Table 22: Total current consumption with code execution in run mode at VDD = 3.3 V
Unit
(1)
Symbol
I
DD(RUN)
Parameter Conditions Typ Max
Supp ly current in run mode,
code executed from RAM
Supply current in run mode,
code executed from Flash
f
= f
CPU
f
= f
CPU
= 125 kHz
f
= f
CPU
15.625 kHz
f
= f
CPU
f
= f
CPU
f
= f
CPU
MASTER
MHz
MASTER
MASTER
MASTER
kHz
MASTER
MHz
MASTER
MHz
= 16
/128
/128 =
= 128
= 16
= 2
HSE crystal
osc.
(16 MHz)
HSE user ext.
clock
(16 MHz)
HSI RC osc.
(16 MHz)
HSE user ext.
clock
(16 MHz)
HSI RC osc.
(16 MHz)
HSI RC osc.
(16 MHz/8)
LSI RC osc.
(128 kHz)
HSE crystal
osc.
(16 MHz)
HSE user ext.
clock
(16 MHz)
HSI RC osc.
(16 MHz)
HSI RC osc.
(16 MHz/8)
(2)
2.8
2.6 3.2
2.5 3.2
1.6 2.2
1.3 2.0
0.75
0.55
7.3
7.0 8.0
7.0 8.0
1.5
Unit
(1)
mA
48/99 DocID14771 Rev 13
STM8S105xx
Electrical characteristics
Symbol
Parameter Conditions Typ Max
f
= f
CPU
MASTER
= 125 kHz
f
= f
CPU
MASTER
15.625 kHz
f
= f
CPU
MASTER
kHz
Notes:
(1)
Data based on characterization results, not tested in production.
(2)
Default clock configuration measured with all peripherals off.
10.3.2.2 Total current consumption in wait mode
Table 23: Total current consumption in wait mode at VDD = 5 V
/128
/128 =
= 128
HSI RC osc.
(16 MHz)
HSI RC osc.
(16 MHz/8)
LSI RC osc.
(128 kHz)
(1)
1.35 2.0
0.75
0.6
Unit
Symbol
I
Supply current in wait
DD(WFI)
Parameter Conditions Typ Max
f
CPU
= f
= 16 MHz HSE crystal
MASTER
mode
f
CPU
= f
MASTER
/128 = 125
kHz
f
CPU
= f
MASTER
/128 =
15.625 kHz
f
= f
CPU
= 128 kHz LSI RC osc.
MASTER
Notes:
(1)
Data based on characterization results, not tested in production.
(2)
Default clock configuration measured with all peripherals off.
Table 24: Total current consumption in wait mode at VDD = 3.3 V
osc.
(16 MHz)
HSE user ext.
clock
(16 MHz)
HSI RC osc.
(16 MHz)
HSI RC osc.
(16 MHz)
HSI RC osc.
(16 MHz/8)
(2)
(128 kHz)
2.15
1.55 2.0
1.5 1.9
1.3
0.7
0.5
Unit
(1)
mA
Symbol
I
Supply current in wait
DD(WFI)
Parameter Conditions Typ Max
mode
Unit
(1)
f
CPU
= f
= 16 MHz HSE crystal
MASTER
1.75
mA
osc.
(16 MHz)
HSE user ext.
1.55 2.0
clock
DocID14771 Rev 13 49/99
Electrical characteristics
STM8S105xx
(16 MHz)
Symbol
Parameter Conditions Typ Max
(1)
Unit
f
CPU
= f
MASTER
/128 = 125
kHz
f
CPU
= f
MASTER
/128 =
15.625 kHz
f
= f
CPU
= 128 kHz LSI RC osc.
MASTER
Notes:
(1)
Data based on characterization results, not tested in production.
(2)
Default clock configuration measured with all peripherals off.
10.3.2.3 Total current consumption in active halt mode
Table 25: Total current consump tion in active halt mode at VDD = 5 V
Symbol Parameter Conditions Typ Max
I
Supply current
DD(AH)
in active halt
mode
Main voltage
regulator
(MVR)
(2)
On Operating
Off Operating
Flash
mode
mode
Power-
down
mode
mode
Power-
down
mode
(3)
HSI RC osc.
(16 MHz)
HSI RC osc.
(16 MHz)
HSI RC osc.
(16 MHz/8)
(128 kHz)
Clock
source
HSE
crystal
osc.
(16
MHz)
LSI RC
osc.
(128
kHz)
HSE
crystal
osc.
(16
MHz)
LSI RC
osc.
(128
kHz)
LSI RC
osc.
(128
kHz)
1.5 1.9
1.3
0.7
(2)
0.5
Max
at 85
°C
at 125
(1)
°C
1080
200 320 400
1030
140 270 350
68 120 220
12 60 150
Unit
(1)
µA
50/99 DocID14771 Rev 13
STM8S105xx
Electrical characteristics
Notes:
(1)
Data based on characterization results, not tested in production
(2)
Configured by the REGAH bit in the CLK_ICKR register.
(3)
Configured by the AHALT bit in the FLASH_CR1 register.
Table 26: Total current consump tion in active halt mode at VDD = 3.3 V
Symbol Parameter Conditions Typ Max
at 85
°C
(1)
I
Supply current
DD(AH)
in active halt
mode
Main voltage
regulator
(MVR)
(2)
On Operating
Flash
mode
mode
Clock
source
HSE
680
(3)
crystal
osc.
(16 MHz)
LSI RC
200 320 400
osc. (128
kHz)
Power-
down
mode
HSE
crystal
osc.
630
(16 MHz)
LSI RC
140 270 350
osc. (128
kHz)
Off Operating
mode
Power-
LSI RC
osc. (128
kHz)
66 120 220
10 60 150
down
mode
Notes:
(1)
Data based on characterization results, not tested in production.
(2)
Configured by the REGAH bit in the CLK_ICKR register.
(3)
Configured by the AHALT bit in the FLASH_CR1 register.
Max
at 125
(1)
°C
Unit
µA
10.3.2.4 Total current consumption in halt mode
Table 27: Total current consumption in halt mode at VDD = 5 V
Symbol
I
Supply current in
DD(H)
Notes:
(1)
Data based on characterization results, not tested in production.
Parameter Conditions Typ Max at
Flash in operating mode, HSI
halt mode
clock after wakeup
Flash in powerdown mode,
HSI clock after wakeup
DocID14771 Rev 13 51/99
85 °C
Max at
(1)
125 °C
Unit
(1)
62 90 150 µA
6.5 25 80
Electrical characteristics
STM8S105xx
Table 28: Total current consumption in halt mode at VDD = 3.3 V
Symbol
I
Supply current in
DD(H)
Parameter Conditions Typ Max at
Flash in operating mode, HSI
halt mode
clock after wakeup
Flash in powerdown mode,
HSI clock after wakeup
Notes:
(1)
Data based on characterization results, not tested in production.
10.3.2.5 Low power mode wakeup times
Table 29: Wakeup times
Symbol
t
WU(WFI)
t
WU(AH)
t
WU(H)
Notes:
(1)
Data guaranteed by design, not tested in production.
(2)
Measured from interrupt event to interrupt vector fetch.
(3)
t
WU(WFI)
(4)
Configured by the REGAH bit in the CLK_ICKR register.
(5)
Configured by the AHALT bit in the FLASH_CR1 register.
Parameter Conditions Typ Max
Wakeup time
from
wait mode to run
(2)
active
active
active
active
from
+ 67 x 1/f
master
MVR
voltage
regulator
(2)
on
(4)
MVR
voltage
regulator
(2)
on
(4)
MVR
voltage
regulator
(2)
off
(4)
MVR
voltage
regulator
(2)
off
(4)
Flash in operating mode
Flash in power-down mode
(2)
CPU.
mode
Wakeup time
halt mode to run
mode
Wakeup time
halt mode to run
mode
Wakeup time
halt mode to run
mode
Wakeup time
halt mode to run
mode
Wak eup time
halt mode to run
mode
= 2 x 1/f
f
CPU
= f
0 to 16 MHz
= 16 MHz 0.56
MASTER
Flash in
operating
(5)
mode
Flash in
power-down
(5)
mode
Flash in
operating
(5)
mode
Flash in
power-down
(5)
mode
(1)
85 °C
125 °C
60 90 150 µA
4.5 20 80
See note
(6)
1
HSI
2
(after
wakeup)
HSI
3
(6)
(after
wakeup)
48
(6)
50
(6)
HSI
(after
wakeup)
HSI
(after
wakeup)
(5)
52
(5)
54
Max at
(1)
(3)
(6)
(1)
Unit
Unit
μs
52/99 DocID14771 Rev 13
STM8S105xx
Electrical characteristics
(6)
Plus 1 LSI clock depending on synchronization.
(1)
10.3.2.6 Total current consumption and timing in forced reset state
Table 30: Total current consumption and timing in forced reset state
Symbol Parameter Conditions Typ Max
I
Supply current in reset state
DD(R)
(2)
VDD = 5 V 500
VDD = 3.3 V 400
t
Reset pin release to vector fetch
RESETBL
Notes:
(1)
Data guaranteed by design, not tested in production.
(2)
Characterized with all I/Os tied to VSS.
10.3.2.7 Current consumption of on-chip peripherals
Subject to general operating conditions for VDD and TA.
(1)
Unit
μA
150 μs
HSI internal RC/f
CPU
= f
MASTER
= 16 MHz.
Table 31: Peripheral current consumption
Symbol Parameter Typ. Unit
(1)
230 µA
(1)
115
90
(1)
30
(2)
110
(2)
45
(2)
65
(3)
955
I
DD(TIM1)
I
DD(TIM2)
I
DD(TIM3)
I
DD(TIM4)
I
DD(UART2)
I
DD(SPI)
I
DD(I2C)
I
DD(ADC1)
TIM1 supply current
TIM2 supply current
TIM3 timer supply current
TIM4 timer supply current
UART2 supply current
SPI supply current
I2C supply current
ADC1 supply current when converting
Notes:
(1)
Data based on a differential IDD measurement between reset configuration and timer counter running at 16
MHz. No IC/OC programmed (no I/O pads 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. No I/O pads toggling. Not tested in
production.
(3)
Data based on a differential IDD measurement between reset configuration and continuous A/D conversions.
Not tested in production.
10.3.2.8 Current consumption curves
The following figures show typical current consumpt ion measured with code executing in
RAM.
DocID14771 Rev 13 53/99
Electrical characteristics
STM8S105xx
Figure 13: Typ. IDD(RUN) vs. VDD, HSE user external clock, fCPU = 16 MHz
Figure 14: Typ. IDD(RUN) vs. fCPU, HSE user external clock, VDD= 5 V
10.3.3 External clock sources and timing characteristics
HSE user external clock
Subject to general operating conditions for VDD and TA.
Table 32: HSE user external clock characteristics
Symbol Parameter Conditions Min Max Unit
f
User external clock source
HSE_ext
(1)
V
V
I
LEAK_HSE
OSCIN input pin high level voltage 0.7 x
HSEH
(1)
OSCIN input pin low level voltage VSS 0.3 x VDD
HSEL
OSCIN input leakage current V
Notes:
(1)
Data based on characterization results, not tested in production.
frequency
SS
Figure 19: HSE external clocksource
< V
V
DD
<
IN
0 16
MHz
+ 0.3
V
V
DD
DD
V
V
-1 +1 μA
HSE crystal/ceramic resonator oscillator
The HSE clock can be supplied with a 1 to 16 MHz crystal/ ceramic resonator oscillator. All
the information given in this paragraph is based on characterization results with specified
typical external components. In the application, t he resonator and the load capacitors have
to be placed as close as possible to the oscillator pin s in order to minimize output distortion
and start-up stabilization time. Refer to the crystal resonator manufacturer for more details
(frequency, package, accuracy...).
Table 33: HSE oscillator characteristics
Symbol Parameter Conditions Min Typ Max Unit
f
External high speed
HSE
oscillator frequency
RF Feedback resistor
56/99 DocID14771 Rev 13
1
220
16 MHz
kΩ
STM8S105xx
Electrical characteristics
Symbol Parameter Conditions Min Typ Max Unit
(1)
C
Recommended load
capacitance
I
HSE oscillator power
DD(HSE)
consumption
gm Oscillator
(2)
C = 20 pF,
= 16 MHz
f
OSC
C = 10 pF,
=16 MHz
f
OSC
5
20 pF
6 (startup)
1.6 (stabilized)
6 (startup)
1.2 (stabilized)
(3)
(3)
mA
mA/V
transconductance
(4)
t
SU(HSE)
Startup time VDD is stabilized
1
ms
Notes:
(1)
C 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 small Rm
value. Refer to crystal manufacturer for more details
(3)
Data based on characterization results, not tested in production.
(4)
t
oscillation is reached. This value is measured for a standard crystal resonator and it can vary significantly with the
crystal manufacturer.
is the start-up time measured from the moment it is enabled (by software) to a stabilized 16 MHz
SU(HSE)
Figure 20: HSE oscillator circuit diagram
HSE oscillator critical g
= (2 × Π × f
g
mcrit
: Notional resistance (see crystal specificat i on)
R
m
L
: Notional inductance (see crystal specification)
m
C
: Notional capacitance (see crystal specification)
m
)2 × Rm(2Co + C)2
HSE
equation
m
Co: Shunt capacitance (see crystal specification)
= C
C
L1
g
m
= C: Grounded external capacitance
L2
>> g
mcrit
DocID14771 Rev 13 57/99
Electrical characteristics
STM8S105xx
10.3.4 Internal clock sources and timing characteristics
Subject to general operating conditions for VDD and TA.
High speed internal RC oscillator (HSI)
Table 34: HSI oscillator character istics
Symbol
f
Frequency
HSI
ACC
Accuracy of HSI
HSI
Parameter Conditions Min Typ Max Unit
User-trimmed with
oscillator
CLK_HSITRIMR register for given
VDD and TA conditions
Accuracy of HSI
oscillator (factory
calibrated)
VDD = 5 V, TA = 25°C
V
= 5 V, 25 °C ≤ TA ≤ 85 °C -2.0
DD
2.95 ≤ V
≤ 5.5 V,-40 °C ≤ T
DD
125 °C
t
HSI oscillator wake-up
su(HSI)
time including
calibration
I
HSI oscillator power
DD(HSI)
consumption
Notes:
(1)
Refer to application note.
(2)
Guaranteed by design, not tested in production.
(3)
Data based on characterization results, not tested in production.
Figure 21: Typical HSI accuracy at VDD = 5 V vs 5 temperatures
Subject to general operating conditions for VDD and TA.
Table 35: LSI oscillator characteristics
Symbol Parameter Min Typ Max Unit
f
Frequency 110 128 146 kHz
LSI
t
LSI oscillator wakeup time
su(LSI)
I
LSI oscillator power consumption
DD(LSI)
Notes:
(1)
Guaranteed by design, not tested in production.
Figure 23: Typical LSI accuracy vs VDD @ 4 temperatures
5
(1)
7
µs
µA
DocID14771 Rev 13 59/99
Electrical characteristics
STM8S105xx
10.3.5 Memory characteristics
RAM and hardware registers
Table 36: RAM and hardware register s
Symbol Parameter Conditions Min Unit
VRM Data retention mode
Notes:
(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 design, not tested in production. refer to
bit advanced control timer"
(2)
Refer to the Operating conditions section for the value of V
Flash program memory/data EEPROM memory
General conditions: TA = -40 to 125°C.
for the value of V
Table 37: Flash program memory/dat a E EPROM memory
(1)
Halt mode (or reset) V
Section 7.10: "TIM1 - 16-
IT-max
IT-max
IT-max
(2)
V
Symbol
VDD Operating voltage (all modes,
t
Standard programming t ime (including
prog
Parameter Conditions Min
f
≤ 16
execution/write/erase)
CPU
MHz
(1)
2.95
Typ Max Unit
5.5 V
6.0 6.6 ms
erase) for byte/word/block (1 byte/4
bytes/128 bytes)
Fast programming time for 1 block (128
3.0 3.3 ms
bytes)
t
Erase time for 1 block (128 bytes)
erase
NRW Erase/write cycles
(2)
(program memory) TA = +85 °C 10 k
Erase/write cycles(data memory)
t
Data retention (program memory) after 10k
RET
erase/write cycles at T
= +85 °C
A
Data retention (data memory) aft er 10k
erase/write cycles at T
= +85 °C
A
Data retention (data memory) aft er 300 k
erase/write cycles at T
= +125 °C
A
IDD Supply current (Flash programming or
(2)
TA = +125 °
C
T
= 55° C 20
RET
T
= 55° C 20
RET
T
= 85° C 1.0
RET
300
3.0 3.3 ms
1.0M
k
2.0
erasing for 1 to 128 bytes)
Notes:
(1)
Data based on characterization results, not tested in production.
(2)
The physical granularity of the memory is 4 bytes, so cycling is performed on 4 bytes even when a write/erase
operation addresses a single byte.
cycles
years
mA
60/99 DocID14771 Rev 13
STM8S105xx
Electrical characteristics
10.3.6 I/O port pin characteristics
General characteristics
Subject to general operating conditions for VDD and TA unless otherwise specified. All
unused pins must be kept at a fixed voltage: using the output mode of the I/O for example
or an external pull-up or pull-down resistor.
Table 38: I/O static characteristics
Symbol
VIL Input lo w level v oltag e V
VIH Input high level v ol tage 0.7 x
V
Hysteresis
hys
Rpu Pull-up resistor VDD = 5 V, V
tR, tF Rise and fall time(10 % -
Parameter Conditions Min Typ Max Unit
= 5 V -0.3
DD
0.3 x
V
DD
VDD +
90 %)
V
DD
(1)
= VSS 30 55 80 kΩ
IN
700
Fast I/Os load = 50 pF
Standard and high sink
0.3 V
(2)
35
125
(2)
I/Os load = 50 pF
Fast I/Os load = 20 pF
Standard and high sink
20
50
(2)
(2)
I/Os load = 20 pF
I
Input leakage c urrent,
lkg
V
≤ V
SS
≤ VDD
IN
±1.0
(3)
analog and digital
I
Analog input leakage
lkg ana
V
≤ V
SS
≤ VDD
IN
±250
(3)
current
I
Leakage current in
lkg(inj)
adjacent I/O
(3)
Injection current ±4 mA
±1.0
(3)
Notes:
(1)
Hysteresis voltage between Schmitt trigger switching levels. Based on characterization results, not tested in
production.
(2)
Data guaranteed by design.
(3)
Data based on characterization results, not tested in production.
V
V
mV
ns
µA
nA
µA
DocID14771 Rev 13 61/99
Electrical characteristics
STM8S105xx
Figure 24: Typical VIL and VIH vs VDD @ 4 temperatures
Figure 25: Typical pull-up resistance vs VDD @ 4 temp er at ures
62/99 DocID14771 Rev 13
STM8S105xx
Electrical characteristics
(1)
(1)
(1)
Figure 26: Typical pull-up current vs VDD @ 4 temperatures
1. The pull-up is a pure resistor (slope goes through 0).
Table 39: Output driving current (standard ports)
Symbol Parameter Conditions Min Max Unit
VOL Output low level with four pins sunk IIO = 4 mA,
= 3.3 V
V
DD
Output low level with eight pins sunk IIO= 10 mA,
V
DD
VOH Output high level with four pin s sourced IIO = 4 mA,
V
= 3.3 V
DD
Output high level with eight pins sourc ed IIO = 10 mA,
V
DD
= 5 V
= 5 V
2.0
2.4
1.0
2.0
(1)
V
V
Notes:
(1)
Data based on characterization results, not tested in production
Table 40: Output driving current (true open drain ports)
Symbol Parameter Conditions Max Unit
VOL Output low level with two pins sunk IIO = 10 mA, V
Notes:
(1)
Data based on characterization results, not tested in production
Symbol Parameter Conditions Min Max Unit
VOL Output low level with four pins sunk IIO = 10 mA,
= 3.3 V 1.5
DD
IIO = 10 mA, V
IIO = 20 mA, V
= 5 V 1.0
DD
= 5 V 2.0
DD
Table 41: Output driving current (high sink ports)
Figure 39: Typical NRST pull-up current vs VDD @ 4 temperatures
The reset network shown in the following figure prot ects the device against parasitic resets.
The user must ensure that the level on the NRST pin c an go below V
IL(NRST)
max. (see
Table 38: "I/O static characteristics" ), ot herwise the reset is not taken into account
internally.
For power consumption sensitive applications, t he external reset capacitor value can be
reduced to limit the charge/discharge current. If NRST signal is used to reset external
circuitry, attention must be taken to the charge/discharge time of the external capacitor to
fulfill the external devices reset timing conditions. M i ni mum recommended capacity is 100
nF.
10.3.9 SPI serial peripheral interface
70/99 DocID14771 Rev 13
Figure 40: Recommended reset pin protection
Unless otherwise specified, the parameters given in the following table are derived from
tests performed under ambient temperature, f
conditions. t
MASTER
= 1/f
MASTER
.
frequency and VDD supply voltage
MASTER
Refer to I/O port characteristics for more detail s on t he input/output alternate function
characteristics (NSS, SCK, MOSI, MISO).
STM8S105xx
Electrical characteristics
(1)
(1)
Table 43: SPI characteristics
Symbol Parameter Conditions Min Max Unit
f
SCK
t
c(SCK)
t
r(SCK)
t
f(SCK)
t
su(NSS)
t
h(NSS)
t
w(SCKH)
t
w(SCKL)
t
su(MI)
t
su(SI)
t
h(MI)
t
h(SI)
t
a(SO)
t
dis(SO)
t
v(SO)
1
(1)
(1)
(1)
(1)
(1)(2)
(1)(3)
(1)
(1)
(1)
(1)
SPI clock frequency Mas ter mode 0 8
Slave mode 0 6
SPI clock rise and fall
time
Capacitive load: C = 30
pF
NSS setup time Slave mode 4 x
t
MASTER
NSS hold time Slave mode 70
SCK high and low time Master mode t
/2 - 15 t
SCK
Data input setup time Master mode 5
Data input setup time Slave mode 5
Data input hold time Master mode 7
Data input hold time Slave mode 10
Data output ac c ess time Slave mode
Data output disable time Slave mode 25
Data output valid time Slave mode
MHz
25 ns
ns
ns
SCK
/2 +
ns
15
ns
ns
ns
ns
3 x t
MASTER
ns
ns
73 ns
(after enable edge)
(1)
t
Data output valid time Master mode
v(MO)
36 ns
(after enable edge)
(1)
t
Data output hold time Slave mode
h(SO)
28
ns
(after enable edge)
t
Master mode
h(MO)
12
ns
(after enable edge)
Notes:
(1)
Values based on design simulation and/or characterization results, and not tested in production.
(2)
Min time is for the minimum time to drive the output and the max time is for the maximum time to validate the
data.
(3)
Min time is for the minimum time to invalidate the output and the max time is for the maximum time to put the
1. Measurement points are made at CMOS levels: 0.3 V
72/99 DocID14771 Rev 13
and 0.7 VDD.
DD
STM8S105xx
Electrical characteristics
(3)
(4)
(3)
Figure 43: SPI timing diagram - master mode(1)
1. Measurement points are made at CMOS levels: 0.3 V
10.3.10 I2C i nt er face characteristics
Table 44: I2C characteristics
Symbol Parameter Standard mode I2C Fast mode I2C
t
SCL clock low time 4.7
w(SCLL)
t
SCL clock high time 4.0
w(SCLH)
t
SDA setup time 250
su(SDA)
t
SDA data hold time 0
h(SDA)
t
r(SDA)
t
r(SCL)
t
f(SDA)
t
f(SCL)
t
START condition hold time 4.0
h(STA)
t
Repeated START condition
su(STA)
t
STOP condition setup time 4.0
su(STO)
t
w(STO:STA)
STOP to START condition time
SDA and SCL rise time
SDA and SCL fall time
setup time
(bus free)
Min
4.7
4.7
(2)
Max
and 0.7 VDD.
DD
(2)
Min
1000
300
(2)
1.3
0.6
100
0
900
0.6
0.6
0.6
1.3
Max
300 ns
300 ns
(1)
Unit
(2)
ns
μs
μs
ns
μs
μs
μs
μs
DocID14771 Rev 13 73/99
Electrical characteristics
STM8S105xx
(1)
Symbol Parameter Standard mode I2C Fast mode I2C
Cb Capacitive load for each bus line
Min
(2)
Max
400
(2)
Min
(2)
Max
Unit
(2)
400 pF
Notes:
(1)
f
(2)
Data based on standard I2C protocol requirement, not tested in production.
(3)
The maximum hold time of the start condition has only to be met if the interface does not stretch the low time.
(4)
The device must internally provide a hold time of at least 300 ns for the SDA signal in order to bridge the
undefined region of the falling edge of SCL.
, must be at least 8 MHz to achieve max fast I2C speed (400kHz).
MASTER
Figure 44: Typical application with I2C bus and timing diagram (1)
1. Measurement points are made at CMOS levels: 0.3 x VDD and 0.7 x VDD
10.3.11 10-bi t ADC charact er istics
Subject to general operating conditions for V
Table 45: ADC characteristics
Symbol
f
ADC clock frequency V
ADC
V
Analog supply
DDA
V
Positive reference voltage
REF+
V
Negative reference voltage
REF-
Parameter Conditions Min Typ Max Unit
74/99 DocID14771 Rev 13
DDA
DDA
V
, f
DDA
, and TA unless otherwise specified.
MASTER
=2.95 to 5.5 V 1.0
=4.5 to 5.5 V 1.0
3.0
2.75
(1)
VSSA
4.0 MHz
6.0
5.5 V
V
V
DDA
0.5 V
STM8S105xx
Electrical characteristics
(1)
(2)
(2)
be avoided as this significantly reduces the accuracy of the conversion being performed on another analog input.
Symbol
Parameter Conditions Min Typ Max Unit
V
Conversion voltage range
AIN
C
Internal sample and hold
ADC
(2)
Devices with external
V
REF+/VREF-
pins
VSSA
V
REF-
VDDA
V
REF+
V
V
3.0
capacitor
t
Sampling time f
S
t
Wakeup time from standby
STAB
t
Total conversion time (including
CONV
sampling time, 10-bit resolutio n)
= 4 MHz 0.75 µs
ADC
f
= 6 MHz 0.5
ADC
7.0
f
= 4 MHz 3.5 µs
ADC
f
= 6 MHz 2.33 µs
ADC
14 1/f
Notes:
(1)
Data guaranteed by design, not tested in production..
(2)
During the sample time the input capacitance C
source. The internal resistance of the analog source must allow the capacitance to reach its final voltage level
within t
After the end of the sample time tS, changes of the analog input voltage have no effect on the conversion
S.
result. Values for the sample clock t
depend on programming.
S
(3 pF max) can be charged/discharged by the external
AIN
Table 46: ADC accuracy with RAIN < 10 kΩ , VDDA= 5 V
Symbol Parameter Conditions Typ Max
|ET| Total unadjusted error
|EO| Offset error
|EG| Gain error
|ED| Differential linearity error
|EL| Integral linearity error
(2)
f
(2)
f
(2)
f
f
(2)
f
= 2 MHz 1.0 2.5 LSB
ADC
f
= 4 MHz 1.4 3.0
ADC
f
= 6 MHz 1.6 3.5
ADC
= 2 MHz 0.6 2.0
ADC
f
= 4 MHz 1.1 2.5
ADC
f
= 6 MHz 1.2 2.5
ADC
= 2 MHz 0.2 2.0
ADC
f
= 4 MHz 0.6 2.5
ADC
f
= 6 MHz 0.8 2.5
ADC
= 2 MHz 0.7 1.5
ADC
f
= 4 MHz 0.7 1.5
ADC
f
= 6 MHz 0.8 1.5
ADC
= 2 MHz 0.6 1.5
ADC
f
= 4 MHz 0.6 1.5
ADC
f
= 6 MHz 0.6 1.5
ADC
Notes:
(1)
Data based on characterization results, not tested in production.
(2)
ADC accuracy vs. negative injection current: Injecting negative current on any of the analog input pins should
(1)
Unit
pF
µs
ADC
DocID14771 Rev 13 75/99
Electrical characteristics
STM8S105xx
It is recommended to add a Schottky diode (pin to ground) to standard analog pins which may potentially inject
negative current. Any positive injection current within the limits specified for I
pin characteristics section does not affect the ADC accuracy.
INJ(PIN)
and ΣI
INJ(PIN)
in the I/O port
Table 47: ADC accuracy with RAIN < 10 kΩ RAIN, VDDA = 3.3 V
Symbol Parameter Conditions Typ Max
|ET| Total unadjusted error
|EO| Offset error
|EG| Gain error
|ED| Differential linearity error
|EL| Integral linearity error
(2)
f
(2)
f
(2)
f
(2)
f
(2)
f
= 2 MHz 1.1 2.0 LSB
ADC
f
= 4 MHz 1.6 2.5
ADC
= 2 MHz 0.7 1.5
ADC
f
= 4 MHz 1.3 2.0
ADC
= 2 MHz 0.2 1.5
ADC
f
= 4 MHz 0.5 2.0
ADC
= 2 MHz 0.7 1.0
ADC
f
= 4 MHz 0.7 1.0
ADC
= 2 MHz 0.6 1.5
ADC
f
= 4 MHz 0.6 1.5
ADC
(1)
Unit
Notes:
(1)
Data based on characterization results, not tested in production.
(2)
ADC accuracy vs. negative injection current: Injecting negative current on any of the analog input pins should
be avoided as this significantly reduces the accuracy of the conversion being performed on another analog input.
It is recommended to add a Schottky diode (pin to ground) to standard analog pins which may potentially inject
negative current. Any positive injection current within the limits specified for I
13.3.6: "I/O port pin characteris tics"
does not affect the ADC accuracy.
INJ(PIN)
and ΣI
INJ(PIN)
in Section
Figure 45: ADC accuracy characteristics
1. Example of an actual transfer curve.
2. The ideal transfer curve
76/99 DocID14771 Rev 13
STM8S105xx
Electrical characteristics
3. End point correlation line
= Total unadjusted error: maximum deviati on between the actual and the ideal
E
T
transfer curves.
= Offset error: deviation between the first actual tra nsition and the first ideal one.
E
O
= Gain error: deviation between the last ideal transition and the last actual one.
E
G
= Differential linearity error: maximum deviation between actual steps and the ideal
E
D
one.
= Integral linearity error: maximum deviation bet ween any actual transition and the
E
L
end point correlation line.
10.3.12 EMC charact er istics
Susceptibility tests are performed on a sample basi s during product characterization.
While executing a simple application (toggling 2 LEDs through I/O ports), the product is
stressed by two electromagnetic events until a failure occurs (indicated by the LEDs).
•FESD: Functional electrostatic discharge (positi ve and negative) is applied on all pins
of the device until a functional disturbance occ urs. This test conforms with the IEC
61000-4-2 standard.
•FTB: A burst of fast transient voltage (positive and ne gative) is applied to V
through a 100 pF capacitor, until a functional disturbance occurs. This test conforms to
IEC 61000-4-4 standard.
A device reset allows normal operations to be resumed. Test results are given in table
below based on the EMS levels and classes defined in application note AN1709 (EMC
design guide for ST Microcontrollers).
10.3.12.2 Designing hardened software to avoid noise problems
EMC characterization and optimizatio n are performed at component level with a typical
application environment and simplified MCU soft ware. It should be noted that good EMC
performance is highly dependent on the user applicat ion and the software in particular.
Therefore it is recommended that the user applies E MC software optimization and
prequalification tests in relation with the EMC level requested for his application.
Software recommendations
The software flowchart must include the management of runaway conditions such as:
and VSS
DD
• Corrupted program counter
• Unexpected reset
• Critical data corruption (control registers...)
DocID14771 Rev 13 77/99
Electrical characteristics
STM8S105xx
Prequalification trials
Most of the common failures (unexpected reset and program counter corruption) can be
recovered by applying a low state on the NRST pin or the oscillator pins for 1 second.
To complete these trials, ESD stress can be applied directly on the device, over the range
of specification values. When unexpected behavior is detected, the software can be
hardened to prevent unrecoverable errors occurring. See application note AN1015
(Software techniques for improving microcontr ol ler EMC performance).
Table 48: EMS data
Parameter Conditions Level/
Symbol
V
Voltage limits to be ap plied on any I/O
FESD
pin to induce a functional disturbance
V
Fast transient vol tage burst limits to be
EFTB
applied through 100 pF on V
DD
and V
pins to induce a functional distur bance
Notes:
(1)
Data obtained with HSI clock configuration, after applying HW recommendations described in AN2860 (EMC
guidelines for STM8S microcontrollers).
10.3.12.3 Electromagnetic interference (EMI)
Emission tests conform to the IEC61967-2 standa rd for test software, board layout and pin
loading.
Table 49: EMI data
Symbol Parameter Conditions Unit
General conditions Monitored
S
Peak level V
EMI
LQFP48 package
SAE EMI
level
Notes:
(1)
Data based on characterization results, not tested in production.
= 5 V,
DD
TA = +25 °C,
conforming to
IEC61967-2
V
= 3.3 V, TA = 25 °C, f
DD
16 MHz (HSI clock), conforming to
IEC 61000-4-2
= 5 V, TA = 25 °C, f
V
DD
MHz, conforming to IEC 1000-4-2
VDD= 3.3 V, TA = 25 °C ,f
MHz (HSI clock),conforming to IEC
SS
61000-4-4
= 5 V, TA = 25 °C ,f
V
DD
MHz,conforming to IEC 1000-4-4
Max f
frequency band
8 MHz/
8 MHz
0.1 MHz to 30
13 14 dBµV
MHz
30 MHz to 130
23 19
MHz
130 MHz to 1
-4.0 -4.0
GHz
2.0 1.5 —
MASTER
MASTER
MASTER
MASTER
HSE/fCPU
=
= 16
= 16
= 16
(1)
8 MHz/
16 MHz
class
2/B
4/A
(1)
(1)
78/99 DocID14771 Rev 13
STM8S105xx
Electrical characteristics
10.3.12.4 Absolute maximum ratings (electrical sensitivity)
Based on two different tests (ESD and LU) using specific measurement methods, the
product is stressed in order to determine its performa nce in t erms of electrical sensitivity.
For more details, refer to the application note AN11 81.
10.3.12.5 Electrostatic discharge (ESD)
Electrostatic discharges (3 positive then 3 negative pulses separated by 1 second) are
applied to the pins of each sample according to each pin combination. The sample size
depends on the number of supply pins in the device (3 part s*(n+1) supply pin). This test
conforms to the JESD22-A114A/A115A standard. F or more details, refer to the application
note AN1181.
Table 50: ESD absolute maximum ratings
Symbol Ratings Conditions Class Maximum
V
ESD(HBM)
Electrostatic discharge
voltage (Human body model)
V
ESD(CDM)
Electrostatic discharge
voltage (Charge device
Notes:
(1)
Data based on characterization results, not tested in production
10.3.12.6 Static latch-up
Two complementary static tests are required on 10 parts to assess the latch-up
performance:
• A supply overvoltage (applied to each power supply pin)
• A current injection (applied to each input, output and c onfigurable I/O pin) is 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.
Symbol Parameter Conditions Class
LU Static latch-up class TA = +25 °C A
Notes:
(1)
Class description: A Class is a STMicroelectronics internal specification. All limits are higher than JEDEC
specifications, that means when a device belongs to class A it exceeds JEDEC standard. B class strictly covers all
the JEDEC criteria (international standard).
model)
TA = +25°C, conforming
to JESD22-A114
TA=+25°C, conforming
to JESD22-C101
Table 51: Electrical sensitivities
TA = +85 °C A
TA = +125 °C A
Unit
value
(1)
A 2000 V
IV 1000 V
(1)
DocID14771 Rev 13 79/99
Package information
STM8S105xx
(1)
11 Package information
In order to meet environmental requirements, ST offers these devices in different grades of
ECOPACK
specifications, grade definitions and product st atus are available at: www.st.com.
ECOPACK
®
packages, depending on their level of en vironmental compliance. ECOPACK®
Values in inches are converted from mm and rounded to 4 decimal digits
1.778
10.160
12.700
0.0200
0.0700
0.4000
(1)
0.5000
86/99 DocID14771 Rev 13
STM8S105xx
Thermal characteristics
12 Thermal characteristics
The maximum chip junction temperature (T
) must never exceed the values given in
Jmax
Section 7.10: "TIM1 - 16-bit advanced control timer"
The maximum chip-junction temperature, T
, in degrees Celsius, may be calculated
Jmax
using the following equation:
T
Jmax
= T
Amax
+ (P
Dmax
x ΘJA)
Where:
• T
• Θ
• P
• P
is the maximum ambient temperature in °C
Amax
is the package junction-to-ambient thermal resistanc e in ° C/ W
JA
is the sum of P
Dmax
is the product of I
INTmax
and P
INTmax
DD
I/Omax (PDmax
andVDD, expressed in Watts. This is the maximum chip
= P
INTmax
+ P
I/Omax
)
internal power.
•P
represents the maximum power dissipation on output pi nsWhere:P
I/Omax
(V
OL*IOL
) + Σ((V
DD-VOH)*IOH
), taking into account the actual VOL/I
I/Omax
OL and VOH/IOH
of the I/Os
at low and high level in the application.
Table 57: Thermal characteristics (1)
Symbol Parameter Value Unit
Θ
Thermal resistance junction-ambient
JA
57 °C/W
LQFP 48 - 7 x 7 mm
Θ
Thermal resistance junction-ambient
JA
54 °C/W
LQFP 44 - 10 x 10 mm
Θ
Thermal resistance junction-ambient
JA
60 °C/W
LQFP 32 - 7 x 7 mm
Θ
Thermal resistance junction-ambient
JA
38 °C/W
UFQFPN 32 - 5 x 5 mm
Θ
Thermal resistance junction-ambient
JA
60 °C/W
SDIP 32 - 400 mils
=Σ
1. Thermal resistances are based on JEDEC JESD51-2 with 4-layer PCB in a natural
convection environment.
12.1 Reference document
JESD51-2 integrated circuits thermal test method environment conditions - natural
convection (still air). Available from www.jedec.org.
12.2 Selecting the product temperature range
When ordering the microcontroller, the tem perature range is specified in the order code.
The following example shows how to calculate the t emperature range needed for a given
application.
Assuming the following application conditions:
• Maximum ambient temperature T
• I
= 15 mA, VDD = 5.5 V
DDmax
DocID14771 Rev 13 87/99
= 82 °C (measured according to JESD51-2)
Amax
Thermal characteristics
STM8S105xx
•Maximum 8 standard I/Os used at the same time in output at low level with IOL = 10
mA, V
•Maximum 4 high sink I/Os used at the same time in output at low level with I
mA, V
= 2 V
OL
= 1.5 V
OL
= 20
OL
•Maximum 2 true open drain I/Os used at the same time in output at low level with I
20 mA, V
P
INTmax
P
IOmax
This gives: P
P
Dmax
Thus: P
for LQFP32 can be calculated as follows, using the thermal resistance ΘJA :
T
Jmax
= 82° C + (60° C/W x 443 mW) = 82°C + 27°C = 109° C
T
Jmax
This is within the range of the suffix 3 version parts (-40 < T
= 2 V
OL
= 15 mA x 5.5 V = 82.5 mW
= (10 mA x 2 V x 8 )+(20 mA x 2 V x 2)+(20 mA x 1.5 V x 4) = 360 mW
= 82.5 mW and P
INTmax
360 mW:
IOmax
= 82.5 mW + 360 mW
= 443 mW
Dmax
< 131° C). In this case, parts
J
must be ordered at least with the temperature range suffix 3.
OL
=
88/99 DocID14771 Rev 13
STM8S105xx
Ordering information
13 Ordering information
Figure 52: STM8S105xx access line ordering info rm at ion scheme
1. For a list of available options (e.g. memory size, package) and orderable part numbers
or for further information on any aspect of t hi s dev i ce, please go to www.st.com or
contact the ST sales office nearest to you.
DocID14771 Rev 13 89/99
STM8S105 FASTROM microcontroller option
list
STM8S105xx
See the option byte section in the datasheet for authorized option byte
14 STM8S105 FASTROM microcontroller option list
(last update: September 2010)
Customer
Address
Contact
Phone no.
Reference FASTROM code
Notes:
(1)
FASTROM code name is assigned by STMicroelectronics.
(1)
Preferable format for programing code is .Hex (.s19 is accepted)
If data EEPROM programing is required, a separate file must be sent with the requested
[ ] 1: Port B5 alternate function = I 2C_SDA, port B4 alternate function = I2C_S CL.
[ ] 0: Remapping option inactive. Default alternate functions used. Refer to pinout
description.
[ ] 1: Port D4 alternate function = BEEP.
OPT3 watchdog
WWDG_HALT
(check only one option)
WWDG_HW
(check only one option)
IWDG_HW
(check only one option)
LSI_EN
(check only one option)
HSITRIM
(check only one option)
OPT4 wakeup
PRSC
(check only one option)
CKAWUSEL
(check only one option)
EXTCLK
(check only one option)
[ ] 0: No reset generated on halt if WWDG active.
[ ] 1: Reset generated on halt if WWDG active.
[ ] 0: WWDG activated by software.
[ ] 1: WWDG activated by hardware.
[ ] 0: IWDG activated by software.
[ ] 1: IWDG activated by hardware.
[ ] 0: LSI clock is not available as CPU cloc k source.
[ ] 1: LSI clock is available as CPU clock source.
[ ] 0: 3-bit trimming supported in CLK_HSITRIMR regis ter.
[ ] 1: 4-bit trimming supported in CLK_HSITRIMR regis ter.
[ ] for 16 MHz to 128 kHz prescaler.
[ ] for 8 MHz to 128 kHz prescaler.
[ ] for 4 MHz to 128 kHz prescaler.
[ ] 0: LSI clock source selected for AWU.
[ ] 1: HSE clock with prescaler selected as clock source for AWU.
[ ] 0: External crystal connected to OSCIN/OSCOUT.
[ ] 1: External clock signal on OSCIN.
OPT5 crystal oscillator stabilization HSECNT (check only one option)
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.
15.1 Emulation and in-circuit debugging tools
The STice emulation system offers a complete range of emulation and in-circuit debugging
features on a platform that is designed for versati l ity and cost-effectiveness. In addition,
STM8 application development is supported by a lo w -cost in-circuit debugger/programmer.
The STice is the fourth generation of full featured emulators from STMicroelectronics. It
offers new advanced debugging capabilities including profiling and coverage to help detect
and eliminate bottlenecks in application execution and dead code when fine tuning an
application.
In addition, STice offers in-circuit debugging and programming of STM8 microcontrollers
via the STM8 single wire interface module (SWIM), which allows non-intrusive debugging
of an application while it runs on the target microco ntroller.
For improved cost effectiveness, STice is based o n a m odul ar design that allows you to
order exactly what you need to meet your developm ent requirements and to adapt your
emulation system to support existing and future ST microcontrollers.
STice key features
• Occurrence and time profiling and code coverage (ne w f eatures)
• Advanced breakpoints with up to 4 levels of condition s
• Data breakpoints
• Program and data trace recording up to 128 KB records
• Read/write on the fly of memory during emulation
• In-circuit debugging/programming via SWIM protocol
• 8-bit probe analyzer
• 1 input and 2 output triggers
• Power supply follower managing application v oltages between 1.62 to 5.5 V
• Modularity that allows you to specify the components y ou need to meet your
development requirements and adapt to future requirements
•Supported by free software tools that include integrat ed development environment
(IDE), programming software interface and a ss em bler for STM8.
15.2 Software tools
STM8 development tools are supported by a complet e, free software package from
STMicroelectronics that includes ST Visual Develop (STVD) IDE and the ST Visual
Programmer (STVP) software interface. STVD provides seamless integration of the Cosmic
and Raisonance C compilers for STM8, which are available in a free version that outputs
up to 16 Kbytes of code.
15.2.1 STM8 toolset
94/99 DocID14771 Rev 13
STM8 toolset with STVD integrated development envi ronment and STVP programming
software is available for free download at www.st.com/mcu. This package includes:
STM8S105xx
STM8 development tools
ST Visual Develop – Full-featured integrated development environment from ST, featuring
• Seamless integration of C and ASM toolsets
• Full-featured debugger
• Project management
• Syntax highlighting editor
• Integrated programming interface
• Support of advanced emulation features for STice suc h as code profiling and
coverage
ST Visual Programmer (STVP) – Easy-to-use, unlimited graphical interface allowing read,
write and verify of your STM8 microcontroller’s Flash program memory, data EEPROM and
option bytes. STVP also offers project mode for saving programming configurations and
automating programming sequences.
15.2.2 C and assembly toolchains
Control of C and assembly toolchains is seamlessly integrated into the STVD integrated
development environment, making it possible to conf igure and control the building of your
application directly from an easy-to-use graphical inte rface.
Available toolchains include:
•Cosmic C compiler for STM8 – Available in a free version that output s up to
16 Kbytes of code. For more information, see www. cosmic-software.com.
•Raisonance C compiler for STM8 – Available in a free version that output s up to
16 Kbytes of code. For more information, see www. raisonance.com.
•STM8 assembler linker – Free assembly toolchain in cluded in the STVD toolset,
which allows you to assemble and link your application source code.
15.3 Programming tools
During the development cycle, STice provides in-circuit programming of the STM8 Flash
microcontroller on your application board via the SWIM protocol. Additional tools are to
include a low-cost in-circuit programmer as well as ST socket boards, which provide
dedicated programming platforms with sockets for programming your STM8.
For production environments, programmers will include a complete range of gang and
automated programming solutions from third-party tool developers already supplying
programmers for the STM8 family.
2 Corrected number of high sink outputs to 9 in I/Os on Section 3: "Features".
Updated part numbers in Table 2: "STM8S105xx access line features".
3 Updated part numbers in Table 2: "STM8S105xx access line features".
USART renamed UART1, LINUART renamed UART2.
Added Table 7: Pin-to-pin comparison of pin 7 to 12 in 32-pin access line
devices.
4 Removed STM8S102xx and STM8S104xx root part numbers corresponding
to devices without data EEPROM.
Updated STM8S103 pinout in Section 5.2 on page 29.
Added low and medium density Flash mem ory categories.
Added Note 1 in Table 17: "Current characteristics".
Updated Table 12: "Option bytes " .
5 Updated STM8S103 pinout in Section 5.2 on page 29
Updated number of High Sink I/O s in pinout.
TSSOP20 pinout modified (PD4 moved to pin 1 etc.)
Added WFQFN20 package
Updated Section 11: "Option bytes".
Added Section 4: "Introduction " .
Updated VDD range (2.95 V to 5.5 V) on Section 3: "Features".
Amended name of package VQFPN32
Added Table 5 on page 22 .
Updated Section 7.8: "Auto wakeup counter".
Updated pins 25, 30, and 31 in Section 8: "Pinout and pin description".
Removed Table 7: Pin-to-pin comparison of pi n 7 to 12 in 32-pin access line
devices.
Added Table 14: "Description of alternate function remapping bits [7:0] of
removed low power dissipation cond i tion for T
and added ESR and ESL data in table "general operating conditions".
Section 13.3.2.4: "Total curren t consumption in halt mode": replaced m ax
value of I
powerdown mode, HSI clock after wakeup in the table "total current
consumption in halt mode at VDD = 5 V.
Section 13.3.2.5: "Low power mode wakeup times": added first condition (0 to
16 MHz) for the t
Section 13.3.4: "Internal clock s ources and timing characteristics ": In the table
"HSI oscillator characteristics", replaced min and max values of "ACC
factory calibrated parameter" and removed footnote 4 concerning fur ther
characterization of results.
Section 13.3.12.1: "Functiona l E MS (electromagnetic susceptibili ty)": IEC
1000 replaced with IEC 61000.
Section 13.3.12.2: "Designing hardened software to avoid noise problems":
Modified Section 5: "Descripti on".
Remove weak pull-up input for PE1 and PE2 in T able 6: "Pin description for
STM8S105 microcontrollers"
Updated Table 11: "Interrupt mapp ing" for TIM2 and TIM4.
Updated notes related to V
Added values of tR/tF for 50 pF load capacitance, and updated note i n Table
38: "I/O static characteristics".
Updated typical and maximum values of R
characteristics" and Table 42: "NRST pin character i s tics".
Changed SCK input to SCK output in Sec tion 13.3.9: "SPI serial peripheral
interface"
Added Θ
characteristics(1)", and updated Section 7.9: "Beeper"
28-Jun-
2012
7-Feb-
2014
12 Added UFQFPN package thickness in Figure 52: "STM8S105xx access line
ordering information scheme".
13 UART2_CK mapped to correct pin (pin 24) in Figure 4: "LQFP 44-pin pinout".
Reserved area updated in Table 12: " Option bytes ".
Package Information updated in Table 55: "32-lead ultra-thin fine pi tch quad
flat no-lead package mechanical dat a".
in Table 19: "General operating condi tions".
CAP
in Table 38: "I/O static
PU
for UFQFPN32 and SDIP32 in Table 57: "T hermal
JA
98/99 DocID14771 Rev 13
STM8S105xx
Disclaimer
PRODUCTS INCLUDING WITHOUT LIMITATION IMPLIED WARRANTIES OF
MENT OF ANY PATENT,
(C) AUTOMOTIVE APPLICATIONS OR ENVIRONMENTS, AND/OR (D) AEROSPACE
APPLICATIONS OR ENVIRONMENTS. WHERE ST PRODUCTS ARE NOT DESIGNED FOR
EEN INFORMED IN WRITING OF SUCH USAGE, UNLESS A PRODUCT IS
SAFETY OR MEDICAL” INDUSTRY DOMAINS ACCORDING TO ST PRODUCT DESIGN
17 Disclaimer
Information in this document is provided solely in connection with ST products. STMicroelectronic s
NV and its subsidiaries (“ST”) reserve the right to make changes, corrections, modifications or
improvements, to this document, and the product s and ser vices descr ibed here in at any time, without
notice.
All ST products are sold pursuant to S T’s terms and conditions of sale.
Purchasers are solely respon sible for the c hoice, selecti on and use of t he ST product s and services
described herein, and ST ass umes no liability whatsoever relat ing to the choice, selection or use of
the ST products and services descri bed herein.
No license, express or implied, by estop pel or other wise, to an y intellec tual prop erty righ ts is gr anted
under this document. If any part of t his document ref ers to any third par ty prod ucts or ser vices it s hall
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 consid ered as a warranty covering the use in any manner
whatsoever of such third party products or services or any intellectual pr operty 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
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE (AND THEIR EQUIVALENTS
UNDER THE LAWS OF ANY JURISDICTION), OR INFRINGE
COPYRIGHT OR OTHER INTELLECTUAL PROPERTY RIGHT.
ST PRODUCTS ARE NOT DESIGNED OR AUTHORIZED FOR USE IN: (A) SAFETY CRITICAL
APPLICATIONS SUCH AS LIFE SUPPORTING, ACTIVE IMPLANTED DEVICES OR SYSTEMS
WITH PRODUCT FUNCTIONAL SAFETY REQUIREMENTS; (B) AERONAUTIC APPLICATIONS;
Please Read Carefully
SUCH USE, THE PURCHASER SHALL USE PRODUCTS AT PURCHASER’S SOLE RISK, EV EN
IF ST HAS B
EXPRESSLY DESIGNATED BY ST AS BEING INTENDED FOR “AUTOMOTIVE, AUTOMOTIVE
SPECIFICATIONS. PRODUCTS FORMALLY ESCC, QML OR JAN QUALIFIED ARE DEEMED
SUITABLE FOR USE IN AEROSPACE BY THE CORRESPONDING G OVERNMENTAL AGENCY.
Resale of ST products with provisions different from the statements and/or technical features set forth
in this document shall immediately voi d any warranty granted by ST for the ST product or servic e
described herein and shall not create or extend in any manner whatsoeve r, any liability of ST.
ST and the ST logo are trademarks or r egistered trademarks of ST in various c ountries.
Information in this document supersedes and replaces all information prev iously supplied.
The ST logo is a registered trademark of STMicroelectronics. All other names are the property of their