UM0970
User Manual
STM8L-DISCOVERY
Introduction
The STM8L-DISCOVERY helps you to discover the STM8L ultralow power features and to
develop and share your applications. It is based on an STM8L152C6T6 and includes an
ST-Link embedded debug tool interface, LCD (24 segments, 4 commons), LEDs and push
buttons.
Figure 1.
STM8L-DISCOVERY board
June 2011
Doc ID 17693 Rev 2
1/30
www.st.com
Contents
UM0970
Contents
1
Quick start . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.1
1.2
1.3
1.4
1.5
Getting started . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
System requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
Development toolchain . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
Demonstration software . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
Order code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
2
3
Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
Hardware and layout . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
3.1
3.2
STM8L152C6T6 microcontroller . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
Embedded ST-Link . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
3.2.1
3.2.2
Using the ST-Link to program/debug the STM8L on board . . . . . . . . . . 12
Using the ST-Link to program/debug an external STM8L application . . 12
3.3
3.4
3.5
3.6
Power supply and power selection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
LEDs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
Push buttons . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
Built-in IDD measurement circuit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
3.6.1
3.6.2
3.6.3
3.6.4
Run mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
Low power mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
Low power mode I
DD
measurement principle . . . . . . . . . . . . . . . . . . . . 15
Ibias current measurement procedure . . . . . . . . . . . . . . . . . . . . . . . . . . 16
3.7
3.8
Solder bridges . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
LCD (24 segments, 4 commons) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
4
5
6
7
Extension connection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
Mechanical drawing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
Electrical schematics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
Revision history . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
2/30
Doc ID 17693 Rev 2
UM0970
Quick start
1
Quick start
The STM8L-DISCOVERY is a low-cost and easy-to-use development kit to quickly evaluate
and start a development with an STM8L ultralow power microcontroller.
For more information on the STM8L-DISCOVERY and for demonstration software visit
www.st.com/stm8l-discovery.
1.1
Getting started
1.
2.
3.
Check jumper positions on the board, JP1 and CN3 ON (Discovery selected).
Connect the STM8L-DISCOVERY board to a PC with a USB cable to power the board.
Red LED LD2 (PWR) then lights up.
Function 1 is executed and each click on user button B2 changes the executed function
as described in
Table 1.
Functions
Bars
Value displayed
STM8L V
DD
voltage measured
Table 1.
Function LED LD3/4
1
Blink
2
Off
STM8L consumption measured in Run mode
3
Off
STM8L consumption measured in Low power mode, LCD on
4
Off
STM8L consumption measured in Low power mode, LCD off
5
Off
STM8L consumption measured in Halt mode, LCD off
To study or modify the DISCOVER project related to this demo, visit www.st.com/stm8l-
discovery and follow the tutorial. Discover the STM8L features, download and execute
programs proposed in the list of projects. This site also contains examples from which you
can develop your own applications.
1.2
System requirements
●
●
Windows PC (2000, XP, Vista)
A/Mini-B USB cable
Doc ID 17693 Rev 2
3/30
Quick start
UM0970
1.3
Development toolchain
●
●
IAR, Embedded Workbench® for STM8
STMicroelectronics, ST Visual Develop (STVD)
1.4
Demonstration software
Demonstration software is preloaded in the board's Flash memory. This demonstration uses
the built-in IDD measurement feature of the STM8L-DISCOVERY to automatically measure
and display on the LCD the consumption of the MCU in run and low power modes.
The latest versions of this demonstration source code and associated documentation can
be downloaded from www.st.com/stm8l-discovery.
1.5
Order code
To order the STM8L ultralow power Discovery, use the order code STM8L-DISCOVERY.
4/30
Doc ID 17693 Rev 2
UM0970
Features
2
Features
The STM8L-DISCOVERY offers the following features:
●
●
●
●
●
●
●
●
●
●
STM8L152C6T6 microcontroller, 32 KB Flash, 2 KB RAM, 1 KB EEPROM in 48-pin
LQFP
On-board ST-Link with selection mode switch to use the kit as a stand-alone ST-Link
(with SWIM connector for programming and debugging)
Two red LEDs; LD1 for USB communication, LD2 for 3.3 V power on
Designed to be powered by USB or an external supply of 5 V or 3.3 V
Can supply target application with 5 volts and 3 volts
Two user LEDs, LD3 and LD4 (green and blue)
Two push buttons (User and Reset)
I
DD
current measurement
LCD 28-pin DIP (24 segments, 4 commons)
Extension header for all QFP48 I/Os for quick connection to prototyping board for easy
probing
Doc ID 17693 Rev 2
5/30