The 32F412GDISCOVERY discovery kit is a complete demonstration and development
platform for STMicroelectronics ARM
microcontroller. This microcontroller features four I
ports with two multiplexed full-duplex I
®
Cortex
2
®
-M4 core-based STM32F412ZGT6
2
C buses, four USART ports, five SPI
S buses, SDIO interface, USB OTG full-speed 2.0
port, two CAN buses, FMC parallel interface, two digital filters for sigma-delta modulators,
PDM interface for two digital microphones, one 12-bit ADC, dual Quad-SPI interface, JTAG
and SWD debugging support. This discovery kit offers everything required for users to get
started quickly and develop applications easily.
A full range of hardware features on the board helps users to evaluate on-board peripherals
such as: USB OTG FS, microSD
™
card, full-duplex I2S with an audio codec and stereo jack
for headset including analog microphone, DFSDM with a pair of ST-MEMS digital
microphones on board, Quad-SPI Flash memory device, 1.54" TFT LCD using FMC
interface with capacitive touch panel.
The Arduino
™
Uno V3 compatible connectors expand the functionality with a wide choice of
specialized shields. The extension connectors allow easy connection of a daughterboard for
specific customer applications. The integrated ST-LINK/V2-1 provides an embedded
in-circuit debugger and programmer for the STM32.
•STM32F412ZGT6 microcontroller featuring 1 Mbyte of Flash memory
and 256 Kbytes of RAM in LQFP144 package
•On-board ST-LINK/V2-1 SWD debugger,
supporting USB re-enumeration capability:
–Virtual COM port
–Mass storage
–Debug port
•1.54-inch, 240x240-pixel TFT color LCD with parallel interface
2
•I
S audio codec, with a stereo headset jack,
including analog microphone input and a loudspeaker output
•Stereo digital ST-MEMS microphones.
•microSD
2
•I
C extension connector
•128-Mbit Quad-SPI NOR Flash memory
•Reset button and joystick
•Four-color user LEDs
•USB OTG FS with Micro-AB connector
•Four options for power-supply source:
–ST-LINK/V2-1 USB connector
–User USB FS connector
–VIN from Arduino
–+5 V from Arduino
•Two supply voltage options for STM32: 2.0 V and 3.3 V
•Compatible Arduino
•Extension connectors for direct access to various features of
the STM32F412ZGT6
•Comprehensive free software including a variety of examples,
part of the STM32Cube package
™
card connector
™
™
Uno V3 connector
™
Uno V3 connector
Uno V3 connectors
2 Demonstration software
Demonstration software is preloaded in the STM32F412ZGT6 Flash memory. The latest
version of the demonstration source code and the associated documentation can be
downloaded from the www.st.com/stm32f4-discovery webpage.
DocID029078 Rev 27/48
47
Product marking UM2032
3 Product marking
Evaluation tools marked as "ES" or "E" are not yet qualified and therefore they are not ready
to be used as reference design or in production. Any consequences deriving from such
usage will not be at ST charge. In no event, ST will be liable for any customer usage of
these engineering sample tools as reference design or in production.
"E" or "ES" marking examples of location:
•On the targeted STM32 that is soldered on the board (for illustration of STM32 marking,
refer to the section "Package information" of the STM32 datasheet available at
www.st.com).
•Next to the evaluation tool ordering part number, that is stuck or silk-screen printed on
the board.
4 Ordering information
To order the 32F412GDISCOVERY discovery kit refer to Ta bl e 1:
Table 1. Ordering information
Order codeTarget STM32
STM32F412G-DISCOSTM32F412ZGT6
5 Technology partner
MICRON:
•128-Mbit Quad-SPI NOR Flash memory device, part number N25Q128A
8/48DocID029078 Rev 2
UM2032Hardware layout and configuration
06Y9
670)=*7
74)3SDFNDJH
$XGLR&2'(&
57&
93RZHU
6XSSO\
.+]&U\VWDO
[/('V
67/,1.9
,&
,6
,
&H[WHQVLRQ
FRQQHFWRU
/&'
PLFUR6'FDUG
FRQQHFWRU
-R\VWLFN
*3,2
6',2
463,
0E\WHV
4XDG63,
)ODVKPHPRU\
27*
)6
86%FRQQHFWRU
86$57
)60&
*3,2V
6:'
6WHUHRKHDGVHWRXWSXW
6WHUHRGLJLWDO
PLFURSKRQHV
')6'0
/&'7RXFK
SDQHO
$UGXLQR
FRQQHFWRUV
([WHQVLRQ
FRQQHFWRUV
,&
93RZHU
6XSSO\
0RQRSKRQLFORXGVSHDNHURXWSXW
$QDORJPLFURSKRQHLQSXW
*3,2V
*3,2V
6 Hardware layout and configuration
The 32F412GDISCOVERY discovery kit is designed around the STM32F412ZGT6 (144-pin
TQFP package). The hardware block diagram showed in Figure 3, illustrates the
STM32F412ZGT6 connections with the peripherals. Figure 4 and Figure 5 show the
location of the main components on the discovery kit.
ST-LINK/V2-1 programming and debugging tool is integrated into the
32F412GDISCOVERY discovery kit. Compared to ST-LINK/V2 stand-alone tool available
from STMicroelectronics, ST-LINK/V2-1 offers new features and drops some others.
New features:
•USB software re-enumeration
•Virtual COM port interface on USB
•Mass storage interface on USB
•USB power management request for more than 100 mA power on USB
Feature dropped:
•SWIM interface
For all general information concerning debugging and programming features common
between V2 and V2-1 versions, refer to ST-LINK/V2 in-circuit debugger/programmer for STM8 and STM32 User manual (UM1075) at the www.st.com website.
DocID029078 Rev 211/48
47
Hardware layout and configuration UM2032
6.2.1 Drivers
Before connecting STM32F412ZGT6 to a Windows® XP, 7 or 8 PC via USB, a driver for
ST-LINK/V2-1 must be installed. It can be downloaded from the www.st.com website.
In case the 32F412GDISCOVERY discovery kit is connected to the PC before the driver is
installed, some 32F412GDISCOVERY interfaces may be declared as "unknown" in the PC
device manager. To recover from this situation the user must install the driver files, and
update the driver of the connected device from the device manager (see Figure 7).
Note:Prefer using the "USB Composite Device" handle for a full recovery.
Figure 7. USB composite device
6.2.2 ST-LINK/V2-1 firmware upgrade
ST-LINK/V2-1 employs a dedicated MCU with Flash memory. Its firmware determines
ST-LINK/V2-1 functionality and performance. The firmware may evolve during the life span
of the 32F412GDISCOVERY to include new functionalities, fix bugs or support new target
microcontroller families. It is therefore recommended to keep the
ST-LINK/V2-1 firmware up to date. The latest version is available from the www.st.com
website.
6.3 Power supply
6.3.1 Power supply sources
The 32F412GDISCOVERY discovery kit is designed to be powered by the following
sources:
•5 V DC from the ST-LINK/V2-1 USB connector CN6 with 500 mA current limitation.
Power mechanism of supplying the discovery kit by the ST-LINK/V2-1 is explained in
Section 6.3.4: Supplying the 32F412GDISCOVERY through the ST-LINK/V2-1 USB
port. A jumper should be placed in location STLK of JP3, connecting pins 3 and 4. The
green LED LD6 is lighted on to confirm the presence of +5 V voltage.
•5 V DC from the user USB FS connector CN3. A jumper should be placed in location
USB of JP3, connecting pins 5 and 6. The green LED LD6 is lighted on to confirm the
presence of +5 V voltage.
•6 V to 9 V DC from VIN pin of Arduino Uno V3 compatible connector CN2. The voltage
is limited to 9 V to keep the temperature of the regulator U3 within his thermal safe
12/48DocID029078 Rev 2
UM2032Hardware layout and configuration
VOUTVREF1R92()R90()÷+()×=
area. A jumper should be placed in location E5V of jumper JP3, connecting pin 1 to pin
2 of JP3. The green LED LD6 is lighted on to confirm the presence of +5 V voltage.
•5 V DC from +5 V pin of Arduino Uno V3 connector (CN2 pin 5) with limitations. The
jumpers on JP3 and CN5 have to be removed, SB21 (NRST) and SB28 (SWO) have to
be opened. In such configuration the ST-LINK/V2-1 MCU is not powered, as
consequence the 8 MHz of the ST-LINK/V2-1 cannot be used as external input clock
for the STM32.
For details on JP3 jumper setting refer to Table 2: Power-supply-related jumper settings.
6.3.2 STM32 power supply options
The 32F412GDISCOVERY offers the possibility to supply the STM32 under 2.0 V or 3.3 V.
A jumper has to be placed in location 2.0 V of JP5 to supply the STM32 under 2.0 V, then
pins 2 and 3 are connected. Similarly the jumper has to be placed in 3.3 V to supply the
STM32 with 3.3 V, then pins 1 and 2 of JP5 are connected.
For details on JP5 jumper setting refer to Table 2: Power-supply-related jumper settings.
6.3.3 Modification of STM32 voltage
Regulator U16 LD1117STR is dedicated to the 2.0 V supply. The output voltage of U16 is by
default 2.0 V but it is adjustable depending on the resistors R90 and R92 which are by
default 120 and 68 ohms respectively. The output voltage is calculated as following:
with VREF = 1.25 V.
If necessary, resistors R90 and R92 can be changed to modify the STM32 supply voltage.
R90 and R92 are easily located bottom side of the discovery kit near U16 (see Figure 5 and
Figure 8).
DocID029078 Rev 213/48
47
Hardware layout and configuration UM2032
Figure 8. R90 and R92 resistors
6.3.4 Supplying the 32F412GDISCOVERY through
the ST-LINK/V2-1 USB port
To power the 32F412GDISCOVERY through the ST-LINK/V2-1, the USB host (a PC) gets
connected with the 32F412GDISCOVERY Micro-B USB receptacle CN6, via a USB cable.
This event starts the USB enumeration procedure. In its initial phase, the current supply
capability of the USB port located on the host, is limited to 100 mA. It is enough because
only the ST-LINK/V2-1 part of the 32F412GDISCOVERY discovery kit draws power at that
time. If the solder bridge SB18 is open (default configuration), the U8 ST890 power switch is
set to OFF position, and only the ST-LINK/V2-1 is powered. In the next phase of the
enumeration procedure, the host PC informs the ST-LINK/V2-1 facility of its capability to
supply up to 500 mA of current. If the answer is positive, the ST-LINK/V2-1 sets the U8
ST890 switch to ON position to supply power to the remainder of the 32F412GDISCOVERY
discovery kit. If the PC USB port is not capable of supplying up to 500 mA of current,
another power source should be used like VIN pin of connector CN2.
Should a short-circuit occur on the discovery kit, the ST890 power switch protects the USB
port of the host against current demand exceeding 600 mA. In such an event, the red LED
FAULT LD10 lights on.
The 32F412GDISCOVERY discovery kit can also be supplied from a USB power source not
supporting enumeration, such as a USB charger. In this particular case, SB18 solder bridge
must be closed. ST-LINK/V2-1 turns the ST890 power switch ON regardless of the
enumeration procedure result and passes the power unconditionally to the discovery kit.
The green LED LD6 turns on whenever the discovery kit is powered.
14/48DocID029078 Rev 2
UM2032Hardware layout and configuration
USB
STLK
E5V
1
USB
STLK
E5V
1
6.3.5 Programming/debugging when the power supply
is not from ST-LINK/V2-1
Before connecting the USB cable from the ST-LINK/V2-1 USBconnector CN6 to the PC, it
is mandatory to power the discovery kit using the user USB FS connector CN3 or the VIN
pin of the Arduino Uno V3 connector CN2. Proceeding this way, ensures that the
enumeration succeeds thanks to the external power source.
The following power sequence procedure must be respected:
1. Put a jumper in JP3 at location USB to use power from the user USB CN3 or at location
E5V to use power from VIN of Arduino Uno V3 connector CN2.
2. Connect the corresponding external power source.
3. Check that the green LED LD6 is turned ON
4. Connect the PC to the ST-LINK/V2-1 USB connector CN6
If this order is not respected, the discovery kit may be powered by VBUS first from STLINK/V2-1, and the following risks may be encountered:
1.If more than 500 mA current is needed by the discovery kit, the PC may be damaged or
current can be limited by PC. As a consequence the discovery kit is not powered
correctly.
2. 500 mA is requested at the enumeration. If the PC cannot provide such current there is
a risk that the request is rejected and the enumeration does not succeed.
6.3.6 Measurement of current IDD drawn by the microcontroller
The jumper JP7 should be closed by default to supply the STM32F412ZGT6. To measure
the current IDD drawn by the microcontroller STM32F412ZGT6 only, remove the jumper
JP7 and replace it by a multimeter (see Tabl e 2).
JumperDescription
JP3
Table 2. Power-supply-related jumper settings
Default Setting
32F412GDISCOVERY is supplied through theMicro-B ST-LINK/V2-1 connector
CN6. Jumper in STLK place.
32F412GDISCOVERY is supplied through CN3 Micro-AB USB FS connector.
Jumper in USB place.
VDD_USB power pin of STM32F412ZGT6 is supplied with a fix voltage of +3V3
independently of the remainder of supply pins of STM32.
JP6
Default Setting
JP7 IDD is closed by default to supply the STM32F412ZGT6 and when removed, it
offers the possibility to insert an ammeter to measure the current drawn by the
STM32 only.
JP7
DocID029078 Rev 217/48
47
Hardware layout and configuration UM2032
6.4 Clock source
6.4.1 HSE clock source
By default the 8 MHz clock source is provided to the STM32F412ZGT6 by the MCO output
of the ST-LINK/V2-1 MCU U6. In that case the solder bridge SB20 is closed, resistors R45
and R46 are not soldered, solder bridge SB22 is open. The pins PH0 and PH1 are not
available for the extension connector P2.
Alternatively, the discovery kit offers the possibility to use a crystal to provide the 8 MHz
HSE clock source of the STM32F412ZGT6 U7. In that case, PH0 and PH1 are used as
OSC_IN and OSC_OUT respectively. The solder bridges SB20, SB22, SB16 must be
opened, 0 ohm resistors should be soldered to R45 and R46 and a crystal must be soldered
in place X2. Regarding component selection of X2, capacitors C19 and C21 (8.2 pF) are
optimized for a crystal NDK NX3225GD 8 MHz EXS00A-CG04874 and they are not fitted.
The pins PH0 and PH1 are not available for the extension connector P2.
6.4.2 LSE clock source
By default, the 32.768 kHz crystal X3 is connected to pins PC14-OSC32_IN and PC15OSC32_OUT of STM32F412ZGT6 for the RTC clock. Solder bridges SB25 and SB23 must
be open.
If LSE clock is not used, it is possible to use PC14-OSC32_IN and PC15-OSC32_OUT of
STM32F412ZGT6 and to access by the extension connector P2. In that case, solder
bridges SB25 and SB23 must be closed and resistors R54, R56 removed.
6.5 Reserved use of solder bridges
The following solder bridges must not be changed otherwise the microcontroller
STM32F412ZGT6 U7 or other parts of the discovery kit may be damaged:
•Solder bridges must be left closed: SB34, SB26
•Solder bridges must be left open: SB27, SB35
6.6 Reset source
The reset signal of 32F412GDISCOVERY discovery kit is low active and the reset sources
include:
•Embedded ST-LINK/V2-1, providing solder bridge SB21 is closed (default setting)
•Arduino Uno V3 compatible connector CN2 pin 3
•Extension connector P1 pin 6
18/48DocID029078 Rev 2
UM2032Hardware layout and configuration
6.7 Boot options
After reset, the STM32F412ZGT6 boots from the following embedded memory locations
depending on bits BOOT0 and BOOT1 (see Tab le 3 ):
•User Flash memory (non-protected)
•System Flash memory (protected) for In Circuit Programming
•RAM for debugging
BOOT0BOOT1Boot Memory
0XUser Flash
10System Flash
11RAM
BOOT0 is set by the input pin BOOT0 of the STM32F412ZGT6. Its level is set by default to
0 by closing the solder bridge SB31 and keeping R69 unfitted. BOOT1 is shared with the
GPIO PB2 used as QSPI_CLK and is sampled by the STM32F412ZGT6 only at RESET
phase. At start-up, BOOT1 level depends on the resistors R104 and R100. By default R100
and R104 are not fitted on the discovery kit to avoid any influence on the QSPI_CLK signal
using same pin as BOOT1.
Table 3. Boot options
The application note “STM32 microcontroller system memory boot mode” Application note
(AN2606) details the bootloader mechanism and configurations.
Boot-related solder bridge and resistor settings are reported in Table 4:
Resistors, solder bridgeDescription
SB31 Closed
R69 not fitted
BOOT0=0
SB31 Open
R69 fitted
(any value
from 0 to 10K)
BOOT0=1
1. To keep Quad-SPI functionality after boot-up phase, the user should select a resistor value of R100 or
R104 insuring a weak pull-down or weak pull-up respectively.
Table 4. Boot-related solder bridge and resistor settings
R100 and
R104 not fitted
BOOT1=X
R100 not fitted
R104 fitted
BOOT1=0
R100 fitted
R104 not fitted
BOOT1=1
Default Setting
Microcontroller STM32F412ZGT6 boots from user Flash.
Microcontroller STM32F412ZGT6 boots from system Flash.
(1)
R104 is a pull-down resistor on PB2 shared between BOOT1 and
QSPI_CLK.
(1)
Microcontroller STM32F412ZGT6 from RAM.
R100 is a pull-up resistor on PB2 shared between BOOT1 and
QSPI_CLK.
DocID029078 Rev 219/48
47
Hardware layout and configuration UM2032
6.8 Audio codec
A Cirrus/Wolfson codec WM8994 U15 connected to the I2S3 interface of the microcontroller
STM32F412ZGT6 offers possibility to connect a stereo headphone or headset with a monoanalog microphone. A loudspeaker can be connected to the extension connector.
The digital audio output from the microcontroller is handled by the port of the microcontroller
PB5 called CODEC_I2S3_SD while the other direction is handled by port PB4 called
CODEC_I2S3ext_SD.
²
The I
C-bus address of WM8994 is 0b0011010.
6.8.1 Stereo headset and headphone jack
A stereo headphone or a stereo headset with analog microphone can be plugged into the
3.5 mm standard jack socket CN9.
The stereo digital audio streamed from pin PB5 of the microcontroller STM32F412ZGT6 is
transformed in a stereo analog output by the codec WM8994 and is delivered to the
headphone or headset through the pins 6 and 4 of the jack socket CN9.
If a headset is plugged into CN9, the bias of the microphone is driven by the output
MICBIAS1 of the codec and the analog audio enters into the codec by the pin IN1LN.
The corresponding digital audio output from the codec is connected to the microcontroller
STM32F412ZGT6 by the port PB4.
6.8.2 Loudspeaker output
The 32F412GDISCOVERY discovery kit can deliver a monophonic audio to a loudspeaker
connected to pins 36 and 38 of the extension connector P2. It is recommended to use the
WM8994 codec loudspeaker outputs SPKOUTRN and SPKOUTRP in linear mode called
"class AB". This mode is compatible with 4-ohm to 8-ohm impedance loudspeakers. Use of
the switching mode called "class D" requires to use an appropriate filter to maximize
rejection of unwanted frequencies and efficiency. To select the mode "class AB" of the codec
WM8994, set to 1 the bit 8 of the register 0x23.
6.9 Digital microphones
Two ST-MEMS MP34DT01TR digital microphones U4 and U5 are available on the
32F412GDISCOVERY discovery kit. The two microphones are located at a distance of
21 mm each other. The microphones are connected to the DFSDM of the STM32 by the port
PC2 generating the clock and by the port PB1 collecting the PDM interleaved data.
6.10 USB OTG FS
A USB OTG full-speed communication is available at USB Micro-AB receptacle connector
CN3.
Limitations: the USB-related operating supply voltage of STM32L412ZGT6 (VDD_USB
line) must be within the range from 3.0 V to 3.6 V. Therefore, in case the STM32F412ZGT6
is supplied with 2 V by JP5 set in +2 V position, the USB of the STM32 works only if the
VDD_USB power pin is supplied independently by +3.3V. This is done by closing pins 2 and
3 of the jumper JP6 (refer to Table 2: Power-supply-related jumper settings).
20/48DocID029078 Rev 2
UM2032Hardware layout and configuration
6.10.1 32F412GDISCOVERY is USB device
When the 32F412GDISCOVERY is USB device, the discovery kit is powered by the 5 V of
the CN3 USB OTG FS Micro-AB connector. In this case a jumper must be put in USB
location of jumper JP3 and the green LEDs LD7 VBUS and LD6 PWR light on to confirm the
5 V presence.
6.10.2 32F412GDISCOVERY is USB host
When the 32F412GDISCOVERY is USB host it supplies the 5V for the USB peripheral
using one of the following sources:
•ST-LINK/V2-1 USB Micro-B connector CN6, putting a jumper in STLK location of JP3
•An external +5 V source connected to pins 3 or 4 of the extension connector P2, with
no jumper in JP3.
•An external +5V source connected to 5 V pin of Arduino Uno V3 connector CN2, with
no jumper in JP3.
•An external source between +7 to +11 V connected to VIN pin of Arduino Uno V3
connector CN2, putting a jumper in E5V location of JP3.
The green LED LD6 is lighted to confirm the presence of the +5 V source.
The power switch STMPS2141STR is controlled by the port PG8 of STM32 to deliver the
5 V power to the USB device connected to the USB connector CN3. It is recommended to
use PG8 in open drain mode. When PG8 is closed to ground, the power switch is closed,
and the green LED LD7 confirms the 5 V to the USB Device.
The red LED LD8 FAULT is lit when an overcurrent occurs.
For more details refer to Section 6.3: Power supply.
6.11 microSD card
microSD cards with a capacity of 4 Gbytes or more can be inserted in the receptacle CN13.
The four bits of the SDIO interface including CLK and CMD signals of the STM32F412ZGT6
are used to communicate with the microSD card. The card detection is read by the GPIO
PD3: when a microSD card is inserted, the logic level is 0, otherwise it is 1.
Note that port PC9 used as uSD_D1 can be routed also to the pin 46 of the extension
connector P2, by closing the solder bridge SB43 for other usage like the alternate function
MCO2. Therefore the use of the microSD card is exclusive with MCO2 output.
Limitations: The microSD card is not working when the STM32 is supplied with 2V.
6.12 I2C extension connector
The I2C2 bus is available on the I2C extension connector CN10. I2C2-SDA (port PB9) is
available on pin 1 and I2C2-SCL is available on pin 3. Pins 5 and 7 of CN10 are the VDD
and GND supplying the microcontroller. I2C2 voltage levels follows also VDD.
DocID029078 Rev 221/48
47
Hardware layout and configuration UM2032
6.13 Quad-SPI NOR Flash memory
A 128-Mbit Quad-SPI NOR Flash memory (N25Q128A13EF840E from MICRON) is
connected to the Quad-SPI interface of the STM32F412ZGT6 microcontroller.
Note that QSPI_CLK (port PB2) is sampled by the STM32F412ZGT6 at start-up as the
BOOT1 bit. If necessary, the user can set the BOOT1 state by fitting one of the resistors
R100 or R104. By default R100 and R104 are not fitted. Refer to Section 6.7: Boot options
for more details.
Limitations: The Quad-SPI memory is not working when the STM32 is supplied with 2 V.
6.14 Virtual COM port
The serial interface USART2 is directly available through a USB virtual COM port of the
ST-LINK/V2-1. The USB connector is CN6.
6.15 Arduino Uno V3 connectors
CN1, CN2, CN11 and CN12 are female connectors compatible with Arduino Uno V3
standard. Most shields designed for Arduino Uno V3 can fit to the 32F412GDISCOVERY
discovery kit.
Caution:The IOs of STM32 microcontroller are 3.3 V compatible instead of 5 V for Arduino Uno V3.
Left connectorsRight connectors
CN No.
-----I2C2_SCLPB10D1510
----- AVDD-AVDD8
-----Ground-GND7
CN2
Power
Pin
Pin name STM32 pinFunctionFunction
No.
1--
2IOREF-3.3 V SPI1_MISOPA6D125
3NRSTNRSTReset
Table 5. Arduino Uno V3 compatible connectors
STM32
pin
-I2C2_SDAPB9D149
Not
connected
SPI1_SCKPA5D136
TIM3_CH2,
SPI1_MOSI
PA7D114
Pin
name
Pin No. CN No.
CN12
Digital
22/48DocID029078 Rev 2
UM2032Hardware layout and configuration
Table 5. Arduino Uno V3 compatible connectors (continued)
Left connectorsRight connectors
CN No.
CN2
Power
-----TIM5_CH1PF3D67
CN1
Analog
Pin
Pin name STM32 pinFunctionFunction
No.
+3.3 V
4+3V3-
5+5 V-
6GND-Ground-PG10D81
7GND-Ground----
8VIN-
1A0PA1ADC1_IN1TIM5_CH4PF10D56
2A1PC1ADC1_IN11-PG12D45
3A2PC3ADC1_IN13TIM5_CH2PF4D34
4A3PC4ADC1_IN14-PG13D23
5A4
6A5
PC5 or PB9
(see Note:3)
PB0 or PB10
(see Note:3)
input/output
(see Note:1)
+5 V
input/output
(see Note:4)
+6V to +9V
power input
(see Note:2)
ADC1_IN15
or
I2C2_SDA
(see Note:3)
ADC1_IN8
or
I2C2_SCL
(see Note:3)
TIM2_CH1,
SPI1_NSS
TIM4_CH3PB8D92
-PG11D78
USART6_TXPG14D12
USART6_RXPG9D01
STM32
pin
PA15D 103
Pin
name
Pin No. CN No.
CN12
Digital
CN11
Digital
Note:1Important, before using pin 4 of CN2 as +3.3V input, insure that the solder bridge SB4 is
removed. Otherwise the 32F412GDISCOVERY discovery kit could be damaged by the
overcurrent.
Note:2The external voltage applied to pin VIN should be in the range 6 to 9V at 25°C ambient
temperature. If a higher voltage is applied, the regulator U3 may overheat and could be
damaged.
Note:3By default pin 5 and pin 6 of connector CN1 are connected respectively to the port PC5
(ADC1_IN15) and BP0 (ADC1_IN8) of the STM32. They are enabled by the default
configuration of the solder bridges: SB8 and SB6 closed, SB7 and SB5 opened. In case it is
necessary to have an I2C interface instead of ADC inputs on pins 5 and 6 of CN1, open SB8
and SB6, and close SB7 and SB5.
Note:4Important, before using pin 4 of CN2 as +5 V input, insure the jumpers and solder bridges
are configured according to 5
V DC power input defined in Section 6.3.1: Power supply
sources. Otherwise the 32F412GDISCOVERY discovery kit could be damaged by the
overcurrent.
DocID029078 Rev 223/48
47
Hardware layout and configuration UM2032
6.16 Extension connectors P1 and P2
The extension connectors consist in male pin headers P1 and P2 (not soldered by default).
They provide access to the following IPs of the STM32F412ZGT6:
•SPI
2
•I
C with SMBA and FM+ (1 MHz speed)
•Full USART (Rx, Tx, RTS, CTS)
•CAN
•ADC inputs
•TIMERs channels
2
•I
S full duplex with SD and extSD alternate functions.
•DFSDM input for stereo PDM digital microphones
Most of the ports connected to the extension connectors P1 and P2 are the same for the
32F401CDISCOVERY and 32F411EDISCOVERY discovery kits, to maximize the
compatibility with the previous designs. In Tab l e 6, Tab le 7 and in the 32F412GDISCOVERY
schematics (see Section Appendix A: Schematics), the pin numbers corresponding to these
ports, are annotated with the star symbol: “*”.
In Table 6, Table 7 and in the 32F412GDISCOVERY schematics (see Section Appendix A:
Schematics) the pins belonging to the extension connectors P1 and P2 annotated with a
letter, are shared with a peripheral of the 32F412GDISCOVERY (for example, S means that
the port PC9 corresponding to pin 46 is also used for microSD, see Table 7).
Table 6. Pin assignment for the extension connector P1
P1 odd pinsP1 even pins
Pin No.NameNotePin No.NameNote
1GND* 2GND*
3VDD_MCU*4VDD_MCU*
5GND*6NRST*
7PC1*A8PC0*
9PC3*A10PC2*D
11PA1* A12--
13PA3*V14PA2*V
15PA5*A16PA4*C
17PA7*A18PA6*A
19PC5*A20PC4*A
21PB1*D22PB0*A
23GND*24PF2-
25PF3A26--
27PF10A28PF11-
29--30PF13-
31PG2C32--
24/48DocID029078 Rev 2
UM2032Hardware layout and configuration
Table 6. Pin assignment for the extension connector P1 (continued)
P1 odd pinsP1 even pins
Pin No.NameNotePin No.NameNote
33PG9A34PB10*A
35 PB11 *D 36PB12*C
37PB13*38PB14*
39PB15*40--
41--42--
43--44PD12*
45PD13*46--
47--48--
49GND*50GND*
Table 7. Pin assignment for the extension connector P2
P2 odd pinsP2 even pins
Pin No.NameNotePin No.NameNote
1GND* 2GND*
3+5V* 4+5V*
5+3V3* 6+3V3*
7PH0* 8PH1*
9PC14*10PC15*
11PE6*12PC13*
13PE4*14PE5*
15PE2*16PE3*
17PE0*18PE1*
19PB8*A20PB9*A
21BOOT0*22VDD_MCU*
23PB6*TC24PB7*TC
25PB4*C26PB5*C
27--28PB3*
29--30PD6*
31PG10A32PG11A
33PG12A34PG13A
35PG14A36SPKOUTRN-
37--38SPKOUTRP-
39PA14*40PA15*A
DocID029078 Rev 225/48
47
Hardware layout and configuration UM2032
Table 7. Pin assignment for the extension connector P2 (continued)
P2 odd pinsP2 even pins
Pin No.NameNotePin No.NameNote
41PA10*42PA13*
43PA8*D44--
45--46PC9*S
47PC6*48PC7*C
49GND*50GND*
Note:1The star symbol “*” means pin compatible with 32F401CDISCOVERY and
32F411EDISCOVERY discovery kits.
Note:2Meaning of the letters: “A”: shared with Arduino Uno V3 connectors, C: shared with codec,
D: shared with digital microphones, V: shared with virtual COM port, T: shared with
capacitive touch panel, S: shared with microSD.
6.17 LCD display, backlight and touch panel
6.17.1 LCD display
The display is a 1.54-inch, 240x240 pixels TFT color LCD with capacitive touch panel. It
displays up to 262 K colors. The LCD parallel interface is connected to the FMC of the
STM32F412ZGT6 by the connector CN15 (see Tab le 8 ).
To enable the data bus of the LCD display in 16-bit mode, the solder bridges SB41 and
SB42 are opened and closed respectively by default. In this way the IM signal of the LCD is
set to high.To use the LCD in 8-bit mode, SB41 must be closed and SB42 opened.
The selection of the LCD is performed by FMC_NE1 (PD7), write-enable signal is
FMC_NWE (PD5) and read-enable is FMC_NOE (PD4). The address bit A0 of the FMC
(Flexible Static Memory Controller) is used to select data/command access to the LCD.
The port PG4 should be used as an input of the microcontroller connected to the LCD signal
TE (Tearing Effect). To avoid visible artifacts on the display, TE signal is used to synchronize
the refresh of the LCD memory done by the microcontroller with the LCD scan.
The port PD11 of the STM32F412ZGT6 controls the reset of the LCD display LCD_RESET.
CN15 pin
1GNDGroundGND
2LCD_TETearing Effect output pin to send an interrupt to STM32PG4
3D15Data connected to FMCPD10
4D14Data connected to FMCPD9
Signal
name
Table 8. Pin assignment for connector CN15
Description
STM32 pin
involved
5D13Data connected to FMCPD8
26/48DocID029078 Rev 2
UM2032Hardware layout and configuration
Table 8. Pin assignment for connector CN15 (continued)
CN7 is the footprint of a dual-row, through-hole, 26-pin header with 2.54 mm pitch. The
header CN7 gives an easy access to the FMC signals of the LCD (see Table 9).
CN7 odd pinsSignal nameCN7 even pinsSignal name
1A02LCD_BLCTRL
3FMC_NWE 4GND
5FMC_NE16FMC_NOE
7D08D1
Table 9. Pin assignment for connector CN7
DocID029078 Rev 227/48
47
Hardware layout and configuration UM2032
Table 9. Pin assignment for connector CN7 (continued)
CN7 odd pinsSignal nameCN7 even pinsSignal name
9D210+3.3V
11D312VD D
13LCD_TE14LCD_RESET
15D416D5
17D618D7
19D820D9
21D1022D11
23D1224D13
25D1426D15
6.17.3 Backlight
LEDK and LEDA signals of the LCD module are the cathode and the anode respectively of
the backlight LEDs.
The backlight requires a current source of typically 15 mA capable to deliver a voltage up to
10 V. This function is handled by the backlight-driver circuit STLD40DPUR that is a
switching-mode-boost converter, supplied by the +5 V rail of the discovery kit.
The high level on the signal LCD_BLCTRL (PF5) lights the backlight on. It is possible to dim
the backlight intensity by applying a low-frequency PWM signal to LCD_BLCTRL (1 to
10 kHz).
6.17.4 Touch panel
The touch panel is a capacitive touch panel using an I2C interface. The 10-pin connector
CN14 of the touch panel is located at the bottom side of the discovery kit (see Figure 5:
32F412GDISCOVERY bottom layout). The I
SCL line is connected to PB6. An interrupt output CTP_INT is connected to port PG5 to be
used as an interruption input of the microcontroller. Port PF12 is the reset of the capacitive
touch panel.
6.18 Joystick and LEDs
The blue button B2 is a 4-direction joystick with a selection mode when pressed in the
center. The logic state is high when one of the five-position switches (Left, Right, Up, Down,
Selection) is pressed. The center position is connected to a wake-up pin of the
microcontroller PA0. This offers the possibility to wake-up the microcontroller by pressing
the center of the joystick.
Four LEDs located near the Arduino Uno V3 connectors CN1 and CN2 are available for the
user (refer to the Figure 4: 32F412GDISCOVERY top layout). From left to right the user
finds LD1, LD2, LD3 and LD4 with their colors green, orange, red and blue respectively. To
light a LED a low-logic state 0 must be written in the corresponding GPIO.
2
C SDA line is connected to PB7 and the I2C
Table 10 gives the assignment of control ports to the LED indicators.
* : pin compatible with STM32F401-DISCO and STM32F411-DISCO
A : shared with Arduino connectors
C : shared with CODEC
D : shared with Digital microphones
PF2
PF3
PF10PF11
PG2
PG9
PG10PG11
PG12PG13
PG14SPKOUTRN
SPKOUTRP
PF2
PF3
PF10PF11
PG2
PG9
PG10PG11
PG12PG13
PG14SPKOUTRN
SPKOUTRP
+5V+5V
Not Fitted
Not Fitted
PF13
PF13
I2C4_SMBA
V : shared with Virtual Com Port
VV
T : shared with Capacitive Touch Panel
I2C1_SCL shared with Codec and CTPI2C1_SDA shared with Codec and CTP
TT
PC9 MCO_2/I2S2_CKIN/I2C3_SDA /TIM3_CH4 /TIM8_CH4
*
S
S : shared with MicroSD
Figure 21. 32F412GDISCOVERY extension connectors
Alternate functions available:
SPI1, SPI2, SPI4
I2C1, I2C2 with SMBA , I2C4 FM+ 1MHz with SMBA
USART3 Rx,Tx,Cts,Rts, USART6 Rx,Tx,Cts,Rts
CAN1, CAN2
14 ADC inputs
>15 Timer channels
I2S2 full duplex with SD and extSD
DFSDM input for stereo PDM microphones
Schematics UM2032
DocID029078 Rev 243/48
10 11
Arduino Uno connector
MB1209D-02
6/29/2016
Title:
Size:Reference:
Date:Sheet: of
A4
Revision:
STM32F412G-DISCO
Project:
Arduino uno connector
+3V3+5V
A0
A1
A2
A3
A4
A5
RX/D0
TX/D1
D2
D4
PWM/D3
PWM/D5
PWM/D6
D7
D8
PWM/D9
PWM/CS/D10
SDA/D14
SCL/D15
PB10
PB9
NRST
VIN
NRST
SCK/D13
MISO/D12
PWM/MOSI/D11
12
LD9
Green
R73
510
AVDD
GND
VREF+
C38
[N/A]
R74
0
ARD_A0
ARD_A1
ARD_A2
ARD_A3
ARD_A4
ARD_A5
ARD_D5
ARD_D4
ARD_D3
ARD_D2
ARD_D1
ARD_D0
ARD_D13
ARD_D12
ARD_D11
ARD_D10
ARD_D9
ARD_D8
ARD_D6
ARD_D7
ARD_D15
ARD_D14
PA1
PC1
PC3
PC4
PC5
PB0
PG9
PG14
PG13
PG12
PF10
PF3
PG11
PG10
PB8
PA15
PA7
PA6
PA5
ADC1_IN8
ADC1_IN15
ADC1_IN14
ADC1_IN13
ADC1_IN11
ADC1_IN1
I2C2_SDA
PB9
PB10
I2C2_SCL
USART6_RX
USART6_TX
TIM5_CH2
TIM5_CH4
TIM4_CH3
TIM2_CH1, SPI1_NSS
TIM3_CH2, SPI1_MOSI
SPI1_MISO
SPI1_SCK
SB5
Open by default
SB6
Closed by default
SB8
Closed by default
SB7
Open by default
SB30
Closed by default
IOREF
NRST
3V3
5V
GND
GND
VIN
POWER
AIN
I2C2_SCL
I2C2_SDA
1
2
3
4
5
6
7
8
9
10
CN12
Header 10X1_Female
1
2
3
4
5
6
7
8
CN2
Header 8X1_Female
1
2
3
4
5
6
CN1
Header 6X1_Female
1
2
3
4
5
6
7
8
CN11
Header 8X1_Female
TIM5_CH1
PF4
Figure 22. 32F412GDISCOVERY Arduino Uno V3 connector
To use the Discovery as programmer of an external STM32:
- Insure the STM32 to programm on an external board is supplied
with 3.3V ONLY!
- Remove the two jumpers on CN5 to left pins 1, 2, 3, 4 open
- Connect following pins of CN4 to the STM32 to programm:
to SWCLK, pin3 to GND, pin4 to SWDIO, pin5 to RESET.
pin2
Jumpers ON --> DISCOVERY Selected
Jumpers OFF and Solder bridge on T_SWO removed --> ST-LINK Selected
UM2032Federal Communications Commission (FCC) and Industry Canada (IC) Compliance
Appendix B Federal Communications Commission (FCC)
and Industry Canada (IC) Compliance
Statements
B.1 FCC Compliance Statement
B.1.1 Part 15.19
This device complies with Part 15 of the FCC Rules. Operation is subject to the following
two conditions: (1) this device may not cause harmful interference, and (2) this device must
accept any interference received, including interference that may cause undesired
operation.
B.1.2 Part 15.105
This equipment has been tested and found to comply with the limits for a Class A digital
device, pursuant to part 15 of the FCC Rules. These limits are designed to provide
reasonable protection against harmful interference when the equipment is operated in a
commercial environment. This equipment generates, uses, and can radiate radio frequency
energy and, if not installed and used in accordance with the instruction manual, may cause
harmful interference to radio communications. Operation of this equipment in a residential
area is likely to cause harmful interference in which case the user will be required to correct
the interference at his own expense.
B.1.3 Part 15.21
Any changes or modifications to this equipment not expressly approved by
STMicroelectronics may cause harmful interference and void the user's authority to operate
this equipment.
B.2 IC Compliance Statement
B.2.1 Compliance Statement
Industry Canada ICES-003 Compliance Label: CAN ICES-3 (A)/NMB-3(A)
B.2.2 Déclaration de conformité
Étiquette de conformité à la NMB-003 d'Industrie Canada : CAN ICES-3 (A)/NMB-3(A)
DocID029078 Rev 245/48
47
CISPR32 UM2032
Appendix C CISPR32
C.1 Warning
Warning: This device is compliant with Class A of CISPR 32. In a residential environment,
this equipment may cause radio interference.
46/48DocID029078 Rev 2
UM2032Revision history
Revision history
Table 15. Document revision history
DateRevisionChanges
28-Jul-20161Initial version.
Added sections:
08-Nov-20162
Section Appendix B: Federal Communications Commission
(FCC) and Industry Canada (IC) Compliance Statements,
Section Appendix C: CISPR32.
DocID029078 Rev 247/48
47
UM2032
IMPORTANT NOTICE – PLEASE READ CAREFULLY
STMicroelectronics NV and its subsidiaries (“ST”) reserve the right to make changes, corrections, enhancements, modifications, and
improvements to ST products and/or to this document at any time without notice. Purchasers should obtain the latest relevant information on
ST products before placing orders. ST products are sold pursuant to ST’s terms and conditions of sale in place at the time of order
acknowledgement.
Purchasers are solely responsible for the choice, selection, and use of ST products and ST assumes no liability for application assistance or
the design of Purchasers’ products.
No license, express or implied, to any intellectual property right is granted by ST herein.
Resale of ST products with provisions different from the information set forth herein shall void any warranty granted by ST for such product.
ST and the ST logo are trademarks of ST. All other product or service names are the property of their respective owners.
Information in this document supersedes and replaces information previously supplied in any prior versions of this document.