STM8L-DISCOVERY User Manual: Getting Started Guide

UM1014 User Manual

Getting started with STM8L-DISCOVERY

Introduction

The STM8L-DISCOVERY, based on the STM8L152C6T6, is a quick-start evaluation board for 8-bit ultralow-power MCUs. It offers the cheapest and quickest way to discover the STM8L, program and use the device, and build and debug applications. It includes the embedded debugger ST-LINK and an IDD measurement feature to help explore ultralow power efficiency.

Connect the STM8L-DISCOVERY to a PC via a standard USB cable to run the pre-programmed example. The debugger allows real-time code execution tracking. Numerous application examples are provided for learning, reusing, and modifying source code, suitable for quick proof-of-concept evaluations or demonstration prototypes. The STM8L-DISCOVERY is ideal for hobbyists, developers, students, and support teams.

Use this document as a guide to quickly become familiar with the STM8L-DISCOVERY and its capabilities. For user manuals and application notes related to the STM8L-DISCOVERY, visit www.st.com/stm8l-discovery.

Reference Documents

  • STM8L-DISCOVERY evaluation board user manual (UM0970)
  • STM8L-DISCOVERY software user manual: Developing and debugging your STM8L-DISCOVERY application code (UM0991)
  • ST Visual Develop (STVD) user manual (UM0036)
  • Introduction to STM8L15x power saving modes using the STM8L-DISCOVERY IDD measurement feature (AN3269)
  • Building a wave generator using STM8L-DISCOVERY (AN3252)
  • STM8L15x reference manual (RM0031)
  • STM8L15xx datasheet

1 Getting started

1.1 System requirements

Before using the STM8L-DISCOVERY, the following material is required:

  • A Windows PC (2000, XP, Vista)
  • A USB type A to mini-B cable

1.2 Quick start tutorial (less than 20 min)

Start running one of the many STM8L-DISCOVERY application examples from scratch in less than 20 minutes.

1.2.1 Software environment

1. Download your free software environment (IDE). Choose between:

  • ST's MCU toolset: ST Visual Develop (STVD) and ST Visual Programmer (STVP), available on www.st.com.
  • IAR Embedded Workbench for STM8 Kickstart edition (8K-limited), available on www.iar.com, Downloads tab.

Note: While IAR Embedded Workbench for STM8 includes its own compiler, STVD must be used with either Cosmic or Raisonance compilers.

2. Download your free compilers:

Please note that the Cosmic 32 K version does not include direct support from Cosmic. For installation details, read Chapter 2 of UM0991, available on www.st.com/stm8l-discovery.

1.2.2 Connect the STM8L-DISCOVERY to the host PC

The STM8L-DISCOVERY comes pre-programmed with the Discover demo, showcasing the STM8L15x power-saving modes using the built-in IDD measurement feature.

Connect the STM8L-DISCOVERY to your PC using a USB cable. The application starts immediately, displaying dynamically on the LCD. The user can select the STM8L real-time power consumption in each mode using the User push-button. Download application note AN3269 from www.st.com/stm8l-discovery for more details about this demo.

1.2.3 Running the STM8L-DISCOVERY application examples

Numerous application examples for the STM8L-DISCOVERY are available on www.st.com/stm8l-discovery.

Ensure your free software environment (STVD) is correctly installed.

1. Download an application example and its associated application note from www.st.com/stm8l-discovery and extract the directory STM8L-DISCOVERY_Example on your PC.

  • Cosmic: STM8L-Discovery_Example/Project/Example/STVD/Cosmic/Example.stw
  • Raisonance: STM8L-Discovery_Example/Project/Example/STVD/Raisonance/Example.stw

2. Configure STVD to use ST-LINK as a debug instrument:

  • Click Debug Instrument -> Target Settings.
  • Select target Swim ST-LINK in the target list.

3. Select the appropriate MCU:

  • Go to Projects > Settings > MCU and select STM8L152C6 from the MCU list.
  • Ensure the MCU is displayed in the "selected MCU" field before clicking OK.

4. Click Build -> Rebuild All to build your application.

5. Click Debug -> Start Debugging to download your application to the STM8L program memory and start the debug session.

6. Run the application code in Debug or Stand-alone mode:

  • a) Click Debug -> Run to run in debug mode.
  • b) Click Debug -> Stop Debugging to disconnect the debugger; the application then runs immediately in stand-alone mode.

Once the selected application is running, check if it operates as described in the associated application note.

Note: Some examples may require additional components. Refer to the specific application note for details.

Table 1. Bars and LCD display linked to functions
Bars LED3/LED4 Displayed on the LCD
[Dotted pattern] Blink STM8L VDD voltage measured
[Dotted pattern] OFF STM8L power consumption in Run mode
[Dotted pattern] OFF STM8L power consumption in Low power run mode with LCD on
[Dotted pattern] OFF STM8L power consumption in Low power run mode with LCD off
[Dotted pattern] OFF STM8L power consumption in Halt mode
1.2.4 Developing your own application

