Discovery Kit With STM32F407VG MCU - Embeddednesia

Transcription

UM1472User manualDiscovery kit with STM32F407VG MCUIntroductionThe STM32F4DISCOVERY Discovery kit allows users to easily develop applications withthe STM32F407VG high performance microcontroller with the ARM Cortex -M4 32-bitcore. It includes everything required either for beginners or for experienced users to getquickly started.Based on STM32F407VG, it includes an ST-LINK/V2 or ST-LINK/V2-A embedded debugtool, two ST-MEMS digital accelerometers, a digital microphone, one audio DAC withintegrated class D speaker driver, LEDs, push buttons and a USB OTG micro-AB connector.To expand the functionality of the STM32F4DISCOVERY Discovery kit with the Ethernetconnectivity, LCD display and more, visit the www.st.com/stm32f4dis-expansion webpage.The STM32F4DISCOVERY Discovery kit comes with the STM32 comprehensive freesoftware libraries and examples available with the STM32Cube package, as well as a directaccess to the ARM mbed Enabled on-line resources at http://mbed.org.Figure 1. STM32F4DISCOVERY1. Picture is not contractual.May 2017DocID022256 Rev 61/34www.st.com1

ContentsUM1472Contents1Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62Product marking . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73Ordering information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74Conventions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75Quick start . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 865.1Getting started . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85.2System requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85.3Development toolchains supported . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8Hardware and layout . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96.12/34Embedded ST-LINK/V2 (or V2-A) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .116.1.1Drivers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126.1.2ST-LINK/V2 (or V2-A) firmware upgrade . . . . . . . . . . . . . . . . . . . . . . . . 136.1.3ST-LINK/V2-A VCP configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 136.1.4Using ST-LINK/V2 (or V2-A) to program/debugthe STM32F407VG on board . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 146.1.5Using ST-LINK/V2 (or V2-A) to program/debug an external STM32application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 156.2Power supply and power selection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 166.3LEDs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 166.4Push buttons . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 166.5On-board audio capability . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 176.6USB OTG supported . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 176.7Motion sensor (ST-MEMS LIS302DL or LIS3DSH) . . . . . . . . . . . . . . . . . 176.8JP1 (Idd) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 186.9OSC clock . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 186.9.1OSC clock supply . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 186.9.2OSC 32 KHz clock supply . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 186.10Solder bridges . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 196.11Extension connectors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19DocID022256 Rev 6

UM1472Contents7Electrical schematics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 268Mechanical drawing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 329Revision history . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33DocID022256 Rev 63/343

List of tablesUM1472List of tablesTable 1.Table 2.Table 3.Table 4.Table 5.Table 6.Table 7.4/34List of the order codes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7ON/OFF conventions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7Jumper states . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12Debug connector CN2 (SWD) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15Solder bridges. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19STM32 pin description versus board functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20Document revision history . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33DocID022256 Rev 6

UM1472List of figuresList of figuresFigure 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.STM32F4DISCOVERY . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1Hardware block diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9STM32F4DISCOVERY top layout . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10STM32F4DISCOVERY bottom layout . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11USB composite device . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12ST-LINK VCP connection to USART2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13STM32F4DISCOVERY connections . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14ST-LINK connections . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15STM32F407G-DISC1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26ST-LINK/V2 (SWD only) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27MCU . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28Audio. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29USB OTG FS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30Peripherals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31STM32F4DISCOVERY mechanical drawing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32DocID022256 Rev 65/345

