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, 3, 4, and 5, and Figure 52).
2. Not recommended for new design.
(with CAN)
(1)
(2)
(2)
/2
July 2012Doc ID 14395 Rev 91/110
This is information on a product in full production.
Figure 20.Typical HSI frequency vs V
Figure 21.Typical LSI frequency vs V
Figure 22.Typical V
Figure 23.Typical pull-up resistance R
Figure 24.Typical pull-up current I
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.Typ. V
Figure 34.Typ. V
Figure 35.Typical NRST V
Figure 36.Typical NRST pull-up resistance R
Figure 37.Typical NRST pull-up current I
This datasheet refers to the STM8AF52xx, STM8AF62xx, STM8AF51xx, and STM8AF61xx
products with 32 to 128 Kbytes of program memory.
In the order code, the letter ‘F’ refers to product versions with Flash and data EEPROM, ‘H’
to product versions with Flash only, and ‘P’ to product versions with FASTROM. The
identifiers ‘F’, ‘H’, and ‘P’ 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 STM8S and STM8A 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).
Doc ID 14395 Rev 99/110
DescriptionSTM8AF52/62xx, STM8AF51/61xx
2 Description
The STM8AF52xx, STM8AF62xx, STM8AF51xx, and STM8AF61xx automotive 8-bit
microcontrollers described in this datasheet offer from 32 Kbytes to 128 Kbytes of non
volatile memory and integrated true data EEPROM. They are referred to as high density
STM8A devices in the STM8S and STM8A microcontroller families reference manual
(RM0016).
The STM8AF51xx and STM8AF52xx series feature a CAN interface.
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 20 MIPS at 24 MHz CPU clock frequency 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.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.
10/110Doc ID 14395 Rev 9
STM8AF52/62xx, STM8AF51/61xxProduct line-up
3 Product line-up
Table 2.STM8AF52xx product line-up with CAN
..
High
Order codePackage
density
Flash
program
memory
RAM
(bytes)
Data
EEPROM
(bytes)
(bytes)
STM8AF/P52AA
STM8AF/P528A64 K
LQFP80
(14x14)
128 K
2 K
STM8AF/P52A9
128 K
LQFP64
(10x10)
6 K
STM8AF/P526932 K1 K
STM8AF/P52A8
LQFP48
128 K
2 K
(7x7)
STM8AF/P526832 K1K
Table 3.STM8AF62xx product line-up without CAN
High
Order codePackage
density
Flash
program
memory
RAM
(bytes)
Data
EEPROM
(bytes)
(bytes)
10-bit
A/D
chan.
16
1038/35STM8AF/P528864 K
10-bit
A/D
chan.
Timers
(IC/OC/PWM)
1x8-bit: TIM4
3x16-bit: TIM1,
TIM2, TIM3
(9/9/9)
Timers
(IC/OC/PWM)
Serial
interfaces
CAN,
LIN(UART)
, SPI,
USART,
I²C
Serial
interfaces
I/0
wakeup
pins
68/37
52/36STM8AF/P528964 K
I/0
wakeup
pins
STM8AF/P62AA
STM8AF/P628A64 K
LQFP80
(14x14)
STM8AF/P62A9
128 K
2 K
128 K
LQFP64
(10x10)
STM8AF/P626932 K1 K
STM8AF/P62A8
STM8AF/P6288
STM8AF/P6286
STM8AF/P62A6
LQFP48
(7x7)
LQFP32
(7x7)
VFQFPN32
(5x5)
128 K
64 K
128 K
6 K
2 K
Doc ID 14395 Rev 911/110
68/37
16
1x8-bit: TIM4
3x16-bit: TIM1,
TIM2, TIM3
(9/9/9)
LIN(UART),
SPI,
USART, I²C
52/36STM8AF/P628964 K2 K
1038/35
1x8-bit: TIM4
3x16-bit: TIM1,
7
TIM2, TIM3
LIN(UART),
SPI, I²C
25/23
(8/8/8)
Product line-upSTM8AF52/62xx, STM8AF51/61xx
.
Table 4.STM8AF/H/P51xx product line-up with CAN
High
Order codePackage
density
Flash
program
memory
(bytes)
RAM
(bytes)
Data
EEPROM
(bytes)
10-bit
A/D
chan.
Timers
(IC/OC/PWM)
Serial
interfaces
I/0
wakeup
pins
STM8AF/H/P51AA
128 K
LQFP80
(14x14)
STM8AF/H/P518A64 K
STM8AF/H/P51A9
128 K
6 K2 K
STM8AF/H/P519996 K
STM8AF/H/P518964 K4 K
LQFP64
(10x10)
1.5 K
STM8AF/H/P517948 K3 K
STM8AF/H/P516932 K2 K1 K
STM8AF/H/P51A8
128 K
6 K2 K
STM8AF/H/P519896 K
STM8AF/H/P518864 K4 K
LQFP48
(7x7)
1.5 K
STM8AF/H/P517848 K3 K
STM8AF/H/P516832 K2 K1K
68/37STM8AF/H/P519A96 K
16
1x8-bit: TIM4
3x16-bit: TIM1,
TIM2, TIM3
(9/9/9)
CAN,
LIN(UART)
, SPI,
USART,
I²C
52/36
1038/35
12/110Doc ID 14395 Rev 9
STM8AF52/62xx, STM8AF51/61xxProduct line-up
²
Table 5.STM8AF/H/P61xx product line-up withoutCAN
High
Order codePackage
density
Flash
program
memory
(bytes)
RAM
(bytes)
Data
EEPROM
(bytes)
10-bit
A/D
chan.
Timers
(IC/OC/PWM)
Serial
interfaces
I/0
wakeup
pins
STM8AF/H/P61AA
128 K
LQFP80
(14x14)
STM8AF/H/P618A64 K
STM8AF/H/P61A9
128 K
6 K2 K
STM8AF/H/P619996 K
STM8AF/H/P618964 K4 K
LQFP64
(10x10)
1.5 K
STM8AF/H/P617948 K3 K
STM8AF/H/P616932 K2 K1 K
STM8AF/H/P61A8
128 K
6 K2 K
STM8AF/H/P619896 K
STM8AF/H/P618864 K4 K
LQFP48
(7x7)
STM8AF/H/P617848 K3 K
STM8AF/H/P6186
64 K4 K
1.5 K
LQFP32
STM8AF/H/P617648 K3 K
(7x7)/
68/37STM8AF/H/P619A96 K
16
1x8-bit: TIM4
3x16-bit:
TIM1, TIM2,
TIM3
LIN(UART),
SPI,
USART, I²C
52/36
(9/9/9)
1038/35
1x8-bit: TIM4
7
3x16-bit:
TIM1, TIM2,
LIN(UART),
SPI, I²C
25/23
TIM3 (8/8/8)
Doc ID 14395 Rev 913/110
Block diagramSTM8AF52/62xx, STM8AF51/61xx
XTAL 1-24 MHz
RC int. 16 MHz
RC int. 128 kHz
STM8A CORE
Debug/SWIM
I
2
C
SPI
USART
LINUART
16-bit general purpose
AWU tim er
Reset block
Reset
Clock controller
Detector
Clock to peripherals and core
10Mbit/s
LIN master
Up to
Window WDG
IWDG
Up to 128 Kbyte
Up to 2 Kbytes
Up to 6 Kbytes
Boot ROM
10-bit ADC
beCAN
9 CAPCOM
Reset
400 Kbit/s
1 Mbit/s
Master/slave
Single wire
automatic
debug interf.
SPI emul.
channels
high density program
Flash
16-bit advanced control
timer (TIM1)
(TIM2, TIM3)
8-bit AR timer
(TIM4)
data EEPROM
RAM
Up to
Address and data bus
16 channels
resynchronization
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
14/110Doc ID 14395 Rev 9
Window WDG: Window watchdog
STM8AF52/62xx, STM8AF51/61xxProduct overview
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
Doc ID 14395 Rev 915/110
Product overviewSTM8AF52/62xx, STM8AF51/61xx
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
●24 interrupt vectors with hardware priority
●Five vectors for external interrupts (up to 37 depending on the package)
●Trap and reset interrupts
5.4 Flash program and data EEPROM
●32 Kbytes to 128 Kbytes of high density single voltage Flash program memory
●Up to 2 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.
16/110Doc ID 14395 Rev 9
STM8AF52/62xx, STM8AF51/61xxProduct overview
Programmable area from 1 Kbyte
Data
UBC area
Program memory area
Data memory area
(first two pages) up to program memory
EEPROM
Remains write protected during IAP
memory
Write access possible for IAP
Option bytes
end - maximum 128 Kbytes
Flash
program
memory
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 128 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 51).
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
byte area. This keyword must be entered via the SWIM interface to temporarily unlock the
device.
Doc ID 14395 Rev 917/110
Product overviewSTM8AF52/62xx, STM8AF51/61xx
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-24 MHz high-speed external crystal (HSE)
–Up to 24 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, individual peripherals or memory.
●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 two 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.
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 24 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 24 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).
For efficient power management, the application can be put in one of four different lowpower modes. You can configure each mode to obtain the best compromise between lowest
power consumption, fastest start-up time and available wakeup sources.
●Wait mode
In this mode, the CPU is stopped but 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.
20/110Doc ID 14395 Rev 9
STM8AF52/62xx, STM8AF51/61xxProduct overview
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.
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.
Doc ID 14395 Rev 921/110
Product overviewSTM8AF52/62xx, STM8AF51/61xx
Table 8.Advanced control and general purpose timers
Timer
Counter
width
Counter
type
Prescaler
factor
Channels
Inverted
outputs
Repetition
counter
trigger
unit
External
trigger
TIM116-bitUp/down 1 to 6553643YesYesYesYes
n
TIM216-bitUp
TIM316-bitUp
2
n = 0 to 15
n
2
n = 0 to 15
3NoneNoNoNoNo
2NoneNoNoNoNo
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
Break
input
TIM2, 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 9.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
22/110Doc ID 14395 Rev 9
STM8AF52/62xx, STM8AF51/61xxProduct overview
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 10).
Table 10.ADC naming
Peripheral name in datasheet
ADCADC2
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 registers
●Shadow registers for data consistency
●ADC input range: V
●
Schmitt-trigger on analog inputs can be disabled to reduce power consumption
SSA
MASTER
≤ VIN ≤ V
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 USART interface. The USART can
operate in standard SCI mode (serial communication interface, asynchronous) or in SPI
emulation mode. It is equipped with a 16 bit fractional prescaler. It features LIN master
support.
Doc ID 14395 Rev 923/110
Product overviewSTM8AF52/62xx, STM8AF51/61xx
Detailed feature list:
●Full duplex, asynchronous communications
●NRZ standard format (mark/space)
●High-precision baud rate generator system
–Common programmable transmit and receive baud rates up to f
●Programmable data word length (8 or 9 bits)
●Configurable stop bits: Support for 1 or 2 stop bits
●LIN master mode:
MASTER
/16
–LIN break and delimiter generation
–LIN break and delimiter detection with separate flag and interrupt source for
readback checking.
●Transmitter clock output for synchronous communication
●Separate enable bits for transmitter and receiver
●Transfer detection flags:
–Receive buffer full
–Transmit buffer empty
–End of transmission flags
●Parity control:
–Transmits parity bit
–Checks parity of received data byte
●Four error detection flags:
–Overrun error
–Noise error
–Frame error
–Parity error
●Six interrupt sources with flags:
–Transmit data register empty
–Transmission complete
–Receive data register full
–Idle line received
–Parity error
–LIN break and delimiter detection
●Two interrupt vectors:
–Transmitter interrupt
–Receiver interrupt
●Reduced power consumption mode
●Wakeup from mute mode (by idle line detection or address mark detection)
●Two receiver wakeup modes:
–Address bit (MSB)
–Idle line
24/110Doc ID 14395 Rev 9
STM8AF52/62xx, STM8AF51/61xxProduct overview
5.9.2 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
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
–Address bit (MSB)
–Idle line
Doc ID 14395 Rev 925/110
/16
Product overviewSTM8AF52/62xx, STM8AF51/61xx
5.9.3 Serial peripheral interface (SPI)
The devices covered by this datasheet contain one SPI. The SPI is available on all the
supported packages.
●Maximum speed: 8 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.4 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
26/110Doc ID 14395 Rev 9
STM8AF52/62xx, STM8AF51/61xxProduct overview
●Interrupt:
–Successful address/data communication
–Error condition
–Wakeup from Halt
●Wakeup from Halt on address detection in slave mode
5.9.5 Controller area network interface (beCAN)
The beCAN controller (basic enhanced CAN), interfaces the CAN network and supports the
CAN protocol version 2.0A and B. It is equipped with a receive FIFO and a very versatile
filter bank. Together with a filter match index, this allows a very efficient message handling in
today’s car network architectures. The CPU is significantly unloaded. The maximum
transmission speed is 1 Mbit/s.
Transmission
●Three transmit mailboxes
●Configurable transmit priority by identifier or order request
Reception
●11- and 29-bit ID
●1 receive FIFO (3 messages deep)
●Software-efficient mailbox mapping at a unique address space
●FMI (filter match index) stored with message for quick message association
●Configurable FIFO overrun
●Time stamp on SOF reception
●6 filter banks, 2 x 32 bytes (scalable to 4 x 16-bit) each, enabling various masking
configurations, such as 12 filters for 29-bit ID or 48 filters for 11-bit ID.
●Filtering modes (mixable):
–Mask mode permitting ID range filtering
–ID list mode
Interrupt management
●Maskable interrupt
●Software-efficient mailbox mapping at a unique address space
Doc ID 14395 Rev 927/110
Product overviewSTM8AF52/62xx, STM8AF51/61xx
5.10 Input/output specifications
The product features four 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
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.
2
C interface)
28/110Doc ID 14395 Rev 9
STM8AF52/62xx, STM8AF51/61xxPinouts and pin description
Table 12.Legend/abbreviation for the pin description table
TypeI= input, O = output, S = power supply
InputCM = CMOS (standard for all I/Os)
Level
OutputHS = high sink (8 mA)
O1 = Standard (up to 2 MHz)
Output speed
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
Inputfloat = floating, wpu = weak pull-up
OutputT = true open drain, OD = open drain, PP = push pull
Bold X (pin state after reset release).
Reset state
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).
32/110Doc ID 14395 Rev 9
STM8AF52/62xx, STM8AF51/61xxPinouts and pin description
Table 13.STM8A microcontroller family pin description
Pin number
LQFP80
InputOutput
Main
OD
function
(after
PP
reset)
Pin name
LQFP64
LQFP48
Typ e
wpu
floating
Speed
High sink
Ext. interrupt
Default
alternate
function
Alternate
function
after remap
[option bit]
LQFP32/VFQFPN32
1111NRSTI/O-X—— ———Reset—
2222 PA1/OSCIN
(1)
I/O XX——O1X XPort A1
3333PA2/OSCOUTI/O XXX—O1XXPort A2
444-V
5554V
SSIO_1
SS
S— ——————I/O ground—
S— ——————Digital ground—
Resonator/
crystal in
Resonator/
crystal out
6665VCAPS— —————— 1.8 V regulator capacitor—
7776V
8887V
DD
DDIO_1
999-PA3/TIM2_CH3 I/OXXX—O1XXPort A3
10 10 10-PA4/USART_RX I/O XXX—O3XXPort A4
11 11 11-PA5/USART_TX I/O XXX—O3XXPort A5
S— ——————Digital power supply —
S— ——————I/O power supply —
Timer 2 -
TIM3_CH1
channel 3
USART
receive
USART
transmit
—
—
[AFR1]
—
—
USART
12 12 12-PA6/USART_CK I/O XXX—O3XXPort A6
synchronous
—
clock
13---PH0I/OXX—HSO3XXPort H0——
14---PH1I/OXX—HSO3X XPort H1——
15---PH2I/OXX——O1X XPort H2——
16---PH3I/OXX——O1X XPort H3——
17 13--PF7/AIN15I/OXX——O1X XPort F7
18 14--PF6/AIN14I/OXX——O1X XPort F6
19 15--PF5/AIN13I/OXX——O1X XPort F5
20 16-8PF4/AIN12I/O XX——O1X XPort F4
21 17--PF3/AIN11I/OXX——O1X XPort F3
Analog
input 15
Analog
input 14
Analog
input 13
Analog
input 12
Analog
input 11
—
—
—
—
—
Doc ID 14395 Rev 933/110
Pinouts and pin descriptionSTM8AF52/62xx, STM8AF51/61xx
Table 13.STM8A microcontroller family pin description (continued)
Pinouts and pin descriptionSTM8AF52/62xx, STM8AF51/61xx
Table 13.STM8A microcontroller family pin description (continued)
Pin number
LQFP80
LQFP64
LQFP48
Pin name
InputOutput
Typ e
wpu
floating
Ext. interrupt
High sink
Speed
OD
Main
function
(after
PP
reset)
Default
alternate
function
Alternate
function
after remap
[option bit]
LQFP32/VFQFPN32
61---PI4I/OXX——O1X X Port I4——
62---PI5I/OXX——O1X X Port I5——
63 49--PG5I/O XX——O1X XPort G5——
64 50--PG6I/O XX——O1X XPort G6——
65 51--PG7I/O XX——O1X XPort G7——
66 52--PE4I/O XXX—O1XXPort E4——
67 53 37-PE3/TIM1_BKIN I/O XXX—O1XXPort E3
68 54 38-PE2/I
69 55 39-PE1/I
2
C_SDAI/OX—X—O1T
2
C_SCLI/O X—X—O1T
(2)
-Port E2I2C data —
(2)
-Port E1I2C clock—
70 56 40-PE0/CLK_CCO I/O XXX—O3XXPort E0
Timer 1 -
break input
Configurable
clock output
—
—
71---PI6I/OXX——O1X X Port I6——
72---PI7I/OXX——O1X X Port I7——
73 57 41 25 PD0/TIM3_CH2 I/O XXXHSO3XXPort D0
(3)
74 58 42 26PD1/SWIM
I/O XXXHSO4X XPort D1
75 59 43 27 PD2/TIM3_CH1 I/O XXXHSO3XXPort D2
76 60 44 28 PD3/TIM2_CH2 I/O XXXHSO3XXPort D3
77 61 45 29
78 62 46 30
79 63 47 31
PD4/TIM2_CH1/
BEEP
PD5/
LINUART_TX
PD6/
LINUART_RX
I/O XXXHSO3XXPort D4
I/O XXX—O1XXPort D5
I/O
X
XX—O1XX
Port D6
X
(4)
80 64 48 32PD7/TLI
I/O XXX—O1XXPort D7
Timer 3 -
channel 2
SWIM data
interface
Timer 3 -
channel 1
Timer 2 -
channel 2
Timer 2 -
channel 1
LINUART
data transmit
LINUART
data receive
Top level
interrupt
TIM1_BKIN
[AFR3]/
CLK_CCO
[AFR2]
—
TIM2_CH3
[AFR1]
ADC_ETR
[AFR0]
BEEP output
[AFR7]
—
—
—
36/110Doc ID 14395 Rev 9
STM8AF52/62xx, STM8AF51/61xxPinouts and pin description
1. In Halt/Active-halt mode, this pin behaves as follows:
- 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, the internal weak pull-up setting is used. It is configured through Px_CR1[7:0] bits of the
corresponding port control register. Px_CR1[7:0] bits must be set correctly to ensure that the pin is not left floating in
Halt/Active-halt mode.
2. In the open-drain output column, ‘T’ defines a true open-drain I/O (P-buffer, week pull-up and protection diode to V
not implemented)
3. The PD1 pin is in input pull-up during the reset phase and after reset release.
4. If this pin is configured as interrupt pin, it will trigger the TLI.
DD
are
6.2 Alternate function remapping
As shown in the rightmost column of Ta b le 13, 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 51. When the remapping option is active, the
Doc ID 14395 Rev 937/110
Memory and register mapSTM8AF52/62xx, STM8AF51/61xx
Up to 2 Kbytes data EEPROM
Option bytes
HW registers
2 Kbytes boot ROM
CPU/SWIM/Debug/ITC registers
IT vectors
Up to 128 Kbytes
00 0000
RAM end address
00 4000
00 4800
00 5000
00 5800
00 6000
00 6800
00 7F00
00 8000
Memory end address
00 8080
Reserved
Reserved
Stack
Up to 6 Kbytes RAM
00 4900
Reserved
Flash program memory
7 Memory and register map
7.1 Memory map
Figure 7.Register and memory map
Table 14.Memory model 128K
Flash program
memory size
Flash program
memory end
address
RAM size
128K0x00 27FFF
1. If the device contains the super set silicon (salestype contains SSS), the roll-over address is the same as
38/110Doc ID 14395 Rev 9
96K0x00 1FFFF0x00 17FF0x00 1400
64K0x00 17FFF0x00 17FF0x00 1400
48K0x00 13FFF3K0x00 0BFFn/a
32K0x00 0FFFF6K0x00 17FF0x00 1400
on the 128K device. For more information on stack handling refer to the “Memory and register map” section
in the reference manual RM0016. For more information on salestype composition, refer to section 13 in the
present document.
6K
RAM end
address
Stack roll-over
address
0x00 17FF0x00 1400
(1)
STM8AF52/62xx, STM8AF51/61xxMemory and register map
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 15.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
Doc ID 14395 Rev 939/110
(1)
(1)
Memory and register mapSTM8AF52/62xx, STM8AF51/61xx
Table 15.I/O port hardware register map (continued)
AddressBlockRegister labelRegister name
0x00 501E
PG_ODRPort G data output latch register0x00
status
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
0x00 5023
PH_ODRPort H data output latch register0x00
0x00 5024PH_IDRPort H input pin value register0xXX
0x00 5025PH_DDRPort H data direction register0x00
Por t H
0x00 5026PH_CR1Port H control register 10x00
0x00 5027PH_CR2Port H control register 20x00
0x00 5028
PI_ODRPort I data output latch register0x00
0x00 5029PI_IDRPort I input pin value register0xXX
0x00 502API_DDRPort I data direction register0x00
Por t I
0x00 502BPI_CR1Port I control register 10x00
0x00 502CPI_CR2Port I control register 20x00
1. Depends on the external circuitry.
Reset
(1)
(1)
(1)
Table 16.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
3MISCExternal interrupt E00x00 8014YesPort A interrupts
4MISCExternal interrupt E10x00 8018YesPort B interrupts
5MISCExternal interrupt E20x00 801CYesPort C interrupts
6MISCExternal interrupt E30x00 8020YesPort D interrupts
7MISCExternal interrupt E40x00 8024YesPort E interrupts
8CANCAN interrupt Rx0x00 8028Yes—
9CANCAN interrupt TX/ER/SC0x00 802C——
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——
17 USARTTx complete0x00 804C——
18 USARTReceive data full reg.0x00 8050——
19I
2
C I
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 unused interrupts must be initialized with ‘IRET’ for robust programming.
End of programming/
write in not allowed area
0x00 8068——
50/110Doc ID 14395 Rev 9
STM8AF52/62xx, STM8AF51/61xxOption 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 changed in ICP mode (via SWIM).
Refer to the STM8 Flash programming manual (PM0047) and STM8 SWIM communication
protocol and debug module user manual (UM0470) for information on SWIM programming
procedures.
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)
NOPT
17
NBL [7:0]0xFF
52/110Doc ID 14395 Rev 9
STM8AF52/62xx, STM8AF51/61xxOption bytes
Table 21.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 STM8A microcontrollerfamily reference manual
(RM0016) section on Flash/EEPROM memory readout protection for
details.
UBC[7:0]: User boot code area
0x00: No UBC, no write-protection
0x01: Page 0 to 1 defined as UBC, memory write-protected
0x02: Page 0 to 3 defined as UBC, memory write-protected
0x03 to 0xFF: Pages 4 to 255 defined as UBC, memory write-protected
Note: Refer to the STM8A microcontroller family 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_SCL.
I
2
C_SDA, port B4 alternate function =
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
0: Port D7 alternate function = TLI
1: Reserved
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 14395 Rev 953/110
Option bytesSTM8AF52/62xx, STM8AF51/61xx
Table 21.Option byte description (continued)
Option byte no.Description
LSI_EN: Low speed internal clock enable
0: LSI clock is not available as CPU clock source
1: LSI clock is available as CPU clock source
IWDG_HW: Independent watchdog
0: IWDG Independent watchdog activated by software
OPT3
OPT4
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
1: HSE clock with prescaler selected as clock source for AWU
OPT5
OPT6
OPT7
OPT8
OPT9
OPT10
OPT11
PRSC[1:0]: AWU clock prescaler
00: 24 MHz to 128 kHz prescaler
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.
WAIT STATE: Wait state configuration
This option configures the number of wait states inserted when reading
from the Flash/data EEPROM memory.
0: No wait state
1: One wait state
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
54/110Doc ID 14395 Rev 9
STM8AF52/62xx, STM8AF51/61xxOption bytes
Table 21.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).
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
TA = T
Data based on characterization results, design simulation and/or technology characteristics
are indicated in the table footnotes and are not tested in production.
(given by the selected temperature range).
Amax
10.1.2 Typical values
= -40 °C, TA = 25 °C, and
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 8.
The input voltage measurement on a pin of the device is described in Figure 9.
Figure 9.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 22.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
- VDD| Variations between different power pins—50
|V
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
- 0.36.5
SS
V
- 0.3V
SS
DD
+ 0.3
see Absolute maximum ratings
V
ESD
Electrostatic discharge voltage
(electrical sensitivity) on
page 85
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 V
2. The total limit applies to the sum of operation and injected currents.
3. V
4. This condition is implicitly insured if VIN maximum is respected. If VIN maximum cannot be respected, the
Table 24.Thermal characteristics
includes the sum of the positive injection currents. V
DDIO
currents.
injection current must be limited externally to the IINJ(PIN) value. A positive injection is induced by VIN >
VDD while a negative injection is induced by VIN < VSS. For true open-drain pads, there is no positive
injection current allowed and the corresponding VIN maximum must always be respected.
Output current source by any I/Os and control pin-20
(4)
Injected current on any pin±10
Sum of injected currents50
, V
DDIO
) and ground (VSS, V
DDA
SSIO
, V
SSA
(1)(2)(3)
(1)(2)(3)
100
100
) pins must always be connected to the
includes the sum of the negative injection
SSIO
mA
SymbolRatings ValueUnit
T
STG
T
J
Table 25.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.
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
parameters is given by design of internal regulator.
Table 29.Total current consumption in Halt and Active-halt modes. General conditions for V
applied. TA = −40 °C to 55 °C unless otherwise stated
Conditions
SymbolParameter
I
DD(H)
Supply current in
Halt mode
Supply current in
Active-halt mode
with regulator on
I
DD(AH)
Supply current in
Active-halt mode
with regulator off
Wakeup time from
Active-halt mode
with regulator on
t
WU(AH)
Wakeup time from
Active-halt mode
with regulator off
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.
Main
voltage
regulator
(1)
(MVR)
Flash
mode
(2)
Clock source and
temperature condition
Typ Max Unit
Clocks stopped535
Off
On
Power-
down
Power-
down
Clocks stopped,
T
= 25 °C
A
External clock 16 MHz
MASTER
= 125 kHz
f
525
770900
LSI clock 128 kHz150230
LSI clock 128 kHz2542
Off
On
Power-
down
Operating
mode
LSI clock 128 kHz,
= 25 °C
T
A
=−40 to 150 °C
T
A
2530
1030
Off5080
(3)
(3)
µA
(3)
(3)
(3)
µs
(3)
DD
Current consumption for on-chip peripherals
Table 30.Oscillator current consumption
SymbolParameterConditionsTypMax
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 R
to crystal manufacturer for more details
Table 32.Typical peripheral current consumption VDD = 5.0 V
SymbolParameter
I
DD(TIM1)
I
DD(TIM2)
I
DD(TIM3)
I
DD(TIM4)
I
DD(USART)
I
DD(LINUART)
I
DD(SPI)
I
DD(I2C)
I
DD(CAN)
I
DD(AWU)
I
DD(TOT_DIG)
I
DD(ADC)
Typ.
TIM1 supply current
TIM2 supply current
TIM3 supply current
TIM4 supply current
USART supply current
(2)
(2)
(2)
(2)
(2)
LINUART supply current
SPI supply current
I2C supply current
CAN supply current
AWU supply current
(2)
(2)
(3)
(2)
f
(2)
= 2 MHz
master
0.030.230.34
0.020.120.19
0.010.10.16
0.0040.030.05
0.030.090.15
0.030.110.18
0.010.040.07
0.020.060.91
0.060.300.40
0.0030.020.05
All digital peripherals on0.2212.4
ADC supply current when
converting
(4)
0.930.950.96
f
master
(1)
Typ.
= 16 MHz
f
master
Typ.
=24 MHz
Unit
mA
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 I
measurement does not include the pad toggling consumption.
3. Data based on a differential IDD measurement between reset configuration (CAN disabled) and a permanent CAN data
transmit sequence in loopback mode at 1 MHz. This measurement does not include the pad toggling consumption.
4. Data based on a differential I
measurement between no peripheral clocked and a single active peripheral. This
DD
measurement between reset configuration and continuous A/D conversions.
10.3.3 External clock sources and timing characteristics
HSE external clock
An HSE clock can be generated by feeding an external clock signal of up to 24 MHz to the
OSCIN pin.
Clock characteristics are subject to general operating conditions for VDD and TA.
Table 33.HSE external clock characteristics
SymbolParameterConditionsMinTypMaxUnit
f
HSE_ext
V
HSEdHL
V
HSEH
V
HSEL
I
LEAK_HSE
1. If CSS is used, the external clock must have a frequency above 500 kHz.
User external clock source
frequency
= -40 °C to 150 °C0
T
A
Comparator hysteresis—0.1 x V
OSCIN high-level input pin
voltage
OSCIN low-level input pin
voltage
OSCIN input leakage currentV
—0.7 x V
—V
< V
IN
< V
DD
SS
Figure 18. HSE external clock source
(1)
DD
DD
SS
—24MHz
——
—V
—0.3 x V
DD
V
DD
-1—+1µA
HSE crystal/ceramic resonator oscillator
The HSE clock can be supplied using a crystal/ceramic resonator oscillator of up to 24 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...).
1. The oscillator needs two load capacitors, CL1 and CL2, to act as load for the crystal. The total load capacitance (C
(C
L1
2. This value is the startup time, measured from the moment it is enabled (by software) until a stabilized 24 MHz oscillation is
reached. It can vary with the crystal type that is used.
Feedback resistor——220—kΩ
F
(1)
Recommended load capacitance———20pF
Oscillator trans conductance—5——mA/V
V
(2)
Startup time
* CL2)/(CL1 + CL2). If CL1 = CL2, C
load
= C
. Some oscillators have built-in load capacitors, CL1 and CL2.
L1/2
is
DD
stabilized
—2.8 —ms
Load
) is
Figure 19. HSE oscillator circuit diagram
HSE oscillator critical gm formula
The crystal characteristics have to be checked with the following formula:
Equation 1
where g
Equation 2
Rm: Notional resistance (see crystal specification)
L
C
Co: Shunt capacitance (see crystal specification)
C
66/110Doc ID 14395 Rev 9
can be calculated with the crystal parameters as follows:
mcrit
: Notional inductance (see crystal specification)
m
: Notional capacitance (see crystal specification)
Standard programming time
(including erase) for byte/word/block
t
(1 byte/4 bytes/128 bytes)
prog
Fast programming time for 1 block
(128 bytes)
t
erase
1. Guaranteed by characterization, not tested in production.
Erase time for 1 block (128 bytes)——33.3ms
——66.6
——33.3
(1)
TypMaxUni t
3.0—5.5
2.6—5.5
V
ms
Table 38.Flash program memory
SymbolParameterConditionMinMaxUnit
T
N
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.
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 40.I/O static characteristics
SymbolParameterConditionsMinTypMaxUnit
V
V
V
V
Low-level input voltage
IL
High-level input voltage0.7 x V
IH
hys
Hysteresis
(1)
Standard I/0, V
—
DD
= 5 V,
I = 3 mA
High-level output voltage
OH
Standard I/0, VDD = 3 V,
I = 1.5 mA
-0.3 V0.3 x V
DD
—
V
- 0.5 V——
DD
V
- 0.4 V——
DD
0.1 x
V
VDD + 0.3 V
DD
DD
—
—
High sink and true open
drain I/0, V
DD
= 5 V
——0.5
I = 8 mA
V
R
t
R
I
Low-level output voltage
OL
Pull-up resistorVDD = 5 V, V
pu
Standard and high sink I/Os
Rise and fall time
, t
F
(10% - 90%)
Standard and high sink I/Os
Digital input pad leakage
lkg
current
I = 3 mA
Standard I/0, V
I = 1.5 mA
Fast I/Os
Load = 50 pF
Load = 50 pF
Fast I/Os
Load = 20 pF
Load = 20 pF
V
≤V
SS
IN
DD
DD
IN
≤V
= 5 V
= 3 V
= 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.
Figure 36. Typical NRST pull-up resistance RPU vs V
Figure 37. Typical NRST pull-up current Ipu vs V
DD
DD
The reset network shown in Figure 38 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.
For power consumption sensitive applications, the external reset capacitor value can be
reduced to limit the charge/discharge current. If NRST signal is used to reset external
circuitry, attention must be taken to the charge/discharge time of the external capacitor to
fulfill the external devices reset timing conditions. Minimum recommended capacity is 10 nF.
1. During the sample time, the sampling capacitance, C
ADC clock frequency—111 kHz—4 MHz kHz/MHz
ADC
Analog supply—3—5.5
DDA
Positive reference voltage—2.75—V
REF+
Negative reference voltage—V
REF-
—V
Conversion voltage range
AIN
Internal sample and hold capacitor———3pF
samp
Sampling time
(1)
S
(3 x 1/f
ADC
)
(1)
Wakeup time from standby
Total conversion time including
Devices with
external V
f
ADC
f
ADC
f
ADC
f
ADC
f
ADC
REF+
pins
V
REF-
= 2 MHz—1.5—
= 4 MHz—0.75—
= 2 MHz—7—
= 4 MHz3.5
= 2 MHz—7—
SSA
SSA
V
/
REF-
—0.5
—V
—V
DDA
DDA
REF+
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
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)
INJ(PIN)
3. TUE 2LSB can be reached on specific salestypes on the whole temperature range.
4. Target values.
(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
1.43
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)
(4)
4
(4)
4
(4)
3
(4)
2
LSB
(4)
Figure 43. 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
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 47.EMS data
SymbolParameterConditionsLevel/class
= 3.3 V, TA= 25 °C,
V
V
V
Voltage limits to be applied on any I/O pin
FESD
to induce a functional disturbance
Fast transient voltage burst limits to be
applied through 100 pF on VDD and V
Emission tests conform to the SAE J 1752/3 standard for test software, board layout and pin
loading.
Table 48.EMI data
Conditions
SymbolParameter
Peak level
S
EMI
SAE EMI level—22.52.5
1. Data based on characterization results, not tested in production.
General
conditions
V
= 5 V,
DD
= 25 °C,
T
A
LQFP80 package
conforming to SAE
J 1752/3
Monitored
frequency band
0.1 MHz to 30 MHz151722
30 MHz to 130 MHz182216
130 MHz to 1 GHz-135
Max f
8
MHz
CPU
16
MHz
(1)
Unit
24
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 49.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
(charge device model)
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 50.Electrical sensitivities
SymbolParameterConditionsClass
= 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).
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®
Figure 51. 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 56.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
Doc ID 14395 Rev 997/110
Ordering informationSTM8AF52/62xx, STM8AF51/61xx
STM8AF62AATDXXX
(2)
Y
Product class
8-bit automotive microcontroller
Program memory size
6 = 32 Kbytes
7 = 48 Kbytes
(3)
8 = 64 Kbytes
9 = 96 Kbytes
(3)
A= 128 Kbytes
Package type
T = LQFP
U = VFQFPN
Example:
Device family
51 = Silicon rev X, CAN/LIN
(3)
61 = Silicon rev X, LIN only
(3
52 = Silicon rev U and rev T, CAN/LIN
62 = Silicon rev U and rev T, 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
9= 64 pins
A = 80 pins
Packing
Y = Tray
U = Tube
X = Tape and reel compliant with EIA 481-C
12 Ordering information
Figure 52. Ordering information scheme
(1)
98/110Doc ID 14395 Rev 9
1. For a list of available options (e.g. memory size, package) and orderable part numbers or for further
2. Customer specific FASTROM code or custom device configuration. This field shows ‘SSS’ if the device
3. Not recommended for new design.
4. Available on STM8AFx2xx devices.
information on any aspect of this device, please go to www.st.comor contact the ST Sales Office nearest
to you.
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.
STM8AF52/62xx, STM8AF51/61xxSTM8 development tools
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 (SWIM), which allows non-intrusive debugging of
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.
Doc ID 14395 Rev 999/110
STM8 development toolsSTM8AF52/62xx, STM8AF51/61xx
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 Raiso
nance 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.
100/110Doc ID 14395 Rev 9
Loading...
+ hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.