STM32F0 User Manual
STM32F0 User Manual
User manual
STM32F0DISCOVERY
Discovery kit for STM32 F0 microcontrollers
Introduction
The STM32F0DISCOVERY helps you to discover the STM32 F0 Cortex-M0 features and
to develop your applications easily. It is based on STM32F051R8T6, an STM32 F0 series
32-bit ARM Cortex microcontroller, and includes an ST-LINK/V2 embedded debug tool,
LEDs, push buttons and a prototyping board.
May 2012
Figure 1.
STM32F0DISCOVERY
Table 1.
Applicable tools
Type
Part number
Evaluation tools
STM32F0DISCOVERY
1/41
www.st.com
Contents
UM1525
Contents
1
Conventions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
Quick start . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
2.1
Getting started . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
2.2
System requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
2.3
2.4
Order code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
4.1
STM32F051R8T6 microcontroller . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
4.2
Embedded ST-LINK/V2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
4.2.1
4.2.2
4.3
4.4
LEDs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
4.5
Push buttons . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
4.6
JP2 (Idd) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
4.7
OSC clock . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
4.7.1
4.7.2
4.8
Solder bridges . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
4.9
Extension connectors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
5.2
5.3
Mechanical drawing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
Electrical schematics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
2/41
UM1525
Contents
Revision history . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
3/41
List of tables
UM1525
List of tables
Table 1.
Table 2.
Table 3.
Table 4.
Table 5.
Table 6.
Table 7.
Table 8.
Table 9.
Table 10.
Table 11.
Table 12.
4/41
Applicable tools. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
ON/OFF conventions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
Jumper states . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
Debug connector CN3 (SWD) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
Solder bridge settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
MCU pin description versus board function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
Connecting using mikroBUS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
Connecting using IDC10 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
Connecting with a DIL24 board . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
Supported MEMS adapter boards . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
Connecting with Arduino shields. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
Document revision history . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
UM1525
List of figures
List of figures
Figure 1.
Figure 2.
Figure 3.
Figure 4.
Figure 5.
Figure 6.
Figure 7.
Figure 8.
Figure 9.
Figure 10.
Figure 11.
Figure 12.
Figure 13.
Figure 14.
Figure 15.
Figure 16.
STM32F0DISCOVERY . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
Hardware block diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
Top layout . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
Bottom layout . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
STM32F051R8T6 package. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
STM32F051R8T6 block diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
Typical configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
STM32F0DISCOVERY connections image . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
ST-LINK connections image . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
Using IDC10 and mikroBUS connectors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
DIL24 socket connections. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
Arduino shield board connections. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
STM32F0DISCOVERY mechanical drawing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
STM32F0DISCOVERY . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
ST-LINK/V2 (SWD only) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
MCU . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
5/41
Conventions
UM1525
Conventions
Table 2 provides the definition of some conventions used in the present document.
Table 2.
ON/OFF conventions
Convention
Definition
Jumper JP1 ON
Jumper fitted
6/41
UM1525
Quick start
Quick start
The STM32F0DISCOVERY 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/stm32f0discovery.
For more information on the STM32F0DISCOVERY and for demonstration software, visit
www.st.com/stm32f0discovery.
2.1
Getting started
Follow the sequence below to configure the STM32F0DISCOVERY board and launch the
DISCOVER application:
2.2
2.3
2.4
1.
Check jumper position on the board, JP2 on, CN2 on (Discovery selected).
2.
3.
4.
Observe how the green LED LD3 blinking changes according to USER button B1
clicks.
5.
6.
7.
Discover the STM32F0 features, download and execute programs proposed in the list
of projects.
8.
System requirements
Keil, MDK-ARM
Order code
To order the STM32F0 Discovery kit, use the order code STM32F0DISCOVERY.
7/41
Features
UM1525
Features
The STM32F0DISCOVERY kit offers the following features:
8/41
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
Four LEDs:
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.
UM1525
-INI
53"
%MBEDDED
34
,).+6
37$
34-&24
)/
)/
)/
2%3%4
,%$
,$ 0#
"
234
,%$
,$ 0#
"
53%2
(EADER
Figure 2.
(EADER
-36
9/41
UM1525
Top layout
ST-LINK/V2
5V power supply
input output
3V power supply
input output
CN3
SWD connector
CN2
ST-LINK/DISCOVERY
selector
JP2
IDD measurement
SB1 (VBAT)
SB3 (B1-USER)
B2 reset button
STM32F051R8T6
SB4 (B2-RESET)
B1 user button
(green LED) LD3
LD4 (blue LED)
MS30024V1
Note:
10/41
UM1525
Figure 4.
SB22 (T_SWO)
MS30025V1
11/41
4.1
UM1525
STM32F051R8T6 microcontroller
This 32-bit low- and medium-density advanced ARM MCU with a high-performance ARM
Cortex-M0 32-bit RISC core has 64 Kbytes Flash, 8 Kbytes RAM, RTC, timers, ADC,
DAC, comparators and communication interfaces.
Figure 5.
STM32F051R8T6 package
34-&24
+BYTE OF &LASH MEMORY
+BYTES OF 2!-
,1&0 X MM
-36
The STM32 F0 delivers 32-bit performance and STM32 DNA essentials into applications
typically addressed by 8- or 16-bit microcontrollers. It benefits from the combination of realtime performance, low-power operation, advanced architecture and peripherals associated
to the STM32 ecosystem, which has made the STM32 a reference in the market. Now all
this is accessible for cost-sensitive applications. The STM32 F0 offers unparalleled flexibility
and scalability for home entertainment products, appliances, and industrial equipment.
This device provides the following benefits.
Superior code execution for better performance and excellent code efficiency for
reduced embedded memory usage
Flexible clock options and low power modes with fast wake-up for low power
consumption
High-performance connectivity
12/41
6 Mbit/s USART
HDMI CEC
Enhanced control
UM1525
3ERIAL 7IRE
$EBUG
6$$
FLASH OBL
)NTERFACE
37#,+
37$!4
AS !&
.6)#
'0 $-!
CHANNELS
"US-ATRIX
.6)#
32!-
#/24%8
- #05
F(#,+ -(Z
CONTROLLER
Figure 6.
0/7%2
6/,4 2%'
6 4 / 6
&,!3(
+"
BITS
6$$ TO 6
633
6$$
0/2
2ESET
32! +"
6$$!
)NT
3500,9
350%26)3)/.
0/2 0$2
$$
06$
2# (3 -(Z
2# (3 -(Z
.234
6$$!
6$$!
6$$
2# ,3
84!, /3#
-(Z
0,,
/3#).
0&
/3#/54
0&
)77$'
0!;=
'0)/ PORT !
0";=
'0)/ PORT "
0#;=
'0)/ PORT #
0$
'0)/ PORT $
0&;=
'0)/ PORT &
GROUPS OF
CHANNELS
!(" DECODER
2%3%4
#,/#+
#/.42/,
!("0#,+
!0"0#,+
!$##,+
#%##,+
53!24#,+
(#,+
&#,+
#2#
#ONTROLLER
-/3)3$
-)3/-#+
3#+#+
.3373 AS !&
-/3) -)3/
3#+ .33
AS !&
84!, K(Z
"ACKUP
REG
%84)4
7+50
77$'
4!-0%2
24#
!,!2- /54
24# INTERFACE