STM32F4 User Manual
STM32F4 User Manual
User manual
Discovery kit for STM32F407/417 lines
Introduction
The STM32F4DISCOVERY helps you to discover the STM32F407 & STM32F417 lines
high-performance features and to develop your applications.
It is based on an STM32F407VGT6 and includes an ST-LINK/V2 embedded debug tool
interface, ST MEMS digital accelerometer, ST MEMS digital microphone, audio DAC with
integrated class D speaker driver, LEDs, pushbuttons and a USB OTG micro-AB connector.
Figure 1. STM32F4DISCOVERY
January 2014
DocID022256 Rev 4
1/42
www.st.com
Contents
UM1472
Contents
1
Conventions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
Quick start . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
2.1
Getting started . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
2.2
System requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
2.3
2.4
Order code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
STM32F407VGT6 microcontroller . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
4.2
Embedded ST-LINK/V2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
4.2.1
4.2.2
4.3
4.4
LEDs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
4.5
Pushbuttons . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
4.6
4.7
4.8
4.9
JP1 (Idd) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
4.10
OSC clock . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
4.10.1
4.10.2
4.11
Solder bridges . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
4.12
Extension connectors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
Mechanical drawing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
Electrical schematics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
Revision history . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
2/42
DocID022256 Rev 4
UM1472
List of tables
List of tables
Table 1.
Table 2.
Table 3.
Table 4.
Table 5.
Table 6.
ON/OFF conventions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
Jumper states . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
Debug connector CN2 (SWD). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
Solder bridges. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
MCU pin description versus board function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
Document revision history. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
DocID022256 Rev 4
3/42
3
List of figures
UM1472
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.
4/42
STM32F4DISCOVERY . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
Hardware block diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
Top layout . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
Bottom layout . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
STM32F407VGT6 package . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
STM32F407VGT6 block diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
Typical configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
STM32F4DISCOVERY connections image . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
ST-Link connections image. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
STM32F4DISCOVERY mechanical drawing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
STM32F4DISCOVERY . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
ST-LINK/V2 (SWD only) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
MCU . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
Audio. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
USB_OTG_FS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
Peripherals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
DocID022256 Rev 4
UM1472
Conventions
Conventions
Table 1 provides the definition of some conventions used in the present document.
Table 1. ON/OFF conventions
Convention
Definition
Jumper JP1 ON
Jumper fitted
DocID022256 Rev 4
5/42
41
Quick start
UM1472
Quick start
The STM32F4DISCOVERY is a low-cost and easy-to-use development kit to quickly
evaluate and start a development with an STM32F4 high-performance microcontroller.
Before installing and using the product, please accept the Evaluation Product License
Agreement from www.st.com/stm32f4-discovery.
For more information on the STM32F4DISCOVERY and for demonstration software, visit
www.st.com/stm32f4-discovery.
2.1
Getting started
Follow the sequence below to configure the STM32F4DISCOVERY board and launch the
DISCOVER application:
1. Check jumper position on the board, JP1 on, CN3 on (DISCOVERY selected).
2. Connect the STM32F4DISCOVERY board to a PC with a USB cable type A to mini-B
through USB connector CN1 to power the board. Red LED LD2 (PWR) then lights up.
3. Four LEDs between B1 and B2 buttons are blinking.
4. Press user button B1 to enable the ST MEMS sensor, move the board and observe the
four LEDs blinking according to the motion direction and speed. (If you connect a
second USB cable type A to micro-B between PC and CN5 connector then the board
is recognized as standard mouse and its motion will also control the PC cursor).
5. To study or modify the DISCOVER project related to this demo, visit
www.st.com/stm32f4-discovery and follow the tutorial.
6. Discover the STM32F4 features, download and execute programs proposed in the list
of projects.
7. Develop your own application using available examples.
2.2
System requirements
2.3
2.4
Order code
To order the STM32F4 high-performance discovery board, use the order code
STM32F4DISCOVERY.
6/42
DocID022256 Rev 4
UM1472
Features
Features
The STM32F4DISCOVERY offers the following features:
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 5V supply voltage
Eight LEDs:
Four user LEDs, LD3 (orange), LD4 (green), LD5 (red) and LD6 (blue)
2 USB OTG LEDs LD7 (green) VBus and LD8 (red) over-current
Extension header for LQFP100 I/Os for quick connection to prototyping board and easy
probing
DocID022256 Rev 4
7/42
41
UM1472
6:'
(PEHGGHG
67/,1.9
670)9*7
,2
5(6(7
/('
/'WR/'
%
567
03'7
%
86(5
&6/
0LQL-DFN
+HDGHU
,2
+HDGHU
,2
/,6'/RU
/,6'6+
0LFUR86%
069
8/42
DocID022256 Rev 4
UM1472
67/,1.9
/'UHGJUHHQ/('
&20
&1
6:'FRQQHFWRU
/'UHG/('
3:5
5
'
&1
/'
5
5
5
5
5
5
&
&
&20
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022256 Rev 4
UM1472
4.1
STM32F407VGT6 microcontroller
This ARM Cortex-M4 32-bit MCU with FPU has 210 DMIPS, up to 1 MB Flash/192+4 KB
RAM, USB OTG HS/FS, Ethernet, 17 TIMs, 3 ADCs, 15 comm. interfaces and a camera.
Figure 5. STM32F407VGT6 package
34-&6'4
-BYTE OF &LASH MEMORY
+BYTES OF 2!-
,1&0 X MM
-36
168 MHz/210 DMIPS Cortex-M4 with single cycle DSP MAC and floating point unit
providing:
Boosted execution of control algorithms
More features possible for your applications
Ease of use
Better code efficiency
Faster time to market
Elimination of scaling and saturation
Easier support for meta-language tools
Designed for high performance and ultra fast data transfers; ART Accelerator, 32-bit, 7layer AHB bus matrix with 7 masters and 8 slaves including 2 blocks of SRAM, Multi
DMA controllers: 2 general purpose, 1 for USB HS, 1 for Ethernet, One SRAM block
dedicated to the core, providing performance equivalent to 0-wait execution from Flash
Concurrent execution and data transfers and simplified resource allocation
Outstanding power efficiency; Ultra-low dynamic power, RTC <1 A typical in VBAT
mode, 3.6 V down to 1.7 V VDD, Voltage regulator with power scaling capability,
providing extra flexibility to reduce power consumption for applications requiring both
high processing and low power performance when running at low voltage or on a
rechargeable battery
Extensive tools and software solutions providing a wide choice within the STM32
ecosystem to develop your applications.
DocID022256 Rev 4
11/42
41
UM1472
Figure 6. STM32F407VGT6 block diagram
%XTERNAL MEMORY
CONTROLLER &3-#