In the order code, ‘F’ applies to devices with Flash program
1.
memory and data EEPROM while ‘H’ refers to devices with
Flash program memory only. ‘F’ is replaced by ‘P’ for devices
with FASTROM (see Tables 2 and 3, and Figure 47).
2. Not recommended for new design.
(1)
(2)
STM8AF6166/68
(2)
/2
July 2012Doc ID 14952 Rev 61/89
This is information on a product in full production.
Figure 18.Typical HSI frequency vs V
Figure 19.Typical LSI frequency vs V
Figure 20.Typical V
Figure 21.Typical pull-up resistance R
Figure 22.Typical pull-up current I
Figure 23.Typ. V
Figure 24.Typ. V
Figure 25.Typ. V
Figure 26.Typ. V
Figure 27.Typ. V
Figure 28.Typ. V
Figure 29.Typ. V
Figure 30.Typ. V
Figure 31.Typ. V
Figure 32.Typ. V
Figure 33.Typical NRST V
Figure 34.Typical NRST pull-up resistance R
Figure 35.Typical NRST pull-up current I
This datasheet refers to the STM8AF61xx (STM8AF612x, STM8AF614x, STM8AF6166,
and STM8AF6168) and STM8AF62xx products with 16 to 32 Kbytes of Flash program
memory.
In the order code, the letter ‘F’ refers to product versions with data EEPROM and ‘H’ refers
to product versions without data EEPROM. The identifiers ‘F’ and ‘H’ do not coexist in a
given order code.
The datasheet contains the description of family features, pinout, electrical characteristics,
mechanical data and ordering information.
●For complete information on the STM8A microcontroller memory, registers and
peripherals, please refer to STM8S and STM8A microcontroller families reference
manual (RM0016).
●For information on programming, erasing and protection of the internal Flash memory
please refer to the STM8 Flash programming manual (PM0051).
●For information on the debug and SWIM (single wire interface module) refer to the
STM8 SWIM communication protocol and debug module user manual (UM0470).
●For information on the STM8 core, please refer to the STM8 CPU programming manual
(PM0044).
8/89Doc ID 14952 Rev 6
STM8AF61xx, STM8AF62xxDescription
2 Description
The STM8AF61xx and STM8AF62xx automotive 8-bit microcontrollers offer from 16 to 32
Kbytes of Flash program memory and integrated true data EEPROM. They are referred to
as medium density STM8A devices in the STM8S and STM8A microcontroller families
reference manual (RM0016).
All devices of the STM8A product line provide the following 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 300 k
write/erase cycles and a high system integration level with internal clock oscillators,
watchdog, and brown-out reset.
Device performance is ensured by a clock frequency of up to 16 MHz CPU and enhanced
characteristics which include robust I/O, independent watchdogs (with a separate clock
source), and a clock security system.
Short development cycles are guaranteed due to application scalability across a common
family product architecture with compatible pinout, memory map and and modular
peripherals. Full documentation is offered with a wide choice of development tools.
Product longevity is ensured in the STM8A family thanks to their advanced core which is
made in a state-of-the art technology for automotive applications with 3.3 V to 5 V operating
supply.
All STM8A and ST7 microcontrollers are supported by the same tools including
STVD/STVP development environment, the STice emulator anda low-cost, third party incircuit debugging tool.
Doc ID 14952 Rev 69/89
Product line-upSTM8AF61xx, STM8AF62xx
3 Product line-up
²
Table 2.STM8AF62xx product line-up
Medium
Order codePackage
density
Flash
program
memory
(bytes)
RAM
(bytes)
Data EE
(bytes)
10-bit
A/D ch.
Timers
(IC/OC/PWM)
Serial
interfaces
I/0
wakeup
pins
STM8AF/P6268
32 K2 K1 K
LQFP48
STM8AF/P624816 K2 K0.5 K
STM8AF/P6266
(7x7)
32 K2 K1 K
LQFP32
(7x7)
STM8AF/P62268 K2 K384
STM8AF/P6266
32 K2 K1 K71x8-bit: TIM4
VFQFPN32
STM8AF/P624616 K2 K0.5 K
²
Table 3.STM8AF/H61xx product line-up
(1)
Medium
density
Order codePackage
Flash
program
RAM
(bytes)
Data EE
(bytes)
memory
(bytes)
STM8AF/H/P6168
32 K2 K1 K
LQFP48
STM8AF/H/P614816 K1 K0.5 K
STM8AF/H/P6166
(7x7)
32 K2 K1 K
LQFP32
(7x7)
STM8AF/H/P61268 K512384
1. These devices are not recommended for new design.
10
7
10-bit
A/D ch.
10
7
1x8-bit: TIM4
3x16-bit: TIM1,
TIM2, TIM3
(9/9/9)
1x8-bit: TIM4
3x16-bit: TIM1,
TIM2, TIM3
(8/8/8)
3x16-bit: TIM1,
TIM2, TIM3
(8/8/8)
Timers
(IC/OC/PWM)
1x8-bit: TIM4
3x16-bit: TIM1,
TIM2, TIM3
(9/9/9)
1x8-bit: TIM4
3x16-bit: TIM1,
TIM2, TIM3
(8/8/8)
LIN(UART),
SPI, I²C
LIN(UART),
SPI, I²C
LIN(UART),
SPI, I²C
Serial
interfaces
LIN(UART),
SPI, I²C
LIN(UART),
SPI, I²C
38/35
25/23STM8AF/P624616 K2 K0.5 K
25/23
I/0
wakeup
pins
38/35
25/23STM8AF/H/P614616 K1 K0.5 K
10/89Doc ID 14952 Rev 6
STM8AF61xx, STM8AF62xxBlock diagram
XTAL 1 - 16 MHz
RC int. 16 MHz
RC int. 128 kHz
STM8A CORE
Debug/SWIM
I
2
C
SPI
LINUART
16-bit general purpose
AWU tim er
Reset block
Reset
Clock controller
Detector
Clock to peripherals and core
10Mbit/s
16 channels
Window WDG
IWDG
Up to 32 Kbytes
Up to 1 Kbytes
Up to 2 Kbytes
Boot ROM
10-bit ADC
9 CAPCOM
Reset
400 Kbit/s
Master/slave
Single wire
automatic
debug interf.
channels
program
Flash
16-bit advanced control
timer (TIM1)
8-bit basic timer
(TIM4)
data EEPROM
RAM
Up to
Address and data bus
resynchronization
timers (TIM2, TIM3)
POR
BOR
4 Block diagram
Figure 1.STM8A block diagram
1. Legend:
ADC: Analog-to-digital converter
beCAN: Controller area network
BOR: Brownout reset
I²C: Inter-integrated circuit multimaster interface
IWDG: Independent window watchdog
LINUART: Local interconnect network universal asynchronous receiver transmitter
POR: Power on reset
SPI: Serial peripheral interface
SWIM: Single wire interface module
USART: Universal synchronous asynchronous receiver transmitter
Window WDG: Window watchdog
Doc ID 14952 Rev 611/89
Product overviewSTM8AF61xx, STM8AF62xx
5 Product overview
This section is intended to describe the family features that are actually implemented in the
products covered by this datasheet.
For more detailed information on each feature please refer to the STM8S and STM8A
microcontroller families reference manual (RM0016).
5.1 STM8A central processing unit (CPU)
The 8-bit STM8A core is a modern CISC core and has been designed for code efficiency
and performance. It contains 21 internal registers (six directly addressable in each execution
context), 20 addressing modes including indexed indirect and relative addressing and 80
instructions.
5.1.1 Architecture and registers
●Harvard architecture
●3-stage pipeline
●32-bit wide program memory bus with single cycle fetching for most instructions
●X and Y 16-bit index registers, enabling indexed addressing modes with or without
offset and read-modify-write type data manipulations
●8-bit accumulator
●24-bit program counter with 16-Mbyte linear memory space
●16-bit stack pointer with access to a 64 Kbyte stack
●8-bit condition code register with seven condition flags for the result of the last
instruction.
5.1.2 Addressing
●20 addressing modes
●Indexed indirect addressing mode for look-up tables located anywhere in the address
space
●Stack pointer relative addressing mode for efficient implementation of local variables
and parameter passing
5.1.3 Instruction set
●80 instructions with 2-byte average instruction size
●Standard data movement and logic/arithmetic functions
●8-bit by 8-bit multiplication
●16-bit by 8-bit and 16-bit by 16-bit division
●Bit manipulation
●Data transfer between stack and accumulator (push/pop) with direct stack access
●Data transfer using the X and Y registers or direct memory-to-memory transfers
12/89Doc ID 14952 Rev 6
STM8AF61xx, STM8AF62xxProduct overview
5.2 Single wire interface module (SWIM) and debug module (DM)
5.2.1 SWIM
The single wire interface module, SWIM, together with an integrated debug module, permits
non-intrusive, real-time in-circuit debugging and fast memory programming. The interface
can be activated in all device operation modes and can be connected to a running device
(hot plugging).The maximum data transmission speed is 145 bytes/ms.
5.2.2 Debug module
The non-intrusive debugging module features a performance close to a full-flavored
emulator. Besides memory and peripheral operation, CPU operation can also be monitored
in real-time by means of shadow registers.
●R/W of RAM and peripheral registers in real-time
●R/W for all resources when the application is stopped
●Breakpoints on all program-memory instructions (software breakpoints), except the
interrupt vector table
●Two advanced breakpoints and 23 predefined breakpoint configurations
5.3 Interrupt controller
●Nested interrupts with three software priority levels
●21 interrupt vectors with hardware priority
●Five vectors for external interrupts (up to 34 depending on the package)
●Trap and reset interrupts
5.4 Flash program and data EEPROM
●8 Kbytes to 32 Kbytes of medium density single voltage program Flash memory
●Up to 1 Kbytes true (not emulated) data EEPROM
●Read while write: writing in the data memory is possible while executing code in the
Flash program memory
The whole Flash program memory and data EEPROM are factory programmed with 0x00.
5.4.1 Architecture
●The memory is organized in blocks of 128 bytes each
●Read granularity: 1 word = 4 bytes
●Write/erase granularity: 1 word (4 bytes) or 1 block (128 bytes) in parallel
●Writing, erasing, word and block management is handled automatically by the memory
interface.
Doc ID 14952 Rev 613/89
Product overviewSTM8AF61xx, STM8AF62xx
Programmable area
Data
UBC area
Flash program memory area
Data memory area (1 Kbytes)
EEPROM
Remains write protected during IAP
memory
Write access possible for IAP
Option bytes
Flash
program
memory
maximum 32 Kbytes
5.4.2 Write protection (WP)
Write protection in application mode is intended to avoid unintentional overwriting of the
memory. The write protection can be removed temporarily by executing a specific sequence
in the user software.
5.4.3 Protection of user boot code (UBC)
If the user chooses to update the Flash program memory using a specific boot code to
perform in application programming (IAP), this boot code needs to be protected against
unwanted modification.
In the STM8A a memory area of up to 32 Kbytes can be protected from overwriting at user
option level. Other than the standard write protection, the UBC protection can exclusively be
modified via the debug interface, the user software cannot modify the UBC protection status.
The UBC memory area contains the reset and interrupt vectors and its size can be adjusted
in increments of 512 bytes by programming the UBC and NUBC option bytes
(see Section 9: Option bytes on page 41).
Figure 2.Flash memory organization of STM8A products
5.4.4 Read-out protection (ROP)
The STM8A provides a read-out protection of the code and data memory which can be
activated by an option byte setting (see the ROP option byte in section 10).
The read-out protection prevents reading and writing Flash program memory, data memory
and option bytes via the debug module and SWIM interface. This protection is active in all
device operation modes. Any attempt to remove the protection by overwriting the ROP
option byte triggers a global erase of the program and data memory.
The ROP circuit may provide a temporary access for debugging or failure analysis. The
temporary read access is protected by a user defined, 8-byte keyword stored in the option
14/89Doc ID 14952 Rev 6
byte area. This keyword must be entered via the SWIM interface to temporarily unlock the
device.
STM8AF61xx, STM8AF62xxProduct overview
If desired, the temporary unlock mechanism can be permanently disabled by the user
through OPT6/NOPT6 option bytes.
5.5 Clock controller
The clock controller distributes the system clock coming from different oscillators to the core
and the peripherals. It also manages clock gating for low-power modes and ensures clock
robustness.
5.5.1 Features
●Clock sources:
–16 MHz high-speed internal RC oscillator (HSI)
–128 kHz low-speed internal RC (LSI)
–1-16 MHz high-speed external crystal (HSE)
–Up to 16 MHz high-speed user-external clock (HSE user-ext)
●Reset: After reset the microcontroller restarts by default with an internal 2-MHz clock
(16 MHz/8). The clock source and speed can be changed by the application program
as soon as the code execution starts.
●Safe clock switching: Clock sources can be changed safely on the fly in Run mode
through a configuration register. The clock signal is not switched until the new clock
source is ready. The design guarantees glitch-free switching.
●Clock management: To reduce power consumption, the clock controller can stop the
clock to the core or individual peripherals.
●Wakeup: In case the device wakes up from low-power modes, the internal RC
oscillator (16 MHz/8) is used for quick startup. After a stabilization time, the device
switches to the clock source that was selected before Halt mode was entered.
●Clock security system (CSS): The CSS permits monitoring of external clock sources
and automatic switching to the internal RC (16 MHz/8) in case of a clock failure.
●Configurable main clock output (CCO): This feature permits to outputs a clock signal
The register CLK_HSITRIMR with three trimming bits plus one additional bit for the sign
permits frequency tuning by the application program. The adjustment range covers all
possible frequency variations versus supply voltage and temperature. This trimming does
not change the initial production setting.
For reason of compatibility with other devices from the STM8A family, a special mode
with only two trimming bits plus sign can be selected. This selection is controlled
with the HSITRIM0 bit in the option byte registers OPT3 and NOPT3.
The frequency of this clock is 128 kHz and it is independent from the main clock. It drives
the independent watchdog or the AWU wakeup timer.
In systems which do not need independent clock sources for the watchdog counters, the
128 kHz signal can be used as the system clock. This configuration has to be enabled by
setting an option byte (OPT3/OPT3N, bit LSI_EN).
The external high-speed crystal oscillator can be selected to deliver the main clock in
normal Run mode. It operates with quartz crystals and ceramic resonators.
●Frequency range: 1 MHz to 16 MHz
●Crystal oscillation mode: preferred fundamental
●I/Os: standard I/O pins multiplexed with OSCIN, OSCOUT
5.5.5 External clock input
An external clock signal can be applied to the OSCIN input pin of the crystal oscillator. The
frequency range is 0 to 16 MHz.
5.5.6 Clock security system (CSS)
The clock security system protects against a system stall in case of an external crystal clock
failure.
In case of a clock failure an interrupt is generated and the high-speed internal clock (HSI) is
automatically selected with a frequency of 2 MHz (16 MHz/8).
Table 4.Peripheral clock gating bit assignments in CLK_PCKENR1/2 registers
For efficient power management, the application can be put in one of four different low
power 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 peripherals 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 programmable intervals by the auto wake up unit (AWU). The main
voltage regulator is kept powered on, so current consumption is higher than in Activehalt mode with regulator off, but the wakeup time is faster. Wakeup is triggered by the
internal AWU 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
CPU and peripheral clocks are stopped, the main voltage regulator is powered off.
Wakeup is triggered by external event or reset.
In all modes the CPU and peripherals remain permanently powered on, the system clock is
applied only to selected modules. The RAM content is preserved and the brown-out reset
circuit remains activated.
5.7 Timers
5.7.1 Watchdog timers
The watchdog system is based on two independent timers providing maximum security to
the applications. The watchdog timer activity is controlled by the application program or
option bytes. Once the watchdog is activated, it cannot be disabled by the user program
without going through 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 watchdog behavior to match the application
timing perfectly. The application software must refresh the counter before time-out and
during a limited time window. If the counter is refreshed outside this time window, a reset is
issued.
Doc ID 14952 Rev 617/89
Product overviewSTM8AF61xx, STM8AF62xx
Independent watchdog timer
The independent watchdog peripheral can be used to resolve malfunctions due to hardware
or software failures.
It is clocked by the 128 kHz LSI internal RC clock source, and thus stays active even in case
of a CPU clock failure. If the hardware watchdog feature is enabled through the device
option bits, the watchdog is automatically enabled at power-on, and generates a reset
unless the key register is written by software before the counter reaches the end of count.
5.7.2 Auto-wakeup counter
This counter is used to cyclically wakeup the device in Active-halt mode. It can be clocked by
the 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.
5.7.3 Beeper
This function generates a rectangular signal in the range of 1, 2 or 4 kHz which can be
output on a pin. This is useful when audible sounds without interference need to be
generated for use in the application.
5.7.4 Advanced control and general purpose timers
STM8A devices described in this datasheet, contain up to three 16-bit advanced control and
general purpose timers providing nine CAPCOM channels in total. A CAPCOM channel can
be used either as input compare, output compare or PWM channel. These timers are
named TIM1, TIM2 and TIM3.
Table 5.Advanced control and general purpose timers
Timer
TIM116-bitUp/down 1 to 6553643YesYesYesYes
TIM216-bitUp
TIM316-bitUp
Counter
width
Counter
type
Prescaler
factor
n
2
n = 0 to 15
n
2
n = 0 to 15
Channels
3NoneNoNoNoNo
2NoneNoNoNoNo
Inverted
outputs
Repetition
counter
trigger
unit
External
trigger
Break
input
18/89Doc ID 14952 Rev 6
STM8AF61xx, STM8AF62xxProduct overview
TIM1: Advanced control timer
This is a high-end timer designed for a wide range of control applications. With its
complementary outputs, dead-time control and center-aligned PWM capability, the field of
applications is extended to motor control, lighting and bridge driver.
●16-bit up, down and up/down AR (auto-reload) counter with 16-bit fractional prescaler.
●Four independent CAPCOM channels configurable as input capture, output compare,
PWM generation (edge and center aligned mode) and single pulse mode output
●Trigger module which allows the interaction of TIM1 with other on-chip peripherals. In
the present implementation it is possible to trigger the ADC upon a timer event.
●External trigger to change the timer behavior depending on external signals
●Break input to force the timer outputs into a defined state
●Three complementary outputs with adjustable dead time
●Interrupt sources: 4 x input capture/output compare, 1 x overflow/update, 1 x break
TIM2 and TIM3: 16-bit general purpose timers
●16-bit auto-reload up-counter
●15-bit prescaler adjustable to fixed power of two ratios 1…32768
●Timers with three or two individually configurable CAPCOM channels
●Interrupt sources: 2 or 3 x input capture/output compare, 1 x overflow/update
5.7.5 Basic timer
The typical usage of this timer (TIM4) is the generation of a clock tick.
Table 6.TIM4
Timer
TIM48-bitUp
Counter
width
●8-bit auto-reload, adjustable prescaler ratio to any power of two from 1 to 128
●Clock source: master clock
●Interrupt source: 1 x overflow/update
Counter
type
Prescaler
factor
n
2
n = 0 to 7
Channels
Inverted
outputs
Repetition
counter
trigger
unit
External
trigger
0NoneNoNoNoNo
Break
input
Doc ID 14952 Rev 619/89
Product overviewSTM8AF61xx, STM8AF62xx
5.8 Analog-to-digital converter (ADC)
The STM8A products described in this datasheet contain a 10-bit successive approximation
ADC with up to 16 multiplexed input channels, depending on the package.
The ADC name differs between the datasheet and the STM8A/S reference manual (see
Ta bl e 7).
Table 7.ADC naming
Peripheral name in datasheet
Peripheral name in reference manual
(RM0016)
ADCADC1
ADC features
●10-bit resolution
●Single and continuous conversion modes
●Programmable prescaler: f
●Conversion trigger on timer events and external events
●Interrupt generation at end of conversion
●Selectable alignment of 10-bit data in 2 x 8 bit result register
●Shadow registers for data consistency
●ADC input range: V
●
Analog watchdog
●Schmitt-trigger on analog inputs can be disabled to reduce power consumption
●Scan mode (single and continuous)
●Dedicated result register for each conversion channel
●Buffer mode for continuous conversion
SSA
MASTER
≤ VIN ≤ V
Note:An additional AIN12 analog input is not selectable in ADC scan mode or with analog
watchdog. Values converted from AIN12 are stored only into the ADC_DRH/ADC_DRL
registers.
divided by 2 to 18
DDA
5.9 Communication interfaces
The following sections give a brief overview of the communication peripheral. Some
peripheral names differ between the datasheet and the STM8A/S reference manual (see
The devices covered by this datasheet contain one SPI. The SPI is available on all the
supported packages.
●Maximum speed: 10 Mbit/s or f
●Full duplex synchronous transfers
●Simplex synchronous transfers on two lines with a possible bidirectional data line
●Master or slave operation - selectable by hardware or software
●CRC calculation
●1 byte Tx and Rx buffer
●Slave mode/master mode management by hardware or software for both master and
MASTER
slave
●Programmable clock polarity and phase
●Programmable data order with MSB-first or LSB-first shifting
●Dedicated transmission and reception flags with interrupt capability
●SPI bus busy status flag
●Hardware CRC feature for reliable communication:
–CRC value can be transmitted as last byte in Tx mode
–CRC error checking for last received byte
/2 both for master and slave
5.9.2 Inter integrated circuit (I2C) interface
The devices covered by this datasheet contain one I2C interface. The interface is available
on all the supported packages.
2
●I
C master features:
–Clock generation
–Start and stop generation
2
●I
C slave features:
–Programmable I
–Stop bit detection
●Generation and detection of 7-bit/10-bit addressing and general call
●Supports different communication speeds:
–Standard speed (up to 100 kHz),
–Fast speed (up to 400 kHz)
●Status flags:
–Transmitter/receiver mode flag
–End-of-byte transmission flag
2
–I
C busy flag
●Error flags:
–Arbitration lost condition for master mode
–Acknowledgement failure after address/data transmission
–Detection of misplaced start or stop condition
–Overrun/underrun if clock stretching is disabled
2
C address detection
Doc ID 14952 Rev 621/89
Product overviewSTM8AF61xx, STM8AF62xx
●Interrupt:
–Successful address/data communication
–Error condition
–Wakeup from Halt
●Wakeup from Halt on address detection in slave mode
5.9.3 Universal asynchronous receiver/transmitter with LIN support
(LINUART)
The devices covered by this datasheet contain one LINUART interface. The interface is
available on all the supported packages. The LINUART is an asynchronous serial
communication interface which supports extensive LIN functions tailored for LIN slave
applications. In LIN mode it is compliant to the LIN standards rev 1.2 to rev 2.1.
Detailed feature list:
LIN mode
Master mode:
●LIN break and delimiter generation
●LIN break and delimiter detection with separate flag and interrupt source for read back
checking.
Slave mode:
●Autonomous header handling – one single interrupt per valid header
●Mute mode to filter responses
●Identifier parity error checking
●LIN automatic resynchronization, allowing operation with internal RC oscillator (HSI)
clock source
●Break detection at any time, even during a byte reception
●Header errors detection:
–Delimiter too short
–Synch field error
–Deviation error (if automatic resynchronization is enabled)
–Framing error in synch field or identifier field
–Header time-out
22/89Doc ID 14952 Rev 6
STM8AF61xx, STM8AF62xxProduct overview
UART mode
●Full duplex, asynchronous communications - NRZ standard format (mark/space)
●High-precision baud rate generator
–A common programmable transmit and receive baud rates up to f
●Programmable data word length (8 or 9 bits) – 1 or 2 stop bits – parity control
●Separate enable bits for transmitter and receiver
●Error detection flags
●Reduced power consumption mode
●Multi-processor communication - enter mute mode if address match does not occur
●Wakeup from mute mode (by idle line detection or address mark detection)
●Two receiver wakeup modes:
MASTER
/16
–Address bit (MSB)
–Idle line
5.10 Input/output specifications
The product features four different I/O types:
●Standard I/O 2 MHz
●Fast I/O up to 10 MHz
●High sink 8 mA, 2 MHz
●True open drain (I
2
C interface)
To decrease EMI (electromagnetic interference), high sink I/Os have a limited maximum
slew rate. The rise and fall times are similar to those of standard I/Os.
The analog inputs are equipped with a low leakage analog switch. Additionally, the schmitttrigger input stage on the analog I/Os can be disabled in order to reduce the device standby
consumption.
STM8A I/Os are designed to withstand current injection. For a negative injection current of
4
mA, the resulting leakage current in the adjacent input does not exceed 1 µA. Thanks to
this feature, external protection diodes against current injection are no longer required.
O2 = Fast (up to 10 MHz)
O3 = Fast/slow programmability with slow as default state after reset
O4 = Fast/slow programmability with fast as default state after reset
Port and control
configuration
Reset state
Inputfloat = floating, wpu = weak pull-up
OutputT = true open drain, OD = open drain, PP = push pull
Bold X (pin state after reset release).
Unless otherwise specified, the pin state is the same during the reset phase (i.e.
“under reset”) and after internal reset release (i.e. at reset state).
1. Refer to Table 9 for the definition of the abbreviations.
2. Reset state is shown in bold.
3. In Halt/Active-halt mode this pad behaves in the following way:
4. On this pin, a pull-up resistor as specified in Table 37. I/O static characteristics is enabled during the reset phase of the
5. AIN12 is not selectable in ADC scan mode or with analog watchdog.
6. In the open-drain output column, ‘T’ defines a true open-drain I/O (P-buffer, week pull-up, and protection diode to V
7. The PD1 pin is in input pull-up during the reset phase and after reset release.
8. If this pin is configured as interrupt pin, it will trigger the TLI.
PD6/
LINUART_RX
(8)
- the input/output path is disabled
- if the HSE clock is used for wakeup, the internal weak pull up is disabled
- if the HSE clock is off, internal weak pull up setting from corresponding OR bit is used
By managing the OR bit correctly, it must be ensured that the pad is not left floating during Halt/Active-halt.
product.
not implemented)
I/O XXX -O1XXPort D6
I/O XXX -O1XXPort D7 Top level interrupt—
LINUART
data
receive
—
DD
are
6.2 Alternate function remapping
As shown in the rightmost column of Ta b le 10, some alternate functions can be remapped at
different I/O ports by programming one of eight AFR (alternate function remap) option bits.
Refer to
default alternate function is no longer available.
To use an alternate function, the corresponding peripheral must be enabled in the peripheral
registers.
Alternate function remapping does not effect GPIO capabilities of the I/O ports (see the
GPIO section of the STM8S and STM8A microcontroller families reference manual,
RM0016).
Section 9: Option bytes on page 41. When the remapping option is active, the
28/89Doc ID 14952 Rev 6
STM8AF61xx, STM8AF62xxMemory and register map
Up to 1 Kbyte data EEPROM
HW registers
CPU/SWIM/Debug/ITC registers
IT vectors
Up to 32 Kbytes of
00 0000
RAM end
00 4000
00 4800
00 5000
00 581D
00 6000
00 6800
00 7F00
00 8000
Flash Program memory end
00 8080
Reserved
Reserved
stack
Up to 2 Kbytes RAM
00 4400
Reserved
Option bytes
00 4900
Reserved
2 Kbytes of Boot ROM
Flash program memory
7 Memory and register map
7.1 Memory map
Figure 5.Register and memory map of STM8A products
Table 11.Memory model for the devices covered in this datasheet
Flash program
memory size
Flash program
memory end
address
RAM size
RAM end
address
32K0x00 0FFFF
8K0x00 09FFF
Doc ID 14952 Rev 629/89
2K0x00 07FF0x00 060016K0x00 0BFFF
Stack roll-over
address
Memory and register mapSTM8AF61xx, STM8AF62xx
7.2 Register map
In this section the memory and register map of the devices covered by this datasheet is
described. For a detailed description of the functionality of the registers, refer to the
reference manual RM0016.
Table 12.I/O port hardware register map
AddressBlockRegister labelRegister name
0x00 5000
PA_ODRPort A data output latch register0x00
Reset
status
0x00 5001PA_IDRPort A input pin value register0xXX
0x00 5002PA_DDRPort A data direction register0x00
Por t A
0x00 5003PA_CR1Port A control register 10x00
0x00 5004PA_CR2Port A control register 20x00
0x00 5005
PB_ODRPort B data output latch register0x00
0x00 5006PB_IDRPort B input pin value register0xXX
0x00 5007PB_DDRPort B data direction register0x00
Por t B
0x00 5008PB_CR1Port B control register 10x00
0x00 5009PB_CR2Port B control register 20x00
0x00 500A
PC_ODRPort C data output latch register0x00
0x00 500BPB_IDRPort C input pin value register0xXX
0x00 500CPC_DDRPort C data direction register0x00
Por t C
0x00 500DPC_CR1Port C control register 10x00
0x00 500EPC_CR2Port C control register 20x00
0x00 500F
PD_ODRPort D data output latch register0x00
0x00 5010PD_IDRPort D input pin value register0xXX
0x00 5011PD_DDRPort D data direction register0x00
Por t D
0x00 5012PD_CR1Port D control register 10x02
(1)
(1)
(1)
(1)
0x00 5013PD_CR2Port D control register 20x00
0x00 5014
PE_ODRPort E data output latch register0x00
0x00 5015PE_IDRPort E input pin value register0xXX
0x00 5016PE_DDRPort E data direction register0x00
Por t E
0x00 5017PE_CR1Port E control register 10x00
0x00 5018PE_CR2Port E control register 20x00
0x00 5019
PF_ODRPort F data output latch register0x00
0x00 501APF_IDRPort F input pin value register0xXX
0x00 501BPF_DDRPort F data direction register0x00
Por t F
0x00 501CPF_CR1Port F control register 10x00
0x00 501DPF_CR2Port F control register 20x00
30/89Doc ID 14952 Rev 6
(1)
(1)
STM8AF61xx, STM8AF62xxMemory and register map
Table 12.I/O port hardware register map (continued)
AddressBlockRegister labelRegister name
0x00 501E
PG_ODRPort G data output latch register0x00
0x00 501FPG_IDRPort G input pin value register0xXX
0x00 5020PG_DDRPort G data direction register0x00
Por t G
0x00 5021PG_CR1Port G control register 10x00
0x00 5022PG_CR2Port G control register 20x00
1. Depends on the external circuitry.
Table 13.General hardware register map
AddressBlockRegister labelRegister name
0x00 505A
FLASH_CR1Flash control register 10x00
status
0x00 505BFLASH_CR2Flash control register 20x00
0x00 505CFLASH_NCR2Flash complementary control register 20xFF
3MISCExt interrupt E00x00 8014YesPort A interrupts
4MISCExt interrupt E10x00 8018YesPort B interrupts
5MISCExt interrupt E20x00 801CYesPort C interrupts
6MISCExt interrupt E30x00 8020YesPort D interrupts
7MISCExt interrupt E40x00 8024YesPort E interrupts
8Reserved
9Reserved
(1)
(1)
————
————
10SPIEnd of transfer0x00 8030Yes—
11Timer 1
Update/overflow/
trigger/break
0x00 8034——
12Timer 1Capture/compare0x00 8038——
13Timer 2Update/overflow0x00 803C——
14Timer 2Capture/compare0x00 8040——
15Timer 3Update/overflow0x00 8044——
16Timer 3Capture/compare0x00 8048——
17Reserved
18Reserved
2
19I
C I
(1)
(1)
2
C interrupts0x00 8054Yes—
————
————
20LINUARTTx complete/error0x00 8058——
21LINUARTReceive data full reg.0x00 805C——
22ADCEnd of conversion0x00 8060——
23Timer 4Update/overflow0x00 8064——
24EEPROM
1. All reserved and unused interrupts must be initialized with ‘IRET’ for robust programming.
End of Programming/
Write in not allowed area
40/89Doc ID 14952 Rev 6
0x00 8068——
STM8AF61xx, STM8AF62xxOption bytes
9 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. Each option
byte has to be stored twice, for redundancy, in a regular form (OPTx) and a complemented
one (NOPTx), except for the ROP (read-out protection) option byte and option bytes 8 to 16.
Option bytes can be modified in ICP mode (via SWIM) by accessing the EEPROM address
shown in
Option bytes can also be modified ‘on the fly’ by the application in IAP mode, except the
ROP and UBC options that can only be toggled in ICP mode (via SWIM).
Refer to the STM8 Flash programming manual (PM0051) and STM8 SWIM communication
protocol and debug module user manual (UM0470) for information on SWIM programming
procedures.
Table 17.Option bytes
Ta bl e 17: Option bytes below.
Addr.
0x00
4800
0x00
4801
0x00
4802
0x00
4803
0x00
4804
0x00
4805
0x00
4806
0x00
4807
0x00
4808
0x00
4809
0x00
480A
Option
name
Read-out
protection
(ROP)
User boot
code
(UBC)
Alternate
function
remapping
(AFR)
Watchdog
option
Clock
option
HSE clock
startup
Option
byte no.
OPT0ROP[7:0]0x00
OPT1ReservedUBC[5:0]0x00
NOPT1ReservedNUBC[5:0]0xFF
OPT2AFR7AFR6AFR5AFR4AFR3AFR2AFR1AFR00x00
NOPT2
OPT3Reserved
NOPT3Reserved
OPT4Reserved
NOPT4Reserved
OPT5HSECNT[7:0]0x00
NOPT5NHSECNT[7:0]0xFF
765 4 3 2 1 0
NAFR7NAFR6NAFR5NAFR4NAFR3NAFR2NAFR1NAFR
Option bitsFactory
0
16MHZ
TRIM0
N16MHZ
TRIM0
LSI
_EN
NLSI
_EN
EXT
CLK
NEXT
CLK
IWDG
_HW
NIWDG
_HW
CKAWU
SEL
NCKAW
USEL
WWDG
_HW
NWWD
G_HW
PRSC1PRS
NPR
SC1
WWDG
_HALT
NWWG
_HALT
C0
NPR
SC0
default
setting
0xFF
0x00
0xFF
0x00
0xFF
Doc ID 14952 Rev 641/89
Option bytesSTM8AF61xx, STM8AF62xx
Table 17.Option bytes (continued)
Addr.
0x00
480B
0x00
480C
0x00
480D
0x00
480E
0x00
480F
0x00
4810
0x00
4811
0x00
4812
0x00
4813
0x00
4814
0x00
4815
Option
name
TMU
Flash wait
states
TMU
Option
byte no.
765 4 3 2 1 0
Option bitsFactory
default
setting
OPT6TMU[3:0]0x00
NOPT6NTMU[3:0]0xFF
OPT7Reserved
NOPT7Reserved
WAIT
STATE
NWAIT
STATE
0x00
0xFF
Reserved
OPT8TMU_KEY 1 [7:0]0x00
OPT9TMU_KEY 2 [7:0]0x00
OPT10TMU_KEY 3 [7:0]0x00
OPT11TMU_KEY 4 [7:0]0x00
OPT12TMU_KEY 5 [7:0]0x00
OPT13TMU_KEY 6 [7:0]0x00
0x00
4816
0x00
4817
0x00
4818
OPT14TMU_KEY 7 [7:0]0x00
OPT15TMU_KEY 8 [7:0]0x00
OPT16TMU_MAXATT [7:0]0xC7
0x00
4819
to
Reserved
487D
0x00
487E
0x00
Boot-
loader
487F
1. This option consists of two bytes that must have a complementary value in order to be valid. If the option is invalid, it has no
effect on EMC reset.
OPT17BL [7:0]0x00
(1)
NOPT17NBL[7:0]0xFF
42/89Doc ID 14952 Rev 6
STM8AF61xx, STM8AF62xxOption bytes
Table 18.Option byte description
Option byte no.Description
ROP[7:0]: Memory readout protection (ROP)
0xAA: Enable readout protection (write access via SWIM protocol)
OPT0
OPT1
OPT2
Note: Refer to the STM8S and STM8A microcontrollerfamilies reference
manual (RM0016) section on Flash/EEPROM memory readout
protection for details.
UBC[5: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 to 0x3F: Pages 4 to 63 defined as UBC, memory write-protected
Note: Refer to the STM8S and STM8A microcontrollerfamilies reference
manual (RM0016) section on Flash/EEPROM write protection for more
details.
AFR7: Alternate function remapping option 7
0: Port D4 alternate function = TIM2_CH1
1: Port D4 alternate function = BEEP
AFR6: Alternate function remapping option 6
0: Port B5 alternate function = AIN5, port B4 alternate function = AIN4
1: Port B5 alternate function = I
2
C_SDA, port B4 alternate function =
I2C_SCL.
AFR5: Alternate function remapping option 5
0: Port B3 alternate function = AIN3, port B2 alternate function = AIN2,
port B1 alternate function = AIN1, port B0 alternate function = AIN0.
1: Port B3 alternate function = TIM1_ETR, port B2 alternate function =
TIM1_CH3N, port B1 alternate function = TIM1_CH2N, port B0 alternate
function = TIM1_CH1N.
AFR4: Alternate function remapping option 4
Reserved, bit must be kept at "0"
AFR3: Alternate function remapping option 3
0: Port D0 alternate function = TIM3_CH2
1: Port D0 alternate function = TIM1_BKIN
AFR2: Alternate function remapping option 2
0: Port D0 alternate function = TIM3_CH2
1: Port D0 alternate function = CLK_CCO
Note: AFR2 option has priority over AFR3 if both are activated
AFR1: Alternate function remapping option 1
0: Port A3 alternate function = TIM2_CH3, port D2 alternate function
TIM3_CH1.
1: Port A3 alternate function = TIM3_CH1, port D2 alternate function
TIM2_CH3.
AFR0: Alternate function remapping option 0
0: Port D3 alternate function = TIM2_CH2
1: Port D3 alternate function = ADC_ETR
Doc ID 14952 Rev 643/89
Option bytesSTM8AF61xx, STM8AF62xx
Table 18.Option byte description (continued)
Option byte no.Description
HSITRIM: Trimming option for 16 MHz internal RC oscillator
0: 3-bit on-the-fly trimming (compatible with devices based on the 128K
silicon)
1: 4-bit on-the-fly trimming
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
OPT3
IWDG_HW: Independent watchdog
0: IWDG independent watchdog activated by software
1: IWDG independent watchdog activated 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 active
EXTCLK: External clock selection
0: External crystal connected to OSCIN/OSCOUT
1: External clock signal on OSCIN
CKAWUSEL:Auto-wakeup unit/clock
0: LSI clock source selected for AWU
OPT4
OPT5
OPT6
OPT7Reserved
OPT8
OPT9
OPT10
OPT11
1: HSE clock with prescaler selected as clock source for AWU
PRSC[1:0]: AWU clock prescaler
00: Reserved
01: 16 MHz to 128 kHz prescaler
10: 8 MHz to 128 kHz prescaler
11: 4 MHz to 128 kHz prescaler
HSECNT[7:0]:HSE crystal oscillator stabilization time
This configures the stabilization time to 0.5, 8, 128, and 2048 HSE
cycles with corresponding option byte values of 0xE1, 0xD2, 0xB4, and
0x00.
TMU[3:0]: Enable temporary memory unprotection
0101: TMU disabled (permanent ROP).
Any other value: TMU enabled.
TMU_KEY 1 [7:0]: Temporary unprotection key 0
Temporary unprotection key: Must be different from 0x00 or 0xFF
TMU_KEY 2 [7:0]: Temporary unprotection key 1
Temporary unprotection key: Must be different from 0x00 or 0xFF
TMU_KEY 3 [7:0]: Temporary unprotection key 2
Temporary unprotection key: Must be different from 0x00 or 0xFF
TMU_KEY 4 [7:0]: Temporary unprotection key 3
Temporary unprotection key: Must be different from 0x00 or 0xFF
44/89Doc ID 14952 Rev 6
STM8AF61xx, STM8AF62xxOption bytes
Table 18.Option byte description (continued)
Option byte no.Description
OPT12
OPT13
OPT14
OPT15
OPT16
OPT17
TMU_KEY 5 [7:0]: Temporary unprotection key 4
Temporary unprotection key: Must be different from 0x00 or 0xFF
TMU_KEY 6 [7:0]: Temporary unprotection key 5
Temporary unprotection key: Must be different from 0x00 or 0xFF
TMU_KEY 7 [7:0]: Temporary unprotection key 6
Temporary unprotection key: Must be different from 0x00 or 0xFF
TMU_KEY 8 [7:0]: Temporary unprotection key 7
Temporary unprotection key: Must be different from 0x00 or 0xFF
TMU_MAXATT [7:0]: TMU access failure counter
TMU_MAXATT can be initialized with the desired value only if TMU is
disabled (TMU[3:0]=0101 in OPT6 option byte).
When TMU is enabled, any attempt to temporary remove the readout
protection by using wrong key values increments the counter.
When the option byte value reaches 0x08, the Flash memory and data
EEPROM are erased.
BL [7:0]: Bootloader enable
If this option byte is set to 0x55 (complementary value 0xAA) the
bootloader program is activated also in case of a programmed code
memory
(for more details, see the bootloader user manual, UM0560).
Doc ID 14952 Rev 645/89
Electrical characteristicsSTM8AF61xx, STM8AF62xx
50 pF
STM8A pin
10 Electrical characteristics
10.1 Parameter conditions
Unless otherwise specified, all voltages are referred 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
T
(given by the selected temperature range).
Amax
Data based on characterization results, design simulation and/or technology characteristics
are indicated in the table footnotes and are not tested in production.
10.1.2 Typical values
= -40 °C, TA = 25 °C, and TA =
A
Unless otherwise specified, typical data are based on TA = 25 °C, V
given 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 temperature range
10.1.3 Typical curves
Unless otherwise specified, all typical curves are given only as design guidelines and are
not tested.
10.1.4 Loading capacitor
The loading conditions used for pin parameter measurement are shown in Figure 6.
Figure 6.Pin loading conditions
= 5.0 V. They are
DD
.
46/89Doc ID 14952 Rev 6
STM8AF61xx, STM8AF62xxElectrical characteristics
V
IN
STM8A pin
10.1.5 Pin input voltage
The input voltage measurement on a pin of the device is described in Figure 7.
Figure 7.Pin input voltage
10.2 Absolute maximum ratings
Stresses above those listed as ‘absolute maximum ratings’ may cause permanent damage
to the device. This is a stress rating only and functional operation of the device under these
conditions is not implied. Exposure to maximum rating conditions for extended periods may
affect device reliability.
Table 19.Voltage characteristics
SymbolRatingsMinMaxUnit
V
DDx
- V
Supply voltage (including V
SS
DDA and VDDIO
Input voltage on true open drain pins (PE1, PE2)
V
IN
|V
- VDD| Variations between different power pins-50
DDx
- VSS| Variations between all the different ground pins-50
|V
SSx
Input voltage on any other pin
(2)
(1)
)
(2)
-0.36.5V
V
SS
V
SS
- 0.3
- 0.3V
DD
6.5
+ 0.3
see Absolute maximum ratings
V
ESD
Electrostatic discharge voltage
(electrical sensitivity) on
page 72
1. All power (VDD, V
external power supply
2. I
must never be exceeded. This is implicitly insured if VIN maximum is respected. If VIN maximum
INJ(PIN)
cannot be respected, the injection current must be limited externally to the I
injection is induced by V
pads, there is no positive injection current, and the corresponding VIN maximum must always be respected
DDIO
, V
) and ground (VSS, V
DDA
> VDD while a negative injection is induced by V
IN
SSIO
, V
) pins must always be connected to the
SSA
value. A positive
INJ(PIN)
< VSS. For true open-drain
IN
V
mV
Doc ID 14952 Rev 647/89
Electrical characteristicsSTM8AF61xx, STM8AF62xx
Table 20.Current characteristics
SymbolRatings Max.Unit
I
VDDIO
I
VSSIO
Total current into V
Total current out of V
power lines (source)
DDIO
ground lines (sink)
SS IO
Output current sunk by any I/O and control pin20
I
IO
I
I
1. All power (VDD, V
(4)
INJ(PIN)
INJ(TOT)
external supply.
Output current source by any I/Os and control pin-20
Injected current on any pin±10
Sum of injected currents50
, V
DDIO
) and ground (VSS, V
DDA
SSIO
, V
SSA
2. The total limit applies to the sum of operation and injected currents.
3. V
4. This conditionis implicitly insured if VIN maximum is respected. If VIN maximum cannot be respected, the
Table 21.Thermal characteristics
includes the sum of the positive injection currents. V
DDIO
currents.
injection current must be limited externally to the I
while a negative injection is induced by V
current allowed and the corresponding VIN maximum must always be respected.
< VSS. For true open-drain pads, there is no positive injection
IN
value. A positive injection is induced by V
INJ(PIN)
SymbolRatings ValueUnit
(1)(2)(3)
(1)(2)(3)
100
100
) pins must always be connected to the
includes the sum of the negative injection
SSIO
IN
mA
> VDD
T
STG
T
J
Table 22.Operating lifetime
Storage temperature range−65 to 150
Maximum junction temperature160
(1)
SymbolRatings ValueUnit
−40 to 125 °CGrade 1
OLFConforming to AEC-Q100 rev G
−40 to 150 °CGrade 0
1. For detailed mission profile analysis, please contact your local ST Sales Office.
°C
48/89Doc ID 14952 Rev 6
STM8AF61xx, STM8AF62xxElectrical characteristics
10.3 Operating conditions
Table 23.General operating conditions
SymbolParameter ConditionsMinMaxUnit
f
CPU
V
DD/VDDIO
V
CAP
Internal CPU clock frequencyTA = -40 °C to 150 °C016MHz
Standard operating voltage -3.05.5V
C
: capacitance of external
EXT
capacitor
(1)
ESR of external capacitor
at 1 MHz
(2)
4703300nF
-0.3
ESL of external capacitor-15nH
LQFP32-85
P
D
Power dissipation (all
temperature ranges)
LQFP48-88
Suffix A
85
Suffix B105
T
A
Ambient temperature
Suffix C125
Suffix D
(3)
150
-40
Suffix A90
Suffix B110
T
J
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 V
3. Available on STM8AF62xx devices only.
Junction temperature range
Suffix C130
Suffix D
parameters is given by design of internal regulator.
CAP
(3)
155
Ω
mWVFQFPN32-200
°C
Doc ID 14952 Rev 649/89
Electrical characteristicsSTM8AF61xx, STM8AF62xx
f
CPU
[MHz]
Supply voltage [V]
24
12
8
4
0
3.04.05.0
Functionality
Functionality guaranteed
@ T
A
-40 to 150 °C
not guaranteed
in this area
16
5.5
Figure 8.f
1. This figure is valid only for STM8AF62xx devices.
Table 24.Operating conditions at power-up/power-down
CPUmax
versus V
DD
SymbolParameterConditionsMin
(1)
2
(1)
2
t
VDD
VDD rise time rate-
VDD fall time rate-
Reset release delayVDD rising-3-ms
t
TEMP
V
IT+
V
IT-
V
HYS(BOR)
1. Guaranteed by design, not tested in production
2. If VDD is below 3 V, the code execution is guaranteed above the V
kept. The EEPROM programming sequence must not be initiated.
Reset generation delayV
Power-on reset
threshold
(2)
Brown-out reset
threshold
Brown-out reset
hysteresis
falling-3-µs
DD
-2.652.82.95
-2.582.732.88
--
and V
IT-
Typ
MaxUnit
-∞
-∞
(1)
70
thresholds. RAM content is
IT+
-mV
µs/V
V
50/89Doc ID 14952 Rev 6
STM8AF61xx, STM8AF62xxElectrical characteristics
C
Rleak
ESRESL
10.3.1 VCAP external capacitor
Stabilization for the main regulator is achieved connecting an external capacitor C
V
CAP
pin. C
is specified in Ta bl e 23. Care should be taken to limit the series inductance
EXT
to less than 15 nH.
Figure 9.External capacitor C
1. Legend: ESR is the equivalent series resistance and ESL is the equivalent inductance.
EXT
10.3.2 Supply current characteristics
The current consumption is measured as described in Figure 6 on page 46 and Figure 7 on
page 47.
If not explicitly stated, general conditions of temperature and voltage apply.
Table 25.Total current consumption in Run, Wait and Slow mode.
General conditions for V
SymbolParameterConditionsTypMax Unit
All peripherals
Supply
(1)
I
DD(RUN)
current in
Run mode
Supply
(1)
I
DD(RUN)
current in
Run mode
Supply
(1)
I
DD(WFI)
current in
Wait mode
Supply
I
DD(SLOW)
(1)
current in
Slow mode
1. The current due to I/O utilization is not taken into account in these values.
2. Values not tested in production. Design guidelines only.
clocked, code
executed from Flash
program memory,
HSE external clock
(without resonator)
All peripherals
clocked, code
executed from RAM
and EEPROM, HSE
external clock
(without resonator)
CPU stopped, all
peripherals off, HSE
external clock
scaled down,
f
CPU
all peripherals off,
code executed from
RAM
apply, TA = −40 to 150 °C
DD
= 16 MHz7.414
f
CPU
= 8 MHz4.0
f
CPU
f
= 4 MHz2.4
CPU
f
= 2 MHz1.52.5
CPU
= 16 MHz3.75.0
f
CPU
= 8 MHz2.2
f
CPU
f
= 4 MHz1.4
CPU
f
= 2 MHz1.01.5
CPU
f
= 16 MHz1.652.5
CPU
= 8 MHz1.15
f
CPU
f
= 4 MHz0.90
CPU
f
= 2 MHz0.801.5
CPU
Ext. clock 16 MHz
= 125 kHz
f
CPU
LSI internal RC
= 128 kHz
f
CPU
7.4
4.1
3.0
2.0
1.9
1.6
1.501.95
1.50
1.80
(2)
(2)
(2)
(2)
(2)
(2)
(2)
EXT
to the
mA
Doc ID 14952 Rev 651/89
Electrical characteristicsSTM8AF61xx, STM8AF62xx
Table 26.Total current consumption in Halt and Active-halt modes.
General conditions for V
apply, TA = −40 to 55 °C
DD
Conditions
SymbolParameter
Main
voltage
regulator
(1)
(MVR)
Flash
mode
Clock source and
(2)
temperature
condition
specific
Clocks stopped5
I
DD(H)
Supply current in Halt mode Off
Power-
down
Clocks stopped,
TA = 25 °C
Ext. clock 16 MHz
Supply current in Active-halt
mode with regulator on
On
Power-
down
f
MASTER
= 125 kHz
LSI clock 128 kHz150
I
DD(AH)
Supply current in Active-halt
mode with regulator off
Off
Power-
down
LSI clock 128 kHz25
LSI clock 128 kHz,
TA = 25 °C
t
WU(AH)
Wakeup time from Activehalt mode with regulator on
Wakeup time from Activehalt mode with regulator off
On
Operating
mode
= -40 to 150 °C
T
A
Off50
TypMax Unit
(3)
35
525
770
900
(3)
µA
(3)
230
(3)
42
2530
10
30
(3)
µs
(3)
80
1. Configured by the REGAH bit in the CLK_ICKR register.
2. Configured by the AHALT bit in the FLASH_CR1 register.
3. Data based on characterization results. Not tested in production.
Current consumption for on-chip peripherals
Table 27.Oscillator current consumption
SymbolParameterConditionsTyp
Quartz or
I
DD(OSC)
I
DD(OSC)
1. During startup, the oscillator current consumption may reach 6 mA.
2. The supply current of the oscillator can be further optimized by selecting a high quality resonator with small
Rm value. Refer to crystal manufacturer for more details
3. Informative data.
HSE oscillator current
consumption
HSE oscillator current
consumption
(2)
(2)
ceramic
resonator,
CL = 33 pF
= 5 V
V
DD
Quartz or
ceramic
resonator,
CL = 33 pF
= 3.3 V
V
DD
= 24 MHz12.0
f
OSC
f
= 16 MHz0.6-
OSC
f
= 8 MHz0.57-
OSC
f
= 24 MHz0.51.0
OSC
f
= 16 MHz0.25-
OSC
= 8 MHz0.18-
f
OSC
Max
(3)
(3)
(1)
Unit
mA
52/89Doc ID 14952 Rev 6
STM8AF61xx, STM8AF62xxElectrical characteristics
0
1
2
3
4
5
6
7
8
9
10
2.533.544.555.56
V
DD
[V]
I
DD(RUN)HSE
[mA]
25°C
85°C
12 5 °C
0
1
2
3
4
5
6
7
8
9
10
05101 5202530
fcpu [MHz]
I
DD(RUN)HSE
[mA]
25°C
85°C
12 5 °C
Table 28.Programming current consumption
SymbolParameterConditionsTypMaxUnit
VDD = 5 V, -40 °C to 150 °C,
I
DD(PROG)
Table 29.Typical peripheral current consumption VDD = 5.0 V
Programming current
erasing and programming data
or Flash program memory
1.01.7mA
(1)
f
SymbolParameter
I
DD(TIM1)
I
DD(TIM2)
I
DD(TIM3)
I
DD(TIM4)
I
DD(LINUART)
I
DD(SPI)
I
DD(I2C)
I
DD(AWU)
I
DD(TOT_DIG)
I
DD(ADC)
1. Typical values not tested in production. Since the peripherals are powered by an internally regulated,
constant digital supply voltage, the values are similar in the full supply voltage range.
2. Data based on a differential IDD measurement between no peripheral clocked and a single active
peripheral. This measurement does not include the pad toggling consumption.
TIM1 supply current
TIM2 supply current
TIM3 supply current
TIM4 supply current
LINUART supply current
SPI supply current
I2C supply current
AWU supply current
All digital peripherals on0.221
ADC supply current when
converting
(3)
(2)
(2)
(2)
(2)
(2)
(2)
(2)
(2)
Typ.
2 MHz
0.030.23
0.020.12
0.010.1
0.0040.03
0.030.11
0.010.04
0.020.06
0.0030.02
0.930.95
master
=
Typ. f
master
=
16 MHz
3. Data based on a differential IDD measurement between reset configuration and continuous A/D
conversions.
Current consumption curves
Unit
mA
Figure 10 to Figure 15 show typical current consumption measured with code executing in
RAM.
Figure 10. Typ. I
DD(RUN)HSE
@f
= 16 MHz, peripheral = on
CPU
vs. VDD
Figure 11. Typ. I
DD(RUN)HSE
vs. f
CPU
@ VDD = 5.0 V, peripheral = on
Doc ID 14952 Rev 653/89
Electrical characteristicsSTM8AF61xx, STM8AF62xx
0
1
2
3
4
2.53.54.55.56.5
VDD [V]
IDD(RUN)HSI [mA]
25°C
85°C
125°C
0
1
2
3
4
5
6
2.53.54.55.56.5
VDD [V]
IDD(WFI)HSE [mA]
25°C
85°C
125°C
0
1
2
3
4
5
6
051015202530
fcpu [MHz]
I
DD(WFI)HSE
[mA]
25°C
85°C
12 5 °C
0
0.5
1
1.5
2
2.5
2.533.544. 555.56
V
DD
[V]
I
DD(WFI)HSI
[mA]
25°C
85°C
12 5 °C
Figure 12. Typ. I
@ f
CPU
Figure 14. Typ. I
@ VDD = 5.0 V, peripheral = on
DD(RUN)HSI
vs. VDD
= 16 MHz, peripheral = off
DD(WFI)HSE
vs. f
CPU
Figure 13. Typ. I
@ f
CPU
Figure 15. Typ. I
@ f
CPU
DD(WFI)HSE
vs. V
DD
= 16 MHz, peripheral = on
DD(WFI)HSI
vs. V
DD
= 16 MHz, peripheral = off
10.3.3 External clock sources and timing characteristics
HSE user external clock
Subject to general operating conditions for VDD and TA.
Table 30.HSE user external clock characteristics
SymbolParameterConditionsMinTypMaxUnit
f
HSE_ext
V
HSEdHL
V
HSEH
V
HSEL
I
LEAK_HSE
1. In CSS is used, the external clock must have a frequency above 500 kHz.
54/89Doc ID 14952 Rev 6
User external clock source
frequency
TA is -40 to
150 °C
Comparator hysteresis-0.1 x V
OSCIN input pin high level
voltage
OSCIN input pin low level
voltage
OSCIN input leakage
current
V
-0.7 x V
-V
< V
IN
< V
DD
SS
(1)
0
DD
DD
SS
-16MHz
--
-V
-0.3 x V
DD
DD
-1-+1µA
V
STM8AF61xx, STM8AF62xxElectrical characteristics
OSCIN
f
HSE
External clock
STM8A
source
V
HSEL
V
HSEH
OSCOUT
OSCIN
f
HSE
to core
C
L1
C
L2
R
F
STM8A
Resonator
Current control
g
m
R
m
C
m
L
m
C
O
Resonator
Figure 16. HSE external clock source
HSE crystal/ceramic resonator oscillator
The HSE clock can be supplied using a crystal/ceramic resonator oscillator of up to 16 MHz.
All the information given in this paragraph is based on characterization results with specified
typical external components. In the application, the resonator and the load capacitors have
to be placed as close as possible to the oscillator pins in order to minimize output distortion
and startup stabilization time. Refer to the crystal resonator manufacturer for more details
(frequency, package, accuracy...).
Table 31.HSE oscillator characteristics
SymbolParameterConditionsMinTypMaxUnit
R
F
C
L1/CL2
g
m
t
SU(HSE)
1. The oscillator needs two load capacitors, CL1 and CL2, to act as load for the crystal. The total load capacitance (C
(C
* CL2)/(CL1 + CL2). If CL1 = CL2, C
L1
2. This value is the startup time, measured from the moment it is enabled (by software) until a stabilized 16 MHz oscillation is
reached. It can vary with the crystal type that is used.
Feedback resistor--220-kΩ
(1)
Recommended load capacitance---20pF
Oscillator transconductance-5--mA/V
is
(2)
Startup time
= CL1 / 2. Some oscillators have built-in load capacitors, CL1 and CL2.
load
V
DD
stabilized
-2.8 -ms
load
) is
Figure 17. HSE oscillator circuit diagram
Doc ID 14952 Rev 655/89
Electrical characteristicsSTM8AF61xx, STM8AF62xx
gmg
mcrit
»
g
mcrit
2Π×HSE
f
×()
2
Rm×2Co C+()
2
=
HSE oscillator critical gm formula
The crystal characteristics have to be checked with the following formula:
where g
can be calculated with the crystal parameters as follows:
mcrit
Rm: Notional resistance (see crystal specification)
: Notional inductance (see crystal specification)
L
m
: Notional capacitance (see crystal specification)
C
m
Co: Shunt capacitance (see c
= C
C
L1
= C: Grounded external capacitance
L2
rystal specification)
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 32.HSI oscillator characteristics
SymbolParameterConditionsMinTypMaxUnit
f
HSI
ACC
t
su(HSI)
1. Depending on option byte setting (OPT3 and NOPT3)
2. Guaranteed by characterization, not tested in production
Frequency -16-MHz
HSI oscillator user
trimming accuracy
HS
HSI oscillator accuracy
(factory calibrated)
Trimmed by the application
for any V
and TA
DD
conditions
V
= 3.0 V ≤ VDD ≤ 5.5 V,
DD
-40 °C ≤ T
≤ 150 °C
A
HSI oscillator wakeup time--2
(1)
-1
-0.5
(1)
-1
-0.5
-5-5
(1)
(2)
(1)
%
µs
56/89Doc ID 14952 Rev 6
STM8AF61xx, STM8AF62xxElectrical characteristics
-3%
-2%
-1%
0%
1%
2%
3%
2.533.544.555.56
V
DD
[V]
HSI frequency variation [%]
-40°C
25°C
85°C
-3%
-2%
-1%
0%
1%
2%
3%
2.533.544.555.56
V
DD
[V]
LSI frequency variation [%]
Figure 18. Typical HSI frequency vs V
DD
Low speed internal RC oscillator (LSI)
Subject to general operating conditions for VDD and TA.
Table 33.LSI oscillator characteristics
125°C
SymbolParameterConditionsMinTypMaxUnit
f
LSI
t
su(LSI)
1. Data based on characterization results, not tested in production.
Figure 19. Typical LSI frequency vs V
Frequency -112128144kHz
LSI oscillator wakeup time ---7
DD
(1)
25°C
µs
Doc ID 14952 Rev 657/89
Electrical characteristicsSTM8AF61xx, STM8AF62xx
10.3.5 Memory characteristics
Flash program memory/data EEPROM memory
General conditions: TA = -40 to 150 °C.
Table 34.Flash program memory/data EEPROM memory
SymbolParameter ConditionsMinTypMaxUnit
V
DD
V
DD
Operating voltage
(all modes, execution/write/erase)
Operating voltage
(code execution)
f
is 0 to 16 MHz
CPU
with 0 ws
f
is 0 to 16 MHz
CPU
with 0 ws
3.0-5.5
2.6-5.5
Standard programming time
(including erase) for byte/word/block
t
prog
(1 byte/4 bytes/128 bytes)
Fast programming time for 1 block
(128 bytes)
t
erase
Table 35.Flash program memory
Erase time for 1 block (128 bytes)--33.3ms
--66.6
--33.3
SymbolParameterConditionMinMaxUnit
T
WE
N
WE
t
RET
1. The physical granularity of the memory is four bytes, so cycling is performed on four bytes even when a
write/erase operation addresses a single byte.
Table 36.Data memory
Temperature for writing and erasing--40150°C
Flash program memory endurance
(erase/write cycles)
(1)
Data retention time
TA = 25 °C1000-cycles
T
= 25 °C40-
A
= 55 °C20-
T
A
years
V
ms
SymbolParameterConditionMinMaxUnit
T
WE
N
WE
t
RET
1. The physical granularity of the memory is four bytes, so cycling is performed on four bytes even when a
2. More information on the relationship between data retention time and number of write/erase cycles is
3. Retention time for 256B of data memory after up to 1000 cycles at 125 °C.
Temperature for writing and erasing-40150°C
Data memory endurance
(erase/write cycles)
(1)
T
Data retention time
write/erase operation addresses a single byte.
available in a separate technical document.
58/89Doc ID 14952 Rev 6
TA = 25 °C300 k-
= -40°C to 125 °C100 k
A
T
= 25 °C40
A
= 55 °C20
T
A
(2)(3)
(2)(3)
(2)
cycles
-
years
-
STM8AF61xx, STM8AF62xxElectrical 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 37.I/O static characteristics
SymbolParameterConditionsMinTypMaxUnit
V
IL
V
IH
V
hys
V
OH
Input low level voltage-0.3 V0.3 x V
Input high level voltage0.7 x V
Hysteresis
(1)
Standard I/0, V
I = 3 mA
DD
= 5 V,
-
V
- 0.5 V--
DD
DD
0.1 x
V
DD
VDD + 0.3 V
-
Output high level voltage
Standard I/0, VDD = 3 V,
I = 1.5 mA
V
- 0.4 V--
DD
DD
—
High sink and true open
drain I/0, V
DD
= 5 V
--0.5
I = 8 mA
V
OL
R
pu
, t
t
R
I
lkg
Output low level voltage
Pull-up resistorVDD = 5 V, V
Rise and fall time
F
(10% - 90%)
Digital input pad leakage
current
= 5 V
DD
I = 3 mA
Standard I/0, V
DD
= 3 V
I = 1.5 mA
= V
IN
SS
Fast I/Os
Load = 50 pF
Standard and high sink I/Os
Load = 50 pF
Fast I/Os
Load = 20 pF
Standard and high sink I/Os
Load = 20 pF
V
≤V
IN
≤V
DD
SS
--0.6
--0.4
3550 65kΩ
20
50
(2)
(2)
(2)
(2)
--35
--125
--±1µA
VStandard I/0, V
ns
≤ V
≤ V
IN
IN
≤ V
≤ V
DD
DD
--±250
--±500
(3)
V
SS
I
lkg ana
Analog input pad leakage
current
-40 °C < TA < 125 °C
V
SS
-40 °C < TA < 150 °C
I
lkg(inj)
I
DDIO
1. Hysteresis voltage between Schmitt trigger switching levels. Based on characterization results, not tested in production.
Leakage current in
adjacent I/O
(3)
Total current on either
V
or V
DDIO
SSIO
Injection current ±4 mA--±1
Including injection currents--60mA
Doc ID 14952 Rev 659/89
nA
µA
Electrical characteristicsSTM8AF61xx, STM8AF62xx
0
1
2
3
4
5
6
2.533.544.555.56
V
DD
[V]
V
IL
/ V
IH
[V]
-40°C
25°C
85°C
125°C
30
35
40
45
50
55
60
2.53 3.54 4.55 5.56
V
DD
[V]
Pull-Up resistance [k ohm]
-40°C
25°C
85°C
125°C
2. Guaranteed by design.
3. Data based on characterization results, not tested in production.
Figure 20. Typical VIL and VIH vs VDD @ four temperatures
Figure 21. Typical pull-up resistance R
vs VDD @ four temperatures
PU
60/89Doc ID 14952 Rev 6
STM8AF61xx, STM8AF62xxElectrical characteristics
0
20
40
60
80
100
120
140
0123456
V
DD
[V]
Pull-Up current [µA]
-40°C
25°C
85°C
125°C
Note: The pull-up is a pure resistor (slope goes through 0).
0
0.25
0.5
0.75
1
1.25
1.5
01234567
I
OL
[mA]
V
OL
[V]
-40°C
25°C
85°C
125°C
0
0.25
0.5
0.75
1
1.25
1.5
024681012
I
OL
[mA]
V
OL
[V]
-40°C
25°C
85°C
125°C
0
0.25
0.5
0.75
1
1.25
1.5
1.75
2
0246 8101214
I
OL
[mA]
V
OL
[V]
-40°C
25°C
85°C
125°C
0
0.25
0.5
0.75
1
1.25
1.5
1.75
2
0510152025
I
OL
[mA]
V
OL
[V]
-40°C
25°C
85°C
125°C
Figure 22. Typical pull-up current Ipu vs VDD @ four temperatures
Typical output level curves
Figure 23 to Figure 32 show typical output level curves measured with output on a single
pin.
Figure 23. Typ. VOL @ VDD = 3.3 V (standard
ports)
Figure 24. Typ. VOL @ VDD = 5.0 V (standard
ports)
Figure 25. Typ. VOL @ VDD = 3.3 V (true open
drain ports)
Figure 26. Typ. VOL @ VDD = 5.0 V (true open
drain ports)
Doc ID 14952 Rev 661/89
Electrical characteristicsSTM8AF61xx, STM8AF62xx
0
0.25
0.5
0.75
1
1.25
1.5
0246 8101214
I
OL
[mA]
V
OL
[V]
-40°C
25°C
85°C
125°C
0
0.25
0.5
0.75
1
1.25
1.5
0510152025
I
OL
[mA]
V
OL
[V]
-40°C
25°C
85°C
125°C
0
0.25
0.5
0.75
1
1.25
1.5
1.75
2
01234567
I
OH
[mA]
V
DD
- V
OH
[V]
-40°C
25°C
85°C
125°C
0
0.25
0.5
0.75
1
1.25
1.5
1.75
2
024681012
I
OH
[mA]
V
DD
- V
OH
[V]
-40°C
25°C
85°C
125°C
0
0.25
0.5
0.75
1
1.25
1.5
1.75
2
0246 8101214
I
OH
[mA]
V
DD
- V
OH
[V]
-40°C
25°C
85°C
125°C
0
0.25
0.5
0.75
1
1.25
1.5
1.75
2
0510152025
I
OH
[mA]
V
DD
- V
OH
[V]
-40°C
25°C
85°C
125°C
Figure 27. Typ. VOL @ VDD = 3.3 V (high sink
ports)
Figure 29. Typ. V
DD - VOH
@ VDD = 3.3 V
(standard ports)
Figure 28. Typ. VOL @ VDD = 5.0 V (high sink
ports)
Figure 30. Typ. V
DD - VOH
@ VDD = 5.0 V
(standard ports)
Figure 31. Typ. V
DD - VOH
sink ports)
62/89Doc ID 14952 Rev 6
@ VDD = 3.3 V (high
Figure 32. Typ. V
sink ports)
DD - VOH
@ VDD = 5.0 V (high
STM8AF61xx, STM8AF62xxElectrical characteristics
0
1
2
3
4
5
6
2.533.544.555.56
V
DD
[V]
V
IL
/ V
IH
[V]
-40°C
25°C
85°C
125°C
10.3.7 Reset pin characteristics
Subject to general operating conditions for VDD and TA unless otherwise specified.
Table 38.NRST pin characteristics
SymbolParameterConditionsMinTypMaxUnit
(1)
(1)
(1)
(1)
-
-
IOL= 3 mA--0.6V
-85-315ns
V
IL(NRST)
V
IH(NRST)
V
OL(NRST)
R
PU(NRST)
t
t
IFP(NRST)
IFP
NRST input low level voltage
NRST input high level voltage
NRST output low level voltage
NRST pull-up resistor-304060kΩ
NRST input filtered pulse
NRST Input not filtered pulse
duration
(2)
1. Data based on characterization results, not tested in production.
2. Data guaranteed by design, not tested in production.
Figure 33. Typical NRST VIL and VIH vs VDD @ four temperatures
V
SS
0.7 x V
DD
0.3 x V
-
-
DD
V
DD
500ns
Doc ID 14952 Rev 663/89
Electrical characteristicsSTM8AF61xx, STM8AF62xx
30
35
40
45
50
55
60
2.533.544.555.56
V
DD
[V]
NRST Pull-Up resistance [k ohm]
-40°C
25°C
85°C
125°C
0
20
40
60
80
100
120
140
0123456
V
DD
[V]
NRST Pull-Up current [µA]
-40°C
25°C
85°C
125°C
External
reset
circuit
STM8A
Filter
R
PU
V
DD
Internal reset
NRST
0.1µF
(optional)
Figure 34. Typical NRST pull-up resistance RPU vs V
Figure 35. Typical NRST pull-up current Ipu vs V
DD
DD
The reset network shown in Figure 36 protects the device against parasitic resets. The user
must ensure that the level on the NRST pin can go below V
NRST pin characteristics), otherwise the reset is not taken into account internally.
Figure 36. Recommended reset pin protection
64/89Doc ID 14952 Rev 6
IL(NRST)
max (see Ta bl e 38:
STM8AF61xx, STM8AF62xxElectrical characteristics
10.3.8 TIM 1, 2, 3, and 4 timer specifications
Subject to general operating conditions for VDD, f
Table 39.TIM 1, 2, 3, and 4 electrical specifications
MASTER
, and TA unless otherwise specified.
SymbolParameterConditionsMinTypMaxUnit
(1)
---16MHz
10.3.9
f
EXT
1. Not tested in production. On 64 Kbyte devices, the frequency is limited to 16 MHz.
Timer external clock frequency
SPI serial peripheral interface
Unless otherwise specified, the parameters given in Ta bl e 40 are derived from tests
performed under ambient temperature,f
conditions. t
MASTER
= 1/f
MASTER
.
MASTER
frequency and VDD supply voltage
Refer to I/O port characteristics for more details on the input/output alternate function
characteristics (NSS, SCK, MOSI, MISO).
Table 40.SPI characteristics
SymbolParameterConditionsMinMaxUnit
f
SCK
1/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)
t
v(MO)
t
h(SO)
t
h(MO)
1. f
SCK
2. The pad has to be configured accordingly (fast mode).
3. Values based on design simulation and/or characterization results, and not tested in production.
Master mode 010
SPI clock frequency
VDD < 4.5 V06
Slave mode
VDD = 4.5 V to 5.5 V08
)
SPI clock rise and fall time Capacitive load: C = 30 pF-25
(3)
NSS setup time Slave mode4 * t
(3)
NSS hold timeSlave mode70-
(3)
SCK high and low timeMaster modet
(3)
(3)
Data input setup time
(3)
(3)
Data input hold time
(3)
(3)(4)
Data output access timeSlave mode- 3* t
(3)(5)
Data output disable timeSlave mode25
(3)
Data output valid time
(3)
Data output valid timeMaster mode (after enable edge)-30
(3)
Data output hold time
(3)
< f
MASTER
/2.
Master mode5-
Slave mode5-
Master mode7-
Slave mode10-
Slave mode
(after enable edge)
VDD < 4.5 V-75
= 4.5 V to 5.5 V-53
V
DD
Slave mode (after enable edge)31-
Master mode (after enable edge)12-
MASTER
SCK
/2 - 15 t
SCK
(1)
(1)
(2)
-
/2 + 15
MASTER
MHz
ns
Doc ID 14952 Rev 665/89
Electrical characteristicsSTM8AF61xx, STM8AF62xx
ai14134
SCK Input
CPHA=0
MOSI
INPUT
MISO
OUT PUT
CPHA=0
MS B O U T
MSB IN
BI T6 O UT
LSB IN
LSB OUT
CPOL=0
CPOL=1
BIT1 IN
NSS input
t
SU(NSS)
t
c(SCK)
t
h(NSS)
t
a(SO)
t
w(SCKH)
t
w(SCKL)
t
v(SO)
t
h(SO)
t
r(SCK)
t
f(SCK)
t
dis(SO)
t
su(SI)
t
h(SI)
ai14135
SCK Input
CPHA=1
MOSI
INPUT
MISO
OUT PUT
CPHA=1
MS B O U T
MSB IN
BI T6 OU T
LSB IN
LSB OUT
CPOL=0
CPOL=1
BIT1 IN
t
SU(NSS)
t
c(SCK)
t
h(NSS)
t
a(SO)
t
w(SCKH)
t
w(SCKL)
t
v(SO)
t
h(SO)
t
r(SCK)
t
f(SCK)
t
dis(SO)
t
su(SI)
t
h(SI)
NSS input
4. Min time is for the minimum time to drive the output and the max time is for the maximum time to validate the data.
5. Min time is for the minimum time to invalidate the output and the max time is for the maximum time to put the data in Hi-Z.
Figure 37. SPI timing diagram where slave mode and CPHA = 0
1. Measurement points are at CMOS levels: 0.3 VDD and 0.7 V
DD
.
Figure 38. SPI timing diagram where slave mode and CPHA = 1
1. Measurement points are at CMOS levels: 0.3 VDD and 0.7 V
DD
.
66/89Doc ID 14952 Rev 6
STM8AF61xx, STM8AF62xxElectrical characteristics
AI
3#+OUTPUT
#0(!
-/3)
/5454
-)3/
).0 54
#0(!
-3").
- 3"/54
")4).
,3"/54
,3").
#0/,
#0/,
" ) 4/54
.33INPUT
T
C3#+
T
W3#+(
T
W3#+,
T
R3#+
T
F3#+
T
H-)
(IGH
3#+OUTPUT
#0(!
#0(!
#0/,
#0/,
T
SU-)
T
V-/
T
H-/
Figure 39. SPI timing diagram - master mode
1. Measurement points are at CMOS levels: 0.3 VDD and 0.7 V
DD
.
Doc ID 14952 Rev 667/89
Electrical characteristicsSTM8AF61xx, STM8AF62xx
10.3.10 I2C interface characteristics
Table 41.I2C characteristics
SymbolParameter
Standard mode I
(2)
Min
Max
2
C Fast mode I2C
(2)
Min
(2)
Max
(1)
Unit
(2)
t
w(SCLL)
t
w(SCLH)
t
su(SDA)
t
h(SDA)
t
r(SDA)
t
r(SCL)
t
f(SDA)
t
f(SCL)
t
h(STA)
t
su(STA)
t
su(STO)
t
w(STO:STA)
C
b
1. f
MASTER
Data based on standard I
2.
The maximum hold time of the start condition has only to be met if the interface does not stretch the low
3.
time
The device must internally provide a hold time of at least 300 ns for the SDA signal in order to bridge the
4.
undefined region of the falling edge of SCL
SCL clock low time4.7-1.3 -
SCL clock high time4.0-0.6 -
SDA setup time250-100 -
SDA data hold time
SDA and SCL rise time
= 3 to 5.5 V)
(V
DD
SDA and SCL fall time
(VDD = 3 to 5.5 V)
(3)
0
-
-1000-300
-300-300
(4)
0
900
START condition hold time4.0-0.6-
Repeated START condition setup time4.7-0.6 -
STOP condition setup time4.0-0.6 -µs
STOP to START condition time
(bus free)
4.7-1.3-µs
Capacitive load for each bus line-400-400pF
, must be at least 8 MHz to achieve max fast I2C speed (400 kHz)
2
C protocol requirement, not tested in production
µs
(3)
ns
µs
68/89Doc ID 14952 Rev 6
STM8AF61xx, STM8AF62xxElectrical characteristics
AINx
STM8A
V
DD
I
L
V
T
0.6V
V
T
0.6V
V
AIN
R
AIN
10-bit A/D
conversion
C
AIN
T
s
C
samp
Rswitch
10.3.11 10-bit ADC characteristics
Subject to general operating conditions for V
DDA
, f
MASTER
, and TA unless otherwise
specified.
Table 42.ADC characteristics
SymbolParameter ConditionsMin
f
ADC
V
DDA
V
REF+
V
REF-
V
AIN
C
samp
(1)
t
S
t
STAB
t
CONV
R
switch
1. During the sample time, the sampling capacitance, C
ADC clock frequency-111 kHz-4 MHz kHz/MHz
Analog supply-3-5.5
Positive reference voltage-2.75-
Negative reference voltage-V
-
Conversion voltage range
(1)
Devices with
external V
pins
V
REF-
REF+
SSA
V
SSA
V
/
REF-
Internal sample and hold capacitor---3pF
f
= 2 MHz-1.5-
Sampling time
ADC
)
(3 x 1/f
Wakeup time from standby
Total conversion time including
ADC
f
= 4 MHz-0.75-
ADC
f
= 2 MHz-7-
ADC
= 4 MHz-3.5-
f
ADC
f
= 2 MHz-7-
ADC
sampling time
= 4 MHz-3.5-
f
(14 x 1/f
ADC
)
ADC
Equivalent switch resistance---30kΩ
(3 pF typ), can be charged/discharged by the
external source. The internal resistance of the analog source must allow the capacitance to reach its final
voltage level within t
effect on the conversion result.
After the end of the sample time tS, changes of the analog input voltage have no
S.
samp
Typ
MaxUnit
V
DDA
-0.5
V
-
-
V
DDA
REF+
V
µs
Figure 40. Typical application with ADC
1. Legend: R
= external resistance, C
AIN
= capacitors, C
AIN
= internal sample and hold capacitor.
samp
Doc ID 14952 Rev 669/89
Electrical characteristicsSTM8AF61xx, STM8AF62xx
E
O
E
G
1LSB
IDEAL
1LSB
IDEAL
V
DDAVSSA
–
1024
------------------------------ -----------=
1023
1022
1021
5
4
3
2
1
0
7
6
1234567
1021102210231024
(1)
(2)
E
T
E
D
E
L
(3)
V
DDA
V
SSA
Table 43.ADC accuracy for V
SymbolParameter ConditionsTyp
|ET|Total unadjusted error
|E
|Offset error
O
|Gain error
|E
G
|E
|Differential linearity error
D
|Integral linearity error
|E
L
|ET|Total unadjusted error
|EO|Offset error
|EG|Gain error
|ED|Differential linearity error
|EL|Integral linearity error
1. Max value is based on characterization, not tested in production.
2. ADC accuracy vs. injection current: Any positive or negative injection current within the limits specified for
I
and ΣI
INJ(PIN)
3. TUE 2LSB can be reached on specific salestypes on the whole temperature range.
4. Target values.
INJ(PIN)
(2)
(2)
(2)
(2)
(2)
(2)
in Section 10.3.6 does not affect the ADC accuracy.
(2)
(2)
DDA
(2)
(2)
= 5 V
f
ADC
f
ADC
= 2 MHz
= 4 MHz
Max
1.4
0.83
0.12
0.91
0.71.5
(4)
1.9
(4)
1.3
(4)
0.6
(4)
1.5
(4)
1.2
1.5
(1)
Unit
(3)
3
LSB
(4)
4
(4)
4
(4)
3
(4)
2
(4)
Figure 41. ADC accuracy characteristics
1. Example of an actual transfer curve
2. The ideal transfer curve
3. End point correlation line
= Total unadjusted error: Maximum deviation between the actual and the ideal transfer curves.
E
T
EO = Offset error: Deviation between the first actual transition and the first ideal one.
EG = Gain error: Deviation between the last ideal transition and the last actual one.
E
= Differential linearity error: Maximum deviation between actual steps and the ideal one.
D
EL = Integral linearity error: Maximum deviation between any actual transition and the end point correlation
line.
70/89Doc ID 14952 Rev 6
STM8AF61xx, STM8AF62xxElectrical characteristics
10.3.12 EMC characteristics
Susceptibility tests are performed on a sample basis during product characterization.
Functional EMS (electromagnetic susceptibility)
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).
●ESD: Electrostatic discharge (positive and negative) is applied on all pins of the device
until a functional disturbance occurs. This test conforms with the IEC 1000-4-2
standard.
●FTB: A burst of fast transient voltage (positive and negative) is applied to V
through a 100 pF capacitor, until a functional disturbance occurs. This test conforms
with the IEC 1000-4-4 standard.
A device reset allows normal operations to be resumed. The test results are given in the
table below based on the EMS levels and classes defined in application note AN1709.
Designing hardened software to avoid noise problems
EMC characterization and optimization are performed at component level with a typical
application environment and simplified MCU software. It should be noted that good EMC
performance is highly dependent on the user application and the software in particular.
and VSS
DD
Therefore it is recommended that the user applies EMC 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:
●Corrupted program counter
●Unexpected reset
●Critical data corruption (control registers...)
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).
Table 44.EMS data
SymbolParameterConditionsLevel/class
= 3.3 V, TA= 25 °C,
V
DD
f
MASTER
Conforms to IEC 1000-4-2
V
f
MASTER
Conforms to IEC 1000-4-4
= 16 MHz (HSI clock),
= 3.3 V, TA= 25 °C,
DD
= 16 MHz (HSI clock),
3B
4A
V
V
FESD
EFTB
Voltage limits to be applied on any I/O pin to
induce a functional disturbance
Fast transient voltage burst limits to be
applied through 100 pF on V
pins to induce a functional disturbance
DD
and V
SS
Doc ID 14952 Rev 671/89
Electrical characteristicsSTM8AF61xx, STM8AF62xx
Electromagnetic interference (EMI)
Emission tests conform to the SAE J 1752/3 standard for test software, board layout and pin
loading.
Table 45.EMI data
Conditions
SymbolParameter
General conditions
V
= 5 V,
DD
T
= 25 °C,
S
Peak level
EMI
A
LQFP80 package
conforming to SAE J
SAE EMI level—22.5
1. Data based on characterization results, not tested in production.
1752/3
frequency band
0.1 MHz to 30 MHz1517
30 MHz to 130 MHz1822
130 MHz to 1 GHz-13
Max f
Monitored
8
MHz
CPU
(1)
Unit
16
MHz
dBµV
Absolute maximum ratings (electrical sensitivity)
Based on two different tests (ESD and LU) using specific measurement methods, the
product is stressed to determine its performance in terms of electrical sensitivity. For more
details, refer to the application note AN1181.
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 parts*(n+1) supply pin). This test
conforms to the JESD22-A114A/A115A standard. For more details, refer to the application
note AN1181.
Table 46.ESD absolute maximum ratings
SymbolRatingsConditionsClass
V
ESD(HBM)
ESD(CDM)
V
ESD(MM)
1. Data based on characterization results, not tested in production
Electrostatic discharge voltage
(Human body model)
Electrostatic discharge voltage
(Charge device model)
Electrostatic discharge voltage
(Machine model)
TA = 25°C, conforming to
TA= 25°C, conforming to
TA= 25°C, conforming to
72/89Doc ID 14952 Rev 6
JESD22-A114
JESD22-C101
JESD22-A115
Maximum
value
3A4000
3500
B200
(1)
Unit
VV
STM8AF61xx, STM8AF62xxElectrical characteristics
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) and
●A current injection (applied to each input, output and configurable I/O pin) are
performed on each sample.
This test conforms to the EIA/JESD 78 IC latch-up standard. For more details, refer to the
application note AN1181.
Table 47.Electrical sensitivities
SymbolParameterConditions
= 25 °C
T
A
T
= 85 °C
LUStatic latch-up class
1. Class description: A Class is an STMicroelectronics internal specification. All its limits are higher than the
JEDEC specifications, that means when a device belongs to class A it exceeds the JEDEC standard. B
class strictly covers all the JEDEC criteria (international standard).
2. Available on STM8AF62xx devices only.
A
= 125 °C
T
A
T
= 150 °C
A
(2)
Class
A
(1)
10.4 Thermal characteristics
In case the maximum chip junction temperature (T
operating conditions on page 49 is exceeded, the functionality of the device cannot be
guaranteed.
T
, in degrees Celsius, may be calculated using the following equation:
Jmax
T
Jmax
Where:
–T
–
–P
–P
–P
is the maximum ambient temperature in °C
Amax
Θ
is the package junction-to-ambient thermal resistance in ° C/W
JA
is the sum of P
Dmax
is the product of I
INTmax
INTmax
chip internal power.
represents the maximum power dissipation on output pins
I/Omax
Where:
P
I/Omax =
Σ (V
) + Σ((VDD-VOH)*IOH),
OL*IOL
taking into account the actual VOL/I
in the application.
) specified inTa bl e 23: General
Jmax
= T
and P
DD
+ (P
Amax
I/Omax (PDmax
Dmax
x ΘJA)
= P
INTmax
+ P
I/Omax
)
and VDD, expressed in Watts. This is the maximum
and VOH/IOH of the I/Os at low and high level
OL
Doc ID 14952 Rev 673/89
Electrical characteristicsSTM8AF61xx, STM8AF62xx
Table 48.Thermal characteristics
SymbolParameterValueUnit
Θ
JA
Θ
JA
Θ
JA
1. Thermal resistances are based on JEDEC JESD51-2 with 4-layer PCB in a natural convection
environment.
Thermal resistance junction-ambient
LQFP 48 - 7 x 7 mm
Thermal resistance junction-ambient
LQFP 32 - 7 x 7 mm
Thermal resistance junction-ambient
VFQFPN32
(1)
10.4.1 Reference document
JESD51-2 integrated circuits thermal test method environment conditions - natural
convection (still air). Available from www.jedec.org.
10.4.2 Selecting the product temperature range
When ordering the microcontroller, the temperature range is specified in the order code (see
Section 12: Ordering information).
The following example shows how to calculate the temperature range needed for a given
application.
57°C/W
59°C/W
25°C/W
Assuming the following application conditions:
Maximum ambient temperature T
I
level with I
This gives: P
Thus: P
= 14 mA, VDD = 5 V, maximum 20 I/Os used at the same time in output at low
DDmax
P
P
P
= 8 mA, VOL= 0.4 V
OL
INTmax =
IOmax =
Dmax =
Dmax
14 mA x 5 V= 70 mW
20 x 8 mA x 0.4 V = 64 mW
INTmax
70 mW + 64 mW
= 134 mW.
= 70 mW and P
= 82 °C (measured according to JESD51-2),
Amax
64 mW:
IOmax
Using the values obtained in Ta bl e 48: Thermal characteristics on page 74 T
calculated as follows:
For LQFP64 46 °C/W
T
= 82 °C + (46 °C/W x 134 mW) = 82 °C + 6 °C = 88 °C
Jmax
This is within the range of the suffix B version parts (-40 < TJ < 105 °C).
Parts must be ordered at least with the temperature range suffix B.
Jmax
is
74/89Doc ID 14952 Rev 6
STM8AF61xx, STM8AF62xxPackage characteristics
11 Package characteristics
In order to meet environmental requirements, ST offers these devices in different grades of
ECOPACK
specifications, grade definitions and product status are available at:
ECOPACK® is an ST trademark.
®
packages, depending on their level of environmental compliance. ECOPACK®
www.st.com.
Doc ID 14952 Rev 675/89
Package characteristicsSTM8AF61xx, STM8AF62xx
11.1 Package mechanical data
Figure 42. VFQFPN 32-lead very thin fine pitch quad flat no-lead package (5 x 5)
Seating plane
C
A
ddd C
A3
A1
D
e
9
8
b
E2
1
Pin # 1 ID
R = 0.30
Table 49.VFQFPN 32-lead very thin fine pitch quad flat no-lead package
32
D2
Bottom view
16
17
E
24
L
L
42_ME
mechanical data
mminches
Dim.
MinTypMaxMinTypMax
(1)
A0.8000.9001.0000.03150.03540.0394
A10.0000.0200.050 0.0000.00080.0020
A3 —0.200 — —0.0079 —
b0.1800.2500.3000.00710.00980.0118
D4.8505.0005.1500.19090.19690.2028
D23.4003.4503.5000.13390.13580.1378
E4.8505.0005.1500.19090.19690.2028
E23.4003.4503.5000.13390.13580.1378
e —0.500 — —0.0197 —
L0.3000.4000.5000.01180.01570.0197
ddd — —0.080 — —0.0031
1. Values in inches are converted from mm and rounded to 4 decimal digits
Table 51.LQFP 32-pin low profile quad flat package mechanical data
mminches
Dim.
MinTypMaxMinTypMax
(1)
A — —1.600 — —0.0630
A10.050 —0.1500.0020 —0.0059
A21.3501.4001.4500.05310.05510.0571
b0.3000.3700.4500.01180.01460.0177
c0.090 —0.2000.0035 —0.0079
D8.8009.0009.200 0.34650.35430.3622
D16.8007.000 7.200 0.26770.27560.2835
D3 —5.600 — —0.2205 —
E8.8009.0009.200 0.34650.35430.3622
E16.8007.000 7.200 0.26770.27560.2835
E3 —5.600 — —0.2205 —
e —0.800 — —0.0315 —
θ0°3.5°7°0°3.5°7°
L0.4500.6000.7500.01770.02360.0295
L1 —1.000 — —0.0394 —
ccc — —0.100 — —0.0039
1. Values in inches are converted from mm and rounded to 4 decimal digits
Doc ID 14952 Rev 679/89
Package characteristicsSTM8AF61xx, STM8AF62xx
6?&0
Figure 46. LQFP 32-pin recommended footprint
1. Drawing is not to scale. Dimensions are in millimeters.
80/89Doc ID 14952 Rev 6
STM8AF61xx, STM8AF62xxOrdering information
STM8AF6268TDxxx
(2)
Y
Product class
8-bit automotive microcontroller
Program memory size
2 = 8 Kbytes
4 = 16 Kbytes
6 = 32 Kbytes
Package type
T = LQFP
U = VFQFPN
Example:
Device family
61 = Silicon rev Y, LIN only
(3)
62 = Silicon rev X and rev W, LIN only
Program memory type
F = Flash + EEPROM
P= FASTROM
H = Flash no EEPROM
(3)
Temperature range
A = -40 to 85 °C
B = -40 to 105 °C
(3)
C = -40 to 125 °C
D = -40 to 150 °C
(4)
Pin count
6 = 32 pins
8 = 48 pins
Packing
Y = Tray
U = Tube
X = Tape and reel compliant with EIA 481-C
12 Ordering information
Figure 47. Ordering information scheme
(1)
1. For a list of available options (e.g. memory size, package) and orderable part numbers or for further
information on any aspect of this device, please go to www.st.com
to you.
2. Customer specific FASTROM code or custom device configuration. This field shows ‘SSS’ if the device
contains a super set silicon, usually equipped with bigger memory and more I/Os. This silicon is supposed
to be replaced later by the target silicon.
3. Not recommended for new design.
4. Available on STM8AF62xx devices.
or contact the ST Sales Office nearest
Doc ID 14952 Rev 681/89
STM8 development toolsSTM8AF61xx, STM8AF62xx
13 STM8 development tools
Development tools for the STM8A microcontrollers include the
●STice emulation system offering tracing and code profiling
●STVD high-level language debugger including assembler and visual development
environment - seamless integration of third party C compilers.
●STVP Flash programming software
In addition, the STM8A comes with starter kits, evaluation boards and low-cost in-circuit
debugging/programming tools.
13.1 Emulation and in-circuit debugging tools
The STM8 tool line includes the STice emulation system offering a complete range of
emulation and in-circuit debugging features on a platform that is designed for versatility and
cost-effectiveness. In addition, STM8A application development is supported by a low-cost
in-circuit debugger/programmer.
The STice is the fourth generation of full-featured emulators from STMicroelectronics. It
offers new advanced debugging capabilities including tracing, profiling and code coverage
analysis to help detect execution bottlenecks and dead code.
In addition, STice offers in-circuit debugging and programming of STM8A microcontrollers
via the STM8 single wire interface module
an application while it runs on the target microcontroller.
For improved cost effectiveness, STice is based on a modular design that allows you to
order exactly what you need to meet your development requirements and to adapt your
emulation system to support existing and future ST microcontrollers.
13.1.1 STice key features
●Program and data trace recording up to 128 K records
●Advanced breakpoints with up to 4 levels of conditions
●Data breakpoints
●Real-time read/write of all device resources during emulation
●Occurrence and time profiling and code coverage analysis (new features)
●In-circuit debugging/programming via SWIM protocol
●8-bit probe analyzer
●1 input and 2 output triggers
●USB 2.0 high speed interface to host PC
●Power supply follower managing application voltages between 1.62 to 5.5 V
●Modularity that allows you to specify the components you need to meet your
development requirements and adapt to future requirements.
●Supported by free software tools that include integrated development environment
(IDE), programming software interface and assembler for STM8.
(SWIM), which allows non-intrusive debugging of
82/89Doc ID 14952 Rev 6
STM8AF61xx, STM8AF62xxSTM8 development tools
13.2 Software tools
STM8 development tools are supported by a complete, 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.
13.2.1 STM8 toolset
The STM8 toolset with STVD integrated development environment and STVP programming
software is available for free download at www.st.com. This package includes:
ST visual develop
Full-featured integrated development environment from STMicroelectronics, 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 such as code profiling and coverage
ST visual programmer (STVP)
Easy-to-use, unlimited graphical interface allowing read, write and verification of the STM8A
microcontroller’s Flash memory. STVP also offers project mode for saving programming
configurations and automating programming sequences.
13.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 configure and control the building of your
application directly from an easy-to-use graphical interface.
Available toolchains include:
C compiler for STM8
All compilers are available in free version with a limited code size depending on the
compiler. For more information, refer to www.cosmic-software.com, www.raisonance.com,
and www.iar.com.
STM8 assembler linker
Free assembly toolchain included in the STM8 toolset, which allows you to assemble and
link your application source code.
Doc ID 14952 Rev 683/89
STM8 development toolsSTM8AF61xx, STM8AF62xx
13.3 Programming tools
During the development cycle, STice provides in-circuit programming of the STM8A 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 STM8A.
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.
84/89Doc ID 14952 Rev 6
STM8AF61xx, STM8AF62xxRevision history
14 Revision history
Table 52.Document revision history
DateRevisionChanges
22-Aug-20081Initial release
Document revised as the following:
Updated Features on page 1;
Updated Table 1: Device summary;
Updated Section 3: Product line-up;
Changed Section 5: Product overview;
Updated Section 6: Pinouts and pin description;
Added Section 13.4.5: LIN header error when automatic
resynchronization is enabled.
Updated title on cover page.
Added VFQFPN32 5x 5 mm package.
Added STM8AF62xx devices, and modified cover page header to
clarify the part numbers covered by the datasheets. Updated Note 1
below Table 1: Device summary.
Updated D temperature range to -40 to 150°C.
Content of Section 5: Product overview reorganized.
Renamed Section 7Memory and register map, and content merged
with Register map section.
Renamed BL_EN and NBL_EN, BL and NBL, respectively, in
Table 17: Option bytes.
Added Table 22: Operating lifetime.
Added CEXT and P
(power dissipation) in Table 23: General
D
operating conditions, and Section 10.3.1: VCAP external capacitor.
Suffix D maximum junction temperature (T
) updated in Table 23:
J
General operating conditions.
Update t
VDD in Table 24: Operating conditions at power-up/power-
down.
Moved Table 29: Typical peripheral current consumption VDD = 5.0 V
to Section : Current consumption for on-chip peripherals and
removed I
DD(CAN)
.
Updated Section 12: Ordering information for the devices supported
by the datasheet.
Updated Section 13: STM8 development tools.
Doc ID 14952 Rev 685/89
Revision historySTM8AF61xx, STM8AF62xx
Table 52.Document revision history (continued)
DateRevisionChanges
Modified references to reference manual, and Flash programming
manual in the whole document.
Added reference to AEC Q100 standard on cover page.
Renamed timer types as follows:
– Auto-reload timer to general purpose timer
– Multipurpose timer to advanced control timer
– System timer to basic timer
Introduced concept of medium density Flash program memory.
Updated timer names in Figure 1: STM8A block diagram.
Added TMU brief description in Section 5.4: Flash program and data
EEPROM, and updated TMU_MAXATT description in Table 18:
Option byte description.
Updated clock sources in clock controller features (Section 5.5.1).
Changed 16MHZTRIM0 to HSITRIM bit in Section : User trimming.
Added Table 4: Peripheral clock gating bits in Section 5.5.6.
Updated Section 5.6: Low-power operating modes.
Added calibration using TIM3 in Section 5.7.2: Auto-wakeup counter.
Added Table 7: ADC naming and Table 8: Communication peripheral
31-Jan-20115
naming correspondence.
Added Note 1 related AIN12 pin in Section 5.8: Analog-to-digital
Added reset state in Table 9: Legend/abbreviation.
Table 10: STM8AF61xx/62xx (32 Kbytes) microcontroller pin
description: added Note 7 related to PD1/SWIM, modified Note 6,
corrected wpu input for PE1 and PE2, and renamed TIMn_CCx and
TIMn_NCCx to TIMn_CHx and TIMn_CHxN, respectively.
Section 7.2: Register map:
Replaced tables describing register maps and reset values for nonvolatile memory, global configuration, reset status, clock controller,
interrupt controller, timers, communication interfaces, and ADC, by
Table 13: General hardware register map.
Added Note 1 for Px_IDR registers in Table 12: I/O port hardware
register map. Updated register reset values for Px_IDR registers.
Added SWIM and debug module register map.
86/89Doc ID 14952 Rev 6
STM8AF61xx, STM8AF62xxRevision history
Table 52.Document revision history (continued)
DateRevisionChanges
Renamed Fast Active Halt mode to Active-halt mode with regulator
on, and Slow Active Halt mode to Active-halt mode with regulator off.
Updated Table 26: Total current consumption in Halt and Active-halt
modes. General conditions for VDD apply, TA = -40 to 55 °C, in
31-Jan-2011
(continued)
18-Jul-20126
particular I
t
WU(SAH)
Removed I
DD(FAH)
renamed t
and I
DD(USART)
DD(SAH)
WU(AH)
from Table 29: Typical peripheral current
consumption VDD = 5.0 V.
5
Updated general conditions in Section 10.3.5: Memory
characteristics. Modified T
program memory and Table 36: Data memory.
Update I
maximum value for TA ranging from −40 to 150 °C in
“xxx” and footnote 2, updated example and device family; added
FAST ROM.
Section 13.2.2: C and assembly toolchains: added www.iar.com
88/89Doc ID 14952 Rev 6
STM8AF61xx, STM8AF62xx
Please Read Carefully:
Information in this document is provided solely in connection with ST products. STMicroelectronics NV and its subsidiaries (“ST”) reserve the
right to make changes, corrections, modifications or improvements, to this document, and the products and services described herein at any
time, without notice.
All ST products are sold pursuant to ST’s terms and conditions of sale.
Purchasers are solely responsible for the choice, selection and use of the ST products and services described herein, and ST assumes no
liability whatsoever relating to the choice, selection or use of the ST products and services described herein.
No license, express or implied, by estoppel or otherwise, to any intellectual property rights is granted under this document. If any part of this
document refers to any third party products or services it shall not be deemed a license grant by ST for the use of such third party products
or services, or any intellectual property contained therein or considered as a warranty covering the use in any manner whatsoever of such
third party products or services or any intellectual property contained therein.
UNLESS OTHERWISE SET FORTH IN ST’S TERMS AND CONDITIONS OF SALE ST DISCLAIMS ANY EXPRESS OR IMPLIED
WARRANTY WITH RESPECT TO THE USE AND/OR SALE OF ST PRODUCTS INCLUDING WITHOUT LIMITATION IMPLIED
WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE (AND THEIR EQUIVALENTS UNDER THE LAWS
OF ANY JURISDICTION), OR INFRINGEMENT OF ANY PATENT, COPYRIGHT OR OTHER INTELLECTUAL PROPERTY RIGHT.
UNLESS EXPRESSLY APPROVED IN WRITING BY TWO AUTHORIZED ST REPRESENTATIVES, ST PRODUCTS ARE NOT
RECOMMENDED, AUTHORIZED OR WARRANTED FOR USE IN MILITARY, AIR CRAFT, SPACE, LIFE SAVING, OR LIFE SUSTAINING
APPLICATIONS, NOR IN PRODUCTS OR SYSTEMS WHERE FAILURE OR MALFUNCTION MAY RESULT IN PERSONAL INJURY,
DEATH, OR SEVERE PROPERTY OR ENVIRONMENTAL DAMAGE. ST PRODUCTS WHICH ARE NOT SPECIFIED AS "AUTOMOTIVE
GRADE" MAY ONLY BE USED IN AUTOMOTIVE APPLICATIONS AT USER’S OWN RISK.
Resale of ST products with provisions different from the statements and/or technical features set forth in this document shall immediately void
any warranty granted by ST for the ST product or service described herein and shall not create or extend in any manner whatsoever, any
liability of ST.
ST and the ST logo are trademarks or registered trademarks of ST in various countries.
Information in this document supersedes and replaces all information previously supplied.
The ST logo is a registered trademark of STMicroelectronics. All other names are the property of their respective owners.