1. Install your chosen free software environment (IDE and/or compilers) as per Section 1.2.1.

2. Install the STM8L-DISCOVERY development package:

  • Download STM8L-Discovery_dev.zip from www.st.com/stm8l-discovery (available with UM0991). Extract the directory structure on your PC.
  • Duplicate the project_template directory and rename it (e.g., My_own_project).

3. Run your Integrated Development Environment.

4. Select File -> Open Workspace.

5. Browse for the project file (.stw) of My_own_project according to your selected IDE/compiler:

  • STVD with Cosmic: STM8L-Discovery_My_own_project/Project/My_own_project/STVD/Cosmic/STVD_workspace.stw
  • STVD with Raisonance: STM8L-Discovery_My_own_project/Project/My_own_project/STVD/Raisonance/STVD_workspace.stw
  • IAR Embedded Workbench (EWSTM8): STM8L-Discovery_My_own_project/Project/My_own_project/STVD/EWSTM8/workspace.stw

This procedure provides a pre-structured project workspace, simplifying your project design. Detailed instructions on project creation are in user manual UM0991, available for download from www.st.com/stm8l-discovery.

2 Support

Visit the STM8L-DISCOVERY forum on www.st.com/stm8l-discovery.

Contact technical support on www.st.com.

3 Revision history

Table 2. Document revision history
Date Revision Changes
09-Dec-2010 1 Initial release.
06-Jan-2011 2 Updated ST's MCU toolset URL under Section 1.2.1.

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 AN AUTHORIZED ST REPRESENTATIVE, ST PRODUCTS ARE NOT RECOMMENDED, AUTHORIZED, OR WARRANTED FOR USE IN MILITARY, AIRCRAFT, 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.

© 2011 STMicroelectronics - All rights reserved. STMicroelectronics group of companies: Australia, Belgium, Brazil, Canada, China, Czech Republic, Finland, France, Germany, Hong Kong, India, Israel, Italy, Japan, Malaysia, Malta, Morocco, Philippines, Singapore, Spain, Sweden, Switzerland, United Kingdom, United States of America. www.st.com

PDF preview unavailable. Download the PDF instead.

CD00288322 C2 v2.1.0.1 build 007 - c2 rendition config : Techlit Active Acrobat Distiller 9.2.0 (Windows) (via http://big.faceless.org/products/pdf?version=2.6.5)

Related Documents

Preview STM8SVLDISCOVERY User Manual - STMicroelectronics
User manual for the STM8SVLDISCOVERY evaluation kit from STMicroelectronics, detailing features, hardware layout, microcontroller, ST-LINK, and connection options for the STM8S value line.
Preview ST Visual Develop (STVD) for Microcontroller Applications
Explore ST Visual Develop (STVD), a comprehensive IDE for efficient microcontroller application development. Learn about its features for writing, building, debugging, and programming with ST microcontrollers, including C compiler integration and advanced debugging tools.
Preview STM32 Nucleo-144 Boards User Manual - STMicroelectronics
Explore and prototype with STMicroelectronics STM32 Nucleo-144 development boards (NUCLEO-L496ZG, NUCLEO-L496ZG-P). This user manual details features, hardware, integrated ST-LINK/V2-1 debugger, Arduino Uno V3 compatibility, and software libraries for embedded system development.
Preview STM32 Nucleo-144 Boards (MB1137) User Manual
This user manual details the STM32 Nucleo-144 boards (MB1137) from STMicroelectronics. It covers features, ordering information, development environment, hardware layout, and compliance statements for these versatile microcontroller development kits, which include an integrated ST-LINK/V2-1 debugger and support for ARDUINO Uno V3 shields.
Preview NUCLEO-L496ZG STM32 Nucleo-144 Board Data Brief
Data brief for the STMicroelectronics NUCLEO-L496ZG STM32 Nucleo-144 development board. Details features, system requirements, development toolchains, demonstration software, and ordering information for the STM32L496ZGT6 microcontroller.
Preview STM32 Nucleo-144 Boards (MB1137) User Manual - STMicroelectronics
This user manual provides detailed information on the STM32 Nucleo-144 development boards (MB1137) from STMicroelectronics. Discover features, hardware layout, configuration options, and quick start guides for STM32 microcontroller prototyping.
Preview STM32429I-EVAL Evaluation Board User Manual - STMicroelectronics
Comprehensive user manual for the STMicroelectronics STM32429I-EVAL evaluation board, featuring the STM32F429NIH6 microcontroller. Details hardware, peripherals, connectors, and development support for embedded system design.
Preview STM32 Nucleo-144 Boards (MB1137) User Manual
Explore the STM32 Nucleo-144 boards (MB1137) from STMicroelectronics. This user manual details features, development environment, hardware layout, and ordering information for these versatile microcontroller development kits, ideal for prototyping and embedded system design.