Features1UM1472FeaturesThe STM32F4DISCOVERY offers the following features: STM32F407VGT6 microcontroller featuring 32-bit ARM Cortex -M4 with FPU core,1-Mbyte Flash memory, 192-Kbyte RAM in an LQFP100 package On-board ST-LINK/V2 on STM32F4DISCOVERY or ST-LINK/V2-A onSTM32F407G-DISC1 ARM mbed Enabled (http://mbed.org) with ST-LINK/V2-A only USB ST-LINK with re-enumeration capability and three different interfaces:–Virtual COM port (with ST-LINK/V2-A only)–Mass storage (with ST-LINK/V2-A only)–Debug port Board power supply: –Through USB bus–External power sources:3 V and 5 VLIS302DL or LIS3DSH ST MEMS 3-axis accelerometerMP45DT02 ST MEMS audio sensor omni-directional digital microphoneCS43L22 audio DAC with integrated class D speaker driverEight LEDs:– LD1 (red/green) for USB communication– LD2 (red) for 3.3 V power on– Four user LEDs, LD3 (orange), LD4 (green), LD5 (red) and LD6 (blue)– 2 USB OTG LEDs LD7 (green) VBUS and LD8 (red) over-currentTwo push buttons (user and reset)USB OTG FS with micro-AB connectorExtension header for all LQFP100 I/Os for quick connection to prototyping board and easyprobing Comprehensive free software including a variety of examples, part of the STM32CubeF4package or STSW-STM32068 for legacy standard library usage6/34DocID022256 Rev 6

UM14722Product markingProduct markingTools marked as "ES" or "E" are not yet qualified and as such, they may be used only forevaluation purposes. ST shall not be liable for any consequences related with other ways ofuse of such non-qualified tools, for example, as reference design or for production.Examples of location of "E" or "ES" marking:3 On target STM32 microcontroller part mounted on the board (for illustration, refer tosection “Package information” of a STM32 datasheet at www.st.com). Next to the evaluation tool ordering part number, as a label stuck or a silk-screenprinted on the board.Ordering informationTo order the Discovery kit for the STM32F407 line of microcontrollers, refer to Table 1.Table 1. List of the order codes4Order codeST-LINK T-LINK/V2-A (mbed Enabled)ConventionsTable 2 provides the definition of some conventions used in the present document.Table 2. ON/OFF conventionsConventionDefinitionJumper JP1 ONJumper fittedJumper JP1 OFFJumper not fittedSolder bridge SBx ONSBx connections closed by solderSolder bridge SBx OFF SBx connections left openDocID022256 Rev 67/3433

Quick start5UM1472Quick startThe STM32F4DISCOVERY is a low-cost and easy-to-use development kit to quicklyevaluate and start a development with an STM32F407VG high-performance microcontroller.Before installing and using the product, accept the Evaluation Product License Agreementfrom the www.st.com/stm32f4-discovery webpage.For more information on the STM32F4DISCOVERY and for demonstration software, visitthe www.st.com/stm32f4-discovery webpage.5.1Getting startedFollow the sequence below to configure the STM32F4DISCOVERY board and launch theDISCOVER application:5.25.31.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 thefour LEDs blinking according to the motion direction and speed. (If a second USB cable‘type A to micro-B’ is connected between PC and CN5 connector, then the board isrecognized as standard mouse and its motion will also control the PC cursor).5.To study or modify the DISCOVER project related to this demonstration, visit thewww.st.com/stm32f4-discovery webpage and follow the tutorial.6.Discover the STM32F407VG features, download and execute programs proposed inthe list of projects.7.Develop the application using available examples.System requirements Windows OS (XP, 7, 8 and 10), Linux 64-bit or macOS USB type A to Mini-B cable.Development toolchains supported Keil MDK-ARM(a) IAR EWARM(a) GCC-based IDEs including free SW4STM32 from AC6 ARM mbed Enabled onlinea. On Windows8/34 only.DocID022256 Rev 6

UM1472Hardware and layoutThe STM32F4DISCOVERY is designed around the STM32F407VGT6 microcontroller in a100-pin LQFP package.Figure 2 illustrates the connections between the STM32F407VGT6 and its peripherals (STLINK/V2 or ST-LINK/V2-A, push buttons, LEDs, Audio DAC, USB, ST-MEMS accelerometerand microphone, and connectors).Figure 3 and Figure 4 help users to locate these features on the STM32F4DISCOVERYboard.Figure 2. Hardware block diagram0LQL86%(PEHGGHG6:'67 /,1. 9 RU 67 /,1. 9 670 ) 9*7 , 2, 25(6(7/('/' WR /' % 56703 '7 % 86(5&6 / /,6 '6 RU /,6 '6 0LQL -DFN HDGHU, 2 HDGHU6Hardware and layout0LFUR 86%06Y 9 DocID022256 Rev 69/3433

Hardware and layoutUM1472Figure 3. STM32F4DISCOVERY top layout67 /,1. 9 /' UHG JUHHQ /(' &20&1 6:' FRQQHFWRU670 ) * ',6& /' UHG /('3:55 ' &1 /' 5 5 5 5 5 5 & & &20' &1 & 8 & 5 & 67 /,1.& 5 & 5 5 ' &1 5 8 5 &',6&29(5 5& 5 & 5 5 6:'; & 5 3:5/' 5 & & & & & & & 5 5 9''*1'15673& 3& 3& 3& 3 3 3 3 3 3 3 3 & ; 5 & & & / & 5 5 8 5 & & & & & 5 9''3 ; 5 *1'& *1'& 8 5 & ZZZ VW FRP VWP I GLVFRYHU\3 -3 5 ,GG5 670 ) 9*7 5 5 5 *1'*1' 9 9 9 93 3 3& 3& 3( 3& 3( 3( 3( 3( 3( 3( & & 5 % 8 /' % 3% 3% 3% 3% 3% 3' 3'3' 3' 3' &1 & 3' 3' 3' 1&5 5 5 8 & 5 8 5HVHW5 5 & & 5 & 5 3% 5 5 & & 5 & & & 5 8 5 5 5 & 5 5 & 5 3%9''3% 3% 3% 3% 3' 3% 3' 3' 3' 3' 3' 3' 3& 3' 3& 3& 3 3 3 3 3 3 3& 3&3& 5 /' & 83& *1'*1'/' *1' 9 SRZHUVXSSO\ RXWSXW 6% % 5(6(7/' RUDQJH /('/' UHG /(' % UHVHW EXWWRQ 7 &1 5 3% %227 9 SRZHUVXSSO\ LQSXW RXWSXW& 5 3( 3( /' 5 3( 8VHU5 3( & 3( & & 3( 5 & 3(/' 5 JUHHQ /(' /' & /' 5 5 3( 5 & 5 5 3% 5 & *1'3( 6% & & 3% & EOXH /(' /' 3& 3% & JUHHQ /(' /' 3& & % XVHU EXWWRQ&1 67 /,1. ',6&29(5 VHOHFWRU5 & -3 , PHDVXUHPHQW'' 0% '*1'5 /' UHG /(' 06 9 Note:Pin 1 of CN2, CN3, JP1, P1 and P2 connectors are identified by a red square.10/34DocID022256 Rev 6

UM1472Hardware and layoutFigure 4. STM32F4DISCOVERY bottom layout3" 3" 3" 3" 2%3%26% 3" .2343" 3" 3" 3" %&!5,43" 34-?2343" 8 CRYSTAL3" 8 CRYSTAL3" 37/3" 8 CRYSTAL3" 8 CRYSTAL3" 6 FROM 63" "//4 3" "//4 3" " 53%2-3 6 6.1Embedded ST-L

The STM32F4DISCOVERY is a low-cost and easy-to-use development kit to quickly evaluate and start a development with an STM32F407VG high-performance microcontroller. Before installing and using the product, accept the Evaluation Product License Agreement from the