English
Language : 

PM0054 Datasheet, PDF (1/28 Pages) STMicroelectronics – How to program STM8L and STM8AL Flash program memory and data EEPROM
PM0054
Programming manual
How to program STM8L and STM8AL Flash program memory
and data EEPROM
Introduction
This manual describes how to program Flash program memory and data EEPROM on
STM8 microcontrollers. It applies to low density STM8L05x/15x/STM8L101x, medium and
medium+ density STM8L05x/15x, high density STM8L05x/15x/16x, medium density
STM8AL31xx and STM8AL3Lxx devices. It is intended to provide information for
programming tool manufacturers and for customers who want to implement programming
themselves on their production line.
The in-circuit programming (ICP) method is used to update the content of Flash program
memory and data EEPROM while the user software is not running. It uses the single wire
interface module (SWIM) to communicate between the programming tool and the device.
In contrast to the ICP method, in-application programming (IAP) can use any
communication interface supported by the microcontroller (I/Os, SPI, USART, I2C, USB,
CAN...). IAP has been implemented for users who want their application software to update
itself by re-programming the Flash program memory during program execution. The main
advantage of IAP is its ability to re-program Flash program memory and data EEPROM
when the chip has already been soldered on the application board and while the user
software is running. Nevertheless, part of the Flash program memory has to be previously
programmed using ICP.
Some devices also contain a bootloader embedded in a ROM memory. Through this
firmware the device memory can be re-programmed using a standard communication
interface. This programming method is not described in this document.
For details on memory implementation and features, registers or stack top addresses, refer
to the product datasheets.
Table 1. Applicable products
Type
Part numbers
Microcontrollers
STM8L051F3
STM8L052C6/STM8L052R8
STM8L101x1/STM8L101x2/STM8L101x3
STM8L151x2/STM8L151x3/STM8L151x4/STM8L151x6/STM8L151x8
STM8L152x4/STM8L152x6/STM8L152x8
STM8L162x8
STM8AL313x, STM8AL314x, STM8AL316x, STM8AL3L4x, STM8AL3L6x
December 2012
Doc ID 15433 Rev 9
1/28
www.st.com