dm00095362

UM1674
User manual
Getting started with the STM32F072 Discovery kit
Introduction
This document describes the software, firmware environment and development
recommendations required to build an application around the STM32F072 Discovery kit
(32F072BDISCOVERY) with demonstration firmware (STSW-STM32139).
The STM32F072 Discovery kit is a low-cost and easy-to-use development kit to quickly
evaluate and start applications with an STM32F0 series ARM® 32-bit Cortex™-M0
high-performance microcontroller. Before installing and using the product, please accept the
Evaluation Product License Agreement from www.st.com/stm32f0-discovery.
For more information on the STM32F072 Discovery kit, visit www.st.com/stm32f0-discovery.
To order the STM32F072 Discovery kit, use the STM32F072B-DISCO order code.
Figure 1. STM32F072 Discovery board: STM32F072B-DISCO
86%67/,1.
5)((3520
GDXJKWHUERDUG
FRQQHFWRU
([WHQVLRQ
KHDGHUV
86(5EXWWRQ
86%XVHU
670)5%7
PLFURFRQWUROOHU
5(6(7EXWWRQ
/LQHDUWRXFK
VHQVRU
069
References
 STM32F072x datasheet
 STM32F0x1/STM32F0x2/STM32F0x8 advanced ARM®-based 32-bit MCUs reference
manual (RM0091)
 Discovery kit for STM32F072 line (UM1690)
 Getting started with STM32F072 Discovery software development tools
 Forum: user questions/discussion
January 2014
DocID025256 Rev 1
1/9
www.st.com
Contents
UM1674
Contents
1
2
3
2/9
Quick start . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
1.1
Hardware requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
1.2
Run pre-loaded demo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
Firmware package . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
2.1
Package description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
2.2
Programming firmware application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
2.2.1
IDE requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
2.2.2
Programming application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
Revision history . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
DocID025256 Rev 1
UM1674
List of figures
List of figures
Figure 1.
Figure 2.
Figure 3.
STM32F072 Discovery board: STM32F072B-DISCO . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
Hardware environment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
Package contents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
DocID025256 Rev 1
3/9
3
Quick start
1
UM1674
Quick start
The STM32F072 Discovery kit demonstration software is already preloaded in the Flash
memory on the board. The latest versions of the source code and associated
documentation can be downloaded from www.st.com/stm32f0-discovery.
This document describes step-by-step how to start using the STM32F072 Discovery kit
demonstration.
1.1
Hardware requirements
To configure the STM32F072B-DISCO board and start the demo, two ‘USB type A to
Micro-B’ cables are required. Connect them between the host PC and the board as follows:

USB connector CN1: to power on the STM32F072B-DISCO board from the USB
ST-LINK

USB connector CN2: to connect the board to the host PC as a USB Device
Establish the connection with the STM32F072 Discovery board as shown in Figure 2.
Check jumper positions on the board, JP2 and CN5 are set to ON (Discovery mode).
Figure 2. Hardware environment
4/9
DocID025256 Rev 1
UM1674
1.2
Quick start
Run pre-loaded demo
Follow the sequence below (Function 0 to Function 3) to launch the demo application:
Function 1 is executed and each click on user button B1 changes the executed function
as shown in Table 1.
Table 1. STM32F072B-DISCO functions and LEDs
Function
LED
Displayed description
Main function
0
LD3/4/5/6
blinking
1
LD3/4/5/6
ON or OFF
2
LD3/6
blinking
Connect a second USB type A to Micro-B cable
between CN2 and the PC, then observe the mouse
cursor moving according to the board movement.
Standard mouse
3
LD3/4/5/6
ON or OFF
The LEDs will light up according to the position of the
user’s fingertip on the linear touch sensor.
Linear sensor
Four LEDs LD3, LD4, LD5,LD6 are blinking
LEDs blinking
The four LEDs will indicate the board movement.
MEMS sensor
The following is the detailed procedure and description of each function.
Function 0:
When connecting the STM32F072 Discovery board to a PC, the LEDs LD1 (COM)
and LD2 (PWR) will light up and four LEDs LD3, LD4, LD5, LD6 are blinking.
Function 1:
Press the User button B1 to enable the gyroscope MEMS sensor (L3GD20). The
four LEDs will indicate the board motion, direction and speed.
Function 2:
Connect STM32F072 Discovery board to a PC with a 'USB type A to Micro-B'
cable through USB connector CN2 (USB USER). This converts the board to a
standard mouse. Press User button to start the USB test. Move the STM32F072
Discovery board and see the mouse move according to the board movement.
Function 3:
Press the User button again to enable the linear touch sensor; the four LEDs will
be ON or Off according to the position of the fingertip on the linear touch sensor.
DocID025256 Rev 1
5/9
8
Firmware package
2
UM1674
Firmware package
To get started with the STM32F072 Discovery kit, a firmware package that contains a set of
IP examples and demos of some features is available at www.st.com/stm32f0-discovery.
2.1
Package description
The STM32F072 Discovery firmware applications and related documentation are provided
in one single package and supplied in one single ZIP file. The extraction of the ZIP file
generates one folder, STM32F072B-Discovery_FW_VX.Y.Z, which contains the following
subfolders:
Figure 3. Package contents
Libraries folder:

CMSIS subfolder: Cortex-M0 CMSIS files

STM32_USB_Device_Driver subfolder: USB device low-level driver

STM32_USB_Device_Library subfolder: USB device library core and class drivers

STM32F0xx_StdPeriph_Driver subfolder: standard peripherals drivers

STMTouch subfolder: STMTouch drivers
6/9
DocID025256 Rev 1
UM1674
Firmware package
Project folder:

Demonstration subfolder: firmware of preloaded demo

Master_Workspace subfolder: common project for all examples

Peripheral_Examples subfolder: examples ready to run

Template subfolder: pre-configured project templates
Utilities folder:

STM32F072-Discovery subfolder: for the abstraction layer of the supported board
The user can run examples provided within this package. A set of examples for each
peripheral are ready to be run.
2.2
Programming firmware application
2.2.1
IDE requirements
To start programming, user must:

Install the preferred Integrated Development Environment (IDE).

Install the ST-LINK/V2 driver from the ST web site.
Note:
Required information to download and install desired IDE and ST-LINK/V2 are detailed in
Getting started with STM32F072 Discovery software development tools.
2.2.2
Programming application
Several IP examples are provided with the firmware package (see Figure 3) under
STM32F072B-Discovery_FW_VX.Y.Z /Projects/ and the user must use one of the three tool
chains supported to program applications on the STM32F072B-DISCO board.
To program the Template example, follow the sequence below:
1. Open application folder STM32F072B-Discovery_FW_VX.Y.Z /Projects/Template.
2. Select the desired IDE project (EWARM for IAR, MDK-ARM for Keil or TrueSTUDIO for
Atollic).
3. Double click on the project file (for example, Template.eww for EWARM).
4. Rebuild all files: Project->Rebuild all.
5. Load project image: Project->Debug.
6. Run program: Debug->Go.
The demo software, as well as other software examples that allow you to discover the
STM32 F0 series features, are available at www.st.com/stm32f0-discovery.
DocID025256 Rev 1
7/9
8
Revision history
3
UM1674
Revision history
Table 2. Document revision history
8/9
Date
Revision
14-Jan-2014
1
Changes
Initial release.
DocID025256 Rev 1
UM1674
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.
ST PRODUCTS ARE NOT DESIGNED OR AUTHORIZED FOR USE IN: (A) SAFETY CRITICAL APPLICATIONS SUCH AS LIFE
SUPPORTING, ACTIVE IMPLANTED DEVICES OR SYSTEMS WITH PRODUCT FUNCTIONAL SAFETY REQUIREMENTS; (B)
AERONAUTIC APPLICATIONS; (C) AUTOMOTIVE APPLICATIONS OR ENVIRONMENTS, AND/OR (D) AEROSPACE APPLICATIONS
OR ENVIRONMENTS. WHERE ST PRODUCTS ARE NOT DESIGNED FOR SUCH USE, THE PURCHASER SHALL USE PRODUCTS AT
PURCHASER’S SOLE RISK, EVEN IF ST HAS BEEN INFORMED IN WRITING OF SUCH USAGE, UNLESS A PRODUCT IS
EXPRESSLY DESIGNATED BY ST AS BEING INTENDED FOR “AUTOMOTIVE, AUTOMOTIVE SAFETY OR MEDICAL” INDUSTRY
DOMAINS ACCORDING TO ST PRODUCT DESIGN SPECIFICATIONS. PRODUCTS FORMALLY ESCC, QML OR JAN QUALIFIED ARE
DEEMED SUITABLE FOR USE IN AEROSPACE BY THE CORRESPONDING GOVERNMENTAL AGENCY.
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.
© 2014 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
DocID025256 Rev 1
9/9
9
Similar pages