Discovery kit for STM32F030 Value Line microcontrollers
Introduction
The STM32F030 Value Line Discovery kit (32F0308DISCOVERY) helps you to discover the
device features and to develop your applications easily. It is based on STM32F030R8T6, an
STM32 F0 series 32-bit ARM
embedded debug tool, LEDs, push buttons and a prototyping board.
®
Cortex™-M0 microcontroller, and includes an ST-LINK/V2
Tabl e 1 provides the definition of some conventions used in the present document.
Convention Definition
Jumper JP1 ON Jumper fitted
Jumper JP1 OFF Jumper not fitted
Solder bridge SBx ON SBx connections closed by solder
Solder bridge SBx OFF SBx connections left open
Table 1. ON/OFF conventions
DocID025097 Rev 15/39
38
Quick startUM1658
2 Quick start
The STM32F030 Value Line Discovery kit is a low-cost and easy-to-use development kit to
quickly evaluate and start development with an STM32 F0 series 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 STM32F030 Value Line Discovery kit and for demonstration
software, visit www.st.com/stm32f0-discovery.
2.1 Getting started
Follow the sequence below to configure the STM32F030 Value Line Discovery kit and
launch the DISCOVER application:
1.Check jumper position on the board, JP2 on, CN2 on (Discovery selected).
2. Connect the 32F0308DISCOVERY board to a PC with a USB cable ‘type A to mini-B’
through USB connector CN1 to power the board. Red LED LD1 (PWR) and LD2 (COM)
light up and green LED LD3 blinks.
3. Press user button B1 (bottom left corner of the board).
4. Observe how the green LED LD3 blinking changes according to USER button B1
clicks.
5. Each click on USER button B1 is confirmed by the blue LED LD4.
6. To study or modify the DISCOVER project related to this demo, visit
www.st.com/stm32f0-discovery and follow the tutorial.
7. Discover the STM32F0 features, download and execute programs proposed in the list
of projects.
8. Develop your own application using available examples.
2.2 System requirements
•Windows PC (XP, Vista, 7)
•USB type A to Mini-B USB cable
2.3 Development toolchains supporting the 32F0308DISCOVERY
•Altium®, TASKING™ VX-toolset
•ARM®, Atollic TrueSTUDIO®
•IAR™, EWARM (IAR Embedded Workbench®)
•Keil™, MDK-ARM™
2.4 Order code
To order the STM32F030 Value Line Discovery kit, use the order code
STM32F0308-DISCO.
6/39DocID025097 Rev 1
UM1658Features
3 Features
The STM32F030 Value Line Discovery kit offers the following features:
•STM32F030R8T6 microcontroller featuring 64 KB Flash, 8 KB RAM in an LQFP64
package
•On-board ST-LINK/V2 with selection mode switch to use the kit as a standalone
ST-LINK/V2 (with SWD connector for programming and debugging)
•Board power supply: through USB bus or from an external 5 V supply voltage
•External application power supply: 3 V and 5 V
•Four LEDs:
–LD1 (red) for 3.3 V power on
–LD2 (red/green) for USB communication
–LD3 (green) for PC9 output
–LD4 (blue) for PC8 output
•Two push buttons (user and reset)
•Extension header for LQFP64 I/Os for quick connection to prototyping board and easy
probing.
•An additional board is provided with the kit which can be connected to the extension
connector for even easier prototyping and probing.
•A large number of free ready-to-run application firmware examples are available on
www.st.com/stm32f0-discovery to support quick evaluation and development.
DocID025097 Rev 17/39
38
Hardware and layoutUM1658
MSv31935V1
I/O
Mini
USB
LD3, PC9
B2
RST
RESET
I/OI/O
Header
SWD
Embedded
ST-LINK/V2
STM32F030R8T6
LED
Header
B1
USER
LD4, PC8
LED
4 Hardware and layout
The STM32F030 Value Line Discovery board is designed around the STM32F030R8T6
microcontroller in a 64-pin LQFP package.
Figure 2 illustrates the connections between the STM32F030R8T6 and its peripherals
(ST-LINK/V2, push button, LEDs and connectors).
Figure 3 and Figure 4 help you to locate these features on the STM32F030 Value Line
Discovery board.
Figure 2. Hardware block diagram
8/39DocID025097 Rev 1
UM1658Hardware and layout
(red/green LED) LD2
COM
CN3
SWD connector
IDD measurement
ST-LINK/V2
B1 user button
B2 reset button
LD1 (red LED)
PWR
CN2
ST-LINK/DISCOVERY
selector
(green LED) LD3
LD4 (blue LED)
STM32F030R8T6
JP2
5V power supply
input output
3V power supply
input output
SB1 (VDD)
SB3 (B1-USER)
SB4 (B2-RESET)
MS31936V1
MB1134 revA
STM32F0308-DISCO
Figure 3. Top layout
Note:Pin 1 of CN2, CN3, P1 and P2 connectors are identified by a square.
DocID025097 Rev 19/39
38
Hardware and layoutUM1658
SB6, SB8, SB10, SB12
MS30025V1
SB5, SB7, SB9, SB11
(RESERVED)
(DEFAULT)
SB20, SB21 (X3 crystal)
SB14, SB15 (RX, TX)
SB19 (NRST)
SB16, SB17 (X2 crystal)
SB13 (STM_RST)
SB22 (T_SWO)
SB18 (MCO)
Figure 4. Bottom layout
10/39DocID025097 Rev 1
UM1658Hardware and layout
MS31938V1
STM32F030R8T6
64 Kbyte of Flash memory
8 Kbytes of SRAM
LQFP64 10 x 10 mm
4.1 STM32F030R8T6 microcontroller
The STM32F030R8T6 microcontroller incorporates the high-performance ARM
Cortex™-M0 32-bit RISC core operating at a 48 MHz frequency, high-speed embedded
memories (up to 64 Kbytes of Flash memory and up to 8 Kbytes of SRAM), and an
extensive range of enhanced peripherals and I/Os. All devices offer standard
communication interfaces (up to two I
12-bit ADC, up to 6 general-purpose 16-bit timers and an advanced-control PWM timer.
Figure 5. STM32F030R8T6 package
The STM32F030R8T6 microcontroller operates in the -40 to +85 °C temperature range,
from a 2.4 V to 3.6 V power supply. A comprehensive set of power-saving modes allows the
design of low-power applications.
2
Cs, up to two SPIs, and up to two USARTs), one
These features make the STM32F030R8T6 microcontroller suitable for a wide range of
applications such as application control and user interfaces, handheld equipment,
A/V receivers and digital TV, PC peripherals, gaming platforms, e-bikes, consumer
appliances, printers, scanners, alarm systems, video intercoms, and HVACs.
DocID025097 Rev 111/39
38
MSv32137V1
4 channels
3 compl. channels
BRK, ETR input as AF
4 ch., ETR as AF
1 channel as AF
2 channels
1 compl, BRK as AF
1 channel
1 compl, BRK as AF
1 channel
1 compl, BRK as AF
IR_OUT as AF
RX, TX,CTS, RTS,
CK as AF
RX, TX,CTS, RTS,
CK as AF
The ST-LINK/V2 programming and debugging tool is integrated on the
32F0308DISCOVERY. The embedded ST-LINK/V2 can be used in 2 different ways
according to the jumper states (see Tab le 2 ):
•Program/debug the MCU on board,
•Program/debug an MCU in an external application board using a cable connected to
SWD connector CN3.
The embedded ST-LINK/V2 supports only SWD for STM32 devices. For information about
debugging and programming features refer to user manual UM1075 (ST-LINK/V2 in-circuit debugger/programmer for STM8 and STM32) which describes in detail all the ST-LINK/V2
features.
Figure 7. Typical configuration
Table 2. Jumper states
Jumper state Description
Both CN2 jumpers ON ST-LINK/V2 functions enabled for on board programming (default)
Both CN2 jumpers OFF
ST-LINK/V2 functions enabled for application through external CN3
connector (SWD supported)
DocID025097 Rev 113/39
38
Hardware and layoutUM1658
CN2 jumpers on
CN3
SWD connector
4.2.1 Using ST-LINK/V2 to program/debug the STM32 F0 on board
To program the STM32 F0 on board, simply plug in the two jumpers on CN2, as shown in
Figure 8 in red, but do not use the CN3 connector as that could disturb communication with
the STM32F030R8T6 of the 32F0308DISCOVERY.
Figure 8. 32F0308DISCOVERY connections image
14/39DocID025097 Rev 1
UM1658Hardware and layout
CN2 jumpers off
CN3
SWD connector
C
ju
4.2.2 Using ST-LINK/V2 to program/debug an external STM32 application
It is very easy to use the ST-LINK/V2 to program the STM32 on an external application.
Simply remove the 2 jumpers from CN2 as shown in Figure 9, and connect your application
to the CN3 debug connector according to Tab le 3.
Note:SB19 and SB22 must be OFF if you use CN3 pin 5 in your external application.
Pin CN3Designation
1 VDD_TARGET VDD from application
2 SWCLK SWD clock
3 GND Ground
4 SWDIO SWD data input/output
5 NRST RESET of target MCU
6 SWO Reserved
Table 3. Debug connector CN3 (SWD)
Figure 9. ST-LINK connections image
mpers off
N2
DocID025097 Rev 115/39
38
Hardware and layoutUM1658
4.3 Power supply and power selection
The power supply is provided either by the host PC through the USB cable, or by an
external 5 V power supply.
The D1 and D2 diodes protect the 5 V and 3 V pins from external power supplies:
•5 V and 3 V can be used as output power supplies when another application board is
connected to pins P1 and P2.
In this case, the 5 V and 3 V pins deliver a 5 V or 3 V power supply and power
consumption must be lower than 100 mA.
•5 V can also be used as input power supplies; for example, when the USB connector is
not connected to the PC.
In this case, the 32F0308DISCOVERY board must be powered by a power supply unit
or by auxiliary equipment complying with standard EN-60950-1: 2006+A11/2009, and
must be Safety Extra Low Voltage (SELV) with limited power capability.
4.4 LEDs
•LD1 PWR: Red LED indicates that the board is powered.
•LD2 COM: Tricolor LED (COM) advises on the communication status as follows:
–Slow blinking Red LED/Off: At power on before USB initialization
–Fast blinking Red LED/Off: After the first correct communication between PC and
STLINK/V2 (enumeration)
–Red LED On: When initialization between PC and ST-LINK/V2 is successfully
finished
–Green LED On: After successful target communication initialization
–Blinking Red/Green LED: During communication with target
–Red LED On: Communication finished and OK
–Orange LED On: Communication failure
•User LD3: Green user LED connected to the I/O PC9 of the STM32F030R8T6.
•User LD4: Blue user LED connected to the I/O PC8 of the STM32F030R8T6.
4.5 Push buttons
•B1 USER: User push button connected to the I/O PA0 of the STM32F030R8T6.
•B2 RESET: Push button used to RESET the STM32F030R8T6.
4.6 JP2 (Idd)
Jumper JP2, labeled Idd, allows the consumption of STM32F030R8T6 to be measured by
removing the jumper and connecting an ammeter.
•Jumper on: STM32F030R8T6 is powered (default).
•Jumper off: an ammeter must be connected to measure the STM32F030R8T6 current,
(if there is no ammeter, the STM32F030R8T6 is not powered).
16/39DocID025097 Rev 1
UM1658Hardware and layout
4.7 OSC clock
4.7.1 OSC clock supply
PF0 and PF1 can be used as GPIO or as HSE oscillator. By default these I/Os are
configured as GPIO, so SB16 and SB17 are closed, SB18 is open and R22, R23, C13 and
C14 are not populated.
An external HSE clock can be provided to the MCU in three ways:
•MCO from ST-LINK. From MCO of the STM32F103. This frequency cannot be
changed, it is fixed at 8 MHz and connected to PF0-OSC_IN of the STM32F030R8T6.
Configuration needed:
–SB16, SB18 CLOSED
–R22, R23 removed
–SB17 OPEN
•Oscillator onboard. From X2 crystal (not provided). For typical frequencies and its
capacitors and resistors, please refer to the STM32F030R8T6 datasheet.
Configuration needed:
–SB16, SB17, SB18 OPEN
–R22, R23, C13, C14 soldered
•Oscillator from external PF0. From external oscillator through pin 7 of the P1
connector. Configuration needed:
–SB16, SB17 CLOSED
–SB18 OPEN
–R22 and R23 removed
4.7.2 OSC 32 KHz clock supply
PC14 and PC15 can be used as GPIO or as LSE oscillator. By default these I/Os are
configured as GPIO, so SB20 & SB21 are closed and X3, R24, R25 are not populated.
An external LSE clock can be provided to the MCU in two ways:
•Oscillator onboard. From X3 crystal (not provided). Configuration needed:
–SB20, SB21 OPEN
–C15, C16, R24 and R25 soldered.
•Oscillator from external PC14. From external oscillator trough the pin 5 of P1
connector. Configuration needed:
–SB20, SB21 CLOSED
–R24 and R25 removed
DocID025097 Rev 117/39
38
Hardware and layoutUM1658
4.8 Solder bridges
SB16,17
(X2 crystal)
Bridge State
OFF
(2)
ON PF0, PF1 are connected to P1 (R22, R23 and SB18 must not be fitted).
Table 4. Solder bridge settings
(1)
Description
X2, C13, C14, R22 and R23 provide a clock. PF0, PF1 are disconnected
from P1.
SB6,8,10,12 (Default) ON Reserved, do not modify.
SB5,7,9,11 (Reserved) OFF Reserved, do not modify.
SB20,21
(X3 crystal)
SB4
(B2-RESET)
SB3
(B1-USER)
SB1
(VDD_3)
OFF
ON PC14, PC15 are only connected to P1 (R24, R25 must not be fitted).
ON
OFF
ON B1 push button is connected to PA0.
OFF B1 push button is not connected to PA0.
ON VDD_3 must be permanently connected to VDD for normal use.
OFF Reserved, do not modify.
X3, C15, C16, R24 and R25 deliver a 32 KHz clock. PC14, PC15 are not
connected to P1.
B2 push button is connected to the NRST pin of the STM32F030R8T6
MCU.
B2 push button is not connected the NRST pin of the STM32F030R8T6
MCU.
SB14,15
(RX,TX)
SB19
(NRST)
SB22
(T_SWO)
SB13
(STM_RST)
SB2
(BOOT0)
SB18
(2)
(MCO)
1. Default SBx state is shown in bold.
2. OSC_IN clock comes from MCO if SB18 is ON and SB16,17 are OFF
and comes from X2 if SB18 is OFF and SB16,17 are ON.
OFF Reserved, do not modify.
ON Reserved, do not modify.
ON
OFF
NRST signal of the CN3 connector is connected to the NRST pin of the
STM32F030R8T6 MCU.
NRST signal of the CN3 connector is not connected to the NRST pin of the
STM32F030R8T6 MCU.
ONSWO signal of the CN3 connector is connected to PB3.
OFF SWO signal is not connected.
OFFNo incidence on STM32F103C8T6 (ST-LINK/V2) NRST signal.
ON STM32F103C8T6 (ST-LINK/V2) NRST signal is connected to GND.
ON
OFF
BOOT0 signal of the STM32F030R8T6 MCU is held low through a
510 Ohm pull-down resistor.
BOOT0 signal of the STM32F030R8T6 MCU can be set high through a
10 KOhm pull-up resistor R27 to solder.
ONProvides the 8 MHz for OSC_IN from MCO of STM32F030R8T6.
OFF See SB16, SB17 description.
18/39DocID025097 Rev 1
UM1658Hardware and layout
4.9 Extension connectors
The male headers P1 and P2 can connect the 32F0308DISCOVERY to a standard
prototyping/wrapping board. STM32F030R8T6 GPI/Os are available on these connectors.
P1 and P2 can also be probed by an oscilloscope, logical analyzer or voltmeter.
Table 5. MCU pin description versus board function
MCU pinBoard function
Push button
LQFP64
Main
function
BOOT0BOOT0606
NRSTNRST7
USART1_CTS,
USART2_CTS,
PA0
PA1
PA2
PA3
ADC_IN0,
RTC_TAMP2,
WKUP1
USART1_RTS,
USART2_RTS,
EVENTOUT,
ADC_IN1
USART1_TX,
USART2_TX,
TIM15_CH1,
ADC_IN2
USART1_RX,
USART2_RX,
TIM15_CH2,
ADC_IN3
Alternate
functions
RESET
USER
14
15
16
17
LED
SWD
NRST
OSC
Power supply
Free I/O
CN3
P1
510
15
16
17
18
P2
PA4
PA5
SPI1_NSS,
USART1_CK
USART2_CK,
TIM14_CH1,
ADC_IN4
SPI1_SCK,
ADC_IN5
20
21
DocID025097 Rev 119/39
21
22
38
Hardware and layoutUM1658
Table 5. MCU pin description versus board function (continued)
Table 5. MCU pin description versus board function (continued)
MCU pinBoard function
Power supply
Free I/O
CN3
P1
Main
function
Alternate
functions
LQFP64
Push button
LED
SWD
OSC
PC11-5214
PC12-53
13
RTC_TAMP1,
PC13
RTC_TS,
RTC_OUT,
2
4
WKUP2
OSC32_IN
PC14OSC32_INOSC32_IN3
5
OSC32_OUT
PC15OSC32_
OSC32_OUT4
6
OUT
P2
PD2TIM3_ETR5412
OSC_IN
PF0OSC_IN
OSC_IN5
7
OSC_OUT
PF1OSC_
OSC_OUT6
8
OUT
PF4EVENTOUT18
PF5EVENTOUT19
PF6
PF7
I2C1_SCL,
I2C2_SCL
I2C1_SDA,
I2C2_SDA
47
48
19
20
19
18
VDD_3VDD13
VDD_164
VDD_232
VDDA13
DocID025097 Rev 123/39
38
Hardware and layoutUM1658
Table 5. MCU pin description versus board function (continued)
MCU pinBoard function
Main
function
VSS_163
VSS_231
VSSA12
Alternate
functions
LQFP64
Push button
LED
SWD
GND
OSC
Power supply
Free I/O
CN3
5V1
3V1
VDD
GND
GND
3
GND
GND
P1
P2
5
22
9
3333
24/39DocID025097 Rev 1
UM1658Connecting modules on the prototyping board
5 Connecting modules on the prototyping board
This section gives some examples of how to connect ready-to-use modules available from
different manufacturers to the STM32F030 Value Line Discovery kit via the prototyping
board included in the kit.
Software examples, based on the connections described below, are available at
www.st.com/stm32f0-discovery.
5.1 Mikroelektronica accessory boards
Mikroelektronika, http://www.mikroe.com, has specified two standard connectors for their
accessory boards, named mikroBUS™ (http://www.mikroe.com/mikrobus_specs.pdf) and
IDC10.
MikroBUS™ is a 16-pin connector to connect accessory boards very quickly and easily to a
microcontroller board through SPI, USART or I
2
C communications, along with additional
pins such as Analog Input, PWM and Interrupt.
The set of mikroElektronika boards compatible with mikroBUS™ is called “Click boards”.
IDC10 is a 10-pin connector to connect the general purpose I/O of an MCU to other
accessory boards.
The tables below are one solution for connecting mikroBUS™ and IDC boards to the
32F0308DISCOVERY; this solution used in the different examples is available at
The Figure 10 illustrates the connections between the 32F0308DISCOVERY and the 2
connectors, IDC10 and mikroBUS™.
Figure 10. Using IDC10 and mikroBUS™ connectors
DocID025097 Rev 127/39
38
Connecting modules on the prototyping boardUM1658
5.2 ST MEMS “adapter boards”, standard DIL24 socket
STMicroelectronics has defined a standard DIL24 connector to easily evaluate its MEMS
sensors connected to a microcontroller through SPI or I2C communications.
Tabl e 8 is one solution for connecting the DIL24 boards to the 32F0308DISCOVERY, this
solution is used in different examples and available at www.st.com/stm32f0-discovery.
Note:For an up-to-date list, visit http://www.st.com/internet/evalboard/subclass/1116.jsp. The
DIL24 boards are described as “adapter boards” in the field “General Description”.
5.3 Arduino shield boards
Arduino™ is an open-source electronics prototyping platform based on flexible, easy-to-use
hardware and software. See http://www.arduino.cc for more information.
Arduino accessory boards are called “Shields” and can be easily connected to the
32F0308DISCOVERY according to the following table.
Arduino power connector32F0308DISCOVERY
ResetReset from Shield boardNRSTReset discovery
3V3VCC 3.3V power line3VVDD
5VVCC 5V power line5VVDD
GNDReference GroundGNDReference Ground
GNDReference GroundGNDReference Ground
VinExternal alimentation3 V
Table 10. Connecting with Arduino shields
Jumper fitted to power board by
External 3 V power supply.
Arduino analog in connector32F0308DISCOVERY
A0Analog input or Digital pin 14PC0ADC_IN10
A1Analog input or Digital pin 15PC1ADC_IN11
A2Analog input or Digital pin 16PC2ADC_IN12
A3Analog input or Digital pin 17PC3ADC_IN13
A4
A5
Analog input or SDA or Digital
pin 18
Analog input or SCL or Digital
pin 19
DocID025097 Rev 131/39
PC4 or PF7ADC_IN14 or I2C2_SDA
PC5 or PF6ADC_IN15 or I2C2_SCL
38
Connecting modules on the prototyping boardUM1658
Table 10. Connecting with Arduino shields (continued)
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 AUTHORIZED FOR USE IN WEAPONS. NOR ARE ST PRODUCTS 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.