STM32 F4VE: diferenças entre revisões

De WikiPeida
Ir para a navegação Ir para a procura
Sem resumo de edição
Sem resumo de edição
Linha 3: Linha 3:
[[File:STM32F407VET6 Legend.jpg|200px|thumb|Features]]
[[File:STM32F407VET6 Legend.jpg|200px|thumb|Features]]


== Info ==
== Overview ==
=== Leds ===
The STM32 F4VE is a small development board based on the STM32F407VET6 microcontroller.
* '''D0''' (Power LED) — +3.3V rail
It breaks out all CPU pins via two 2×24 pin headers and supports expansion through
* '''D1''' (User LED 1) — PA6 (sink)
multiple peripheral connectors.
* '''D3''' (User LED 2) — PA7 (sink)
 
=== Botões ===
{| class="wikitable"
! Nome !! Referência !! GPIO !! Modo
|-
| RST || — || NRST || Active low
|-
| WK_UP || — || PA0 || Active high
|-
| K0 || — || PE4 || Active low
|-
| K1 || — || PE3 || Active low
|}
 
=== Makefile ===
No STM32CubeMX gerar o projecto no formato '''Makefile'''.
 
=== Compilar ===
Usar o [https://developer.arm.com/open-source/gnu-toolchain/gnu-rm GNU ARM Embedded Toolchain].
 
=== Flash ===
É preciso usar um programador '''ST-Link V2''' e o software [https://github.com/texane/stlink stlink].
<syntaxhighlight lang="shell">
st-flash write build/blinky.bin 0x8000000
</syntaxhighlight>
 
=== Debug ===
Correr o '''st-util''' num terminal separado. E depois corre-se o gdb com:
<syntaxhighlight lang="shell">
arm-none-eabi-gdb --eval-command="tar extended-remote :4242" build/blinky.elf
</syntaxhighlight>
 
== Description ==
Core407V is a small STM32 development board that features an STM32F407VET6 device as the microcontroller, supports further expansion. It is ideal for starting application development with STM32F family.


Board marked "STM32F4XX STM32_F4VE V2.0  1509" on the back.
Board marked "STM32F4XX STM32_F4VE V2.0  1509" on the back.


== Board Info ==
{| class="wikitable"
{| class="wikitable"
! colspan="2" | Board
! colspan="2" | Board
Linha 62: Linha 26:
|}
|}


== Board Features ==
=== Warnings ===
* Onboard microSD card slot
* '''Warning:''' The +5V pins are directly connected to the USB +5V pin with no protection. Do not power the board through USB and an external power supply at the same time.
* RTC backup battery: CR1220
* '''Warning:''' The board has an extra pull-up resistor on D+ (R21, 1.5kΩ) that violates the USB specification when the MCU's internal pull-ups are also active. This may cause USB errors. USB data lines also have 22Ω series resistors (R18, R19) for protection.
* Wireless: nRF24L01 interface header
* SPI Flash: W25Q16JV (2MiB, on SPI1)
* FSMC LCD TFT interface (16×2 header)
* JTAG/SWD header (2×10)
* Mini USB (VCP via ST VCP driver)
* Serial header (USART1: PA9/PA10)
* 4 buttons: RST, WK_UP, K0, K1
* 2 user LEDs + 1 power LED
* BOOT0 and BOOT1 jumpers
* RTC crystal (32.768kHz) + 8MHz HSE crystal
* All CPU pins broken out (2×24 headers)


=== Avisos ===
== Microcontroller ==
* '''Atenção:''' Os pinos +5V estão directamente ligados ao USB. Não alimentar pelo USB e por fonte externa simultaneamente.
* '''Atenção:''' A placa tem um resistor pull-up extra em D+ (R21) que viola a especificação USB quando os pull-ups internos do MCU também estão activos. Pode causar erros de USB.


== MCU Features ==
{| class="wikitable"
{| class="wikitable"
! colspan="2" | Microcontroller
! colspan="2" | STM32F407VET6
|-
| Part || STM32F407VET6
|-
|-
| Manufacturer || ST Microelectronics
| Manufacturer || ST Microelectronics
|-
|-
| Core || ARM Cortex-M4 32-bit
| Core || ARM Cortex-M4 32-bit + FPU
|-
|-
| Max. Clock || 168 MHz, 210 DMIPS
| Max. Clock || 168 MHz
|-
|-
| Operating Voltage || 1.8V – 3.6V
| Operating Voltage || 1.8V – 3.6V
Linha 99: Linha 47:


{| class="wikitable"
{| class="wikitable"
! colspan="2" | Memória Interna
! colspan="2" | Memory
|-
|-
| Flash || 512 KiB
| Flash || 512 KiB
Linha 109: Linha 57:


{| class="wikitable"
{| class="wikitable"
! colspan="2" | Osciladores
! colspan="2" | Oscillators
|-
|-
| HSI || 16 MHz
| HSI || 16 MHz
Linha 115: Linha 63:
| LSI || 32 kHz
| LSI || 32 kHz
|-
|-
| HSE || 8 MHz
| HSE || 8 MHz (Y2)
|-
|-
| LSE || 32.768 kHz
| LSE || 32.768 kHz (Y1)
|}
|}


=== Periféricos ===
=== Peripherals ===
* 3× SPI
* 3× SPI
* 3× USART + 2× UART
* 3× USART + 2× UART
Linha 128: Linha 76:
* 1× SDIO
* 1× SDIO
* 2× CAN
* 2× CAN
* 1× USB 2.0 FS/HS (com DMA)
* 1× USB 2.0 FS/HS (with DMA)
* 1× USB HS ULPI (para PHY externo)
* 1× USB HS ULPI (for external PHY)
* 1× Ethernet MAC 10/100
* 1× 10/100 Ethernet MAC
* 1× interface câmara paralela 8–12 bit
* 1× 8–12-bit parallel camera interface
* 3× ADC 12-bit (1 µs)
* 3× ADC 12-bit (1 µs)
* 2× DAC 12-bit
* 2× DAC 12-bit
* Feature: single-cycle DSP instructions
* Single-cycle DSP instructions
 
== Board Hardware ==


== Regulador de Tensão ==
=== Power ===
{| class="wikitable"
{| class="wikitable"
! colspan="2" | Regulator
! colspan="2" | Voltage Regulator — AMS1117-3.3V (U1)
|-
|-
| Part || AMS1117
| Input || +4.6V to +15V
|-
| Output || +3.3V @ 1A
|-
|-
| Package || SOT223
| Package || SOT223
|-
|-
| Input || +4.6V a +15V
| Power Sources || +5V pin, +3.3V pin, USB
|}
 
=== LEDs ===
{| class="wikitable"
! Ref !! GPIO !! Resistor !! Mode
|-
|-
| Output || +3.3V @ 1A
| D1 (Power) || +3.3V rail || R5 (510Ω) || Always on
|-
| D2 (User) || PA6 || R13 (510Ω) || Sink (active low)
|-
| D3 (User) || PA7 || R14 (510Ω) || Sink (active low)
|}
|}


== Connectors & Pinouts ==
=== Buttons ===
 
=== Header 1 (J2) — 2×24 pinos ===
{| class="wikitable"
{| class="wikitable"
! # !! Nome !! GPIO
! Label !! GPIO !! Mode
|-
|-
| 1–4 || 5V || +5V rail
| RST || NRST || Active low
|-
|-
| 5–8 || 3V3 || +3.3V rail
| K_UP || PA0 || Active high
|-
|-
| 9–10 || GND || Ground
| K0 || PE4 || Active low
|-
|-
| 11 || PE2 || PE2
| K1 || PE3 || Active low
|}
 
=== Boot Mode Jumpers ===
{| class="wikitable"
! Label !! Connected to !! Notes
|-
|-
| 12 || PE3 || PE3
| BT0 || BOOT0 || Part of Header 2 (J3, pin 5). GND via R7 by default.
|-
|-
| 13 || PE4 || PE4
| BT1 || PB2 (BOOT1) || Part of Header 2 (J3, pin 6). GND via R8 by default.
|}
''Note: Both BOOT pins are pulled to GND by default (R7, R8 = 10kΩ), booting from flash. Jumper caps are pre-installed for convenience.''
 
=== On-board Devices ===
{| class="wikitable"
! colspan="2" | SPI Flash — W25Q16 (U3)
|-
|-
| 14 || PE5 || PE5
| Capacity || 2 MiB (16 Mbit)
|-
|-
| 15 || PE6 || PE6
| Interface || SPI1
|-
|-
| 16 || PC13 || PC13
| Package || SOP-8
|-
|-
| 17 || PC0 || PC0
| /CS (F_CS) || PB0 (10kΩ pull-up via R20)
|-
|-
| 18 || PC1 || PC1
| DO (MISO) || PB4 / SPI1_MISO
|-
|-
| 19 || PC2 || PC2
| DI (MOSI) || PB5 / SPI1_MOSI
|-
|-
| 20 || PC3 || PC3
| CLK || PB3 / SPI1_SCK
|-
|-
| 21 || VR- || VREF-
| /WP || +3.3V (always writable)
|-
|-
| 22 || VR+ || VREF+
| /HOLD || +3.3V
|}
 
{| class="wikitable"
! colspan="2" | RTC Backup Battery
|-
|-
| 23 || PA0 || PA0
| Type || CR1220
|-
|-
| 24 || PA1 || PA1
| Protection || BAT54C dual Schottky diode (Q1)
|}
 
== Connectors & Pinouts ==
 
=== GPIO Headers ===
Two 2×24 pin headers (2.54mm, male) break out all GPIO.
 
'''Note:''' PB3, PB5, PB6, PB7 are shared with the nRF24L01 header (SPI1). PB3/PB4 are also used for JTAG (TDO/TRST). PA13/PA14 are JTAG only and do not appear on the GPIO headers.
 
<div style="display:flex; gap:2em; flex-wrap:wrap;">
{| class="wikitable"
|+ Header 1 — J2
! Pin !! GPIO !!  !! GPIO !! Pin
|-
|-
| 25 || PA2 || PA2
| 1 || 5V || || 5V || 2
|-
|-
| 26 || PA3 || PA3
| 3 || 5V || || 5V || 4
|-
|-
| 27 || PA4 || PA4
| 5 || 3V3 || || 3V3 || 6
|-
|-
| 28 || PA5 || PA5
| 7 || 3V3 || || 3V3 || 8
|-
|-
| 29 || PA6 || PA6
| 9 || GND || || GND || 10
|-
|-
| 30 || PA7 || PA7
| 11 || PE2 || || PE3 || 12
|-
|-
| 31 || PC4 || PC4
| 13 || PE4 || || PE5 || 14
|-
|-
| 32 || PC5 || PC5
| 15 || PE6 || || PC13 || 16
|-
|-
| 33 || PB0 || PB0
| 17 || PC0 || || PC1 || 18
|-
|-
| 34 || PB1 || PB1
| 19 || PC2 || || PC3 || 20
|-
|-
| 35 || PE7 || PE7
| 21 || VREF- || || VREF+ || 22
|-
|-
| 36 || PE8 || PE8
| 23 || PA0 || || PA1 || 24
|-
|-
| 37 || PE9 || PE9
| 25 || PA2 || || PA3 || 26
|-
|-
| 38 || PE10 || PE10
| 27 || PA4 || || PA5 || 28
|-
|-
| 39 || PE11 || PE11
| 29 || PA6 || || PA7 || 30
|-
|-
| 40 || PE12 || PE12
| 31 || PC4 || || PC5 || 32
|-
|-
| 41 || PE13 || PE13
| 33 || PB0 || || PB1 || 34
|-
|-
| 42 || PE14 || PE14
| 35 || PE7 || || PE8 || 36
|-
|-
| 43 || PE15 || PE15
| 37 || PE9 || || PE10 || 38
|-
|-
| 44 || PB10 || PB10
| 39 || PE11 || || PE12 || 40
|-
|-
| 45 || PB11 || PB11
| 41 || PE13 || || PE14 || 42
|-
|-
| 46 || PB12 || PB12
| 43 || PE15 || || PB10 || 44
|-
|-
| 47 || PB13 || PB13
| 45 || PB11 || || PB12 || 46
|-
|-
| 48 || PB14 || PB14
| 47 || PB13 || || PB14 || 48
|}
|}


=== Header 2 (J3) — 2×24 pinos ===
{| class="wikitable"
{| class="wikitable"
! # !! Nome !! GPIO
|+ Header 2 — J3
! Pin !! GPIO !!  !! GPIO !! Pin
|-
|-
| 1–4 || 3V3 || +3.3V rail
| 1 || 3V3 || || 3V3 || 2
|-
|-
| 5 || BT0 || BOOT0
| 3 || 3V3 || || 3V3 || 4
|-
|-
| 6 || BT1 || PB2 (BOOT1)
| 5 || BT0 (BOOT0) || || BT1 (PB2) || 6
|-
|-
| 7–10 || GND || Ground
| 7 || GND || || GND || 8
|-
|-
| 11 || PE1 || PE1
| 9 || GND || || GND || 10
|-
|-
| 12 || PE0 || PE0
| 11 || PE1 || || PE0 || 12
|-
|-
| 13 || PB9 || PB9
| 13 || PB9 || || PB8 || 14
|-
|-
| 14 || PB8 || PB8
| 15 || PB7 ¹ || || PB6 ¹ || 16
|-
|-
| 15 || PB7 || PB7
| 17 || PB5 ¹ || || PB3 ¹ || 18
|-
|-
| 16 || PB6 || PB6
| 19 || PD7 || || PD6 || 20
|-
|-
| 17 || PB5 || PB5
| 21 || PD5 || || PD4 || 22
|-
|-
| 18 || PB3 || PB3
| 23 || PD3 || || PD2 || 24
|-
|-
| 19 || PD7 || PD7
| 25 || PD1 || || PD0 || 26
|-
|-
| 20 || PD6 || PD6
| 27 || PC12 || || PC11 || 28
|-
|-
| 21 || PD5 || PD5
| 29 || PC10 || || PA15 || 30
|-
|-
| 22 || PD4 || PD4
| 31 || PA12 || || PA11 || 32
|-
|-
| 23 || PD3 || PD3
| 33 || PA10 || || PA9 || 34
|-
|-
| 24 || PD2 || PD2
| 35 || PA8 || || PC9 || 36
|-
|-
| 25 || PD1 || PD1
| 37 || PC8 || || PC7 || 38
|-
|-
| 26 || PD0 || PD0
| 39 || PC6 || || PD15 || 40
|-
|-
| 27 || PC12 || PC12
| 41 || PD14 || || PD13 || 42
|-
|-
| 28 || PC11 || PC11
| 43 || PD12 || || PD11 || 44
|-
|-
| 29 || PC10 || PC10
| 45 || PD10 || || PD9 || 46
|-
|-
| 30 || PA15 || PA15
| 47 || PD8 || || PB15 || 48
|-
| 31 || PA12 || PA12
|-
| 32 || PA11 || PA11
|-
| 33 || PA10 || PA10
|-
| 34 || PA9 || PA9
|-
| 35 || PA8 || PA8
|-
| 36 || PC9 || PC9
|-
| 37 || PC8 || PC8
|-
| 38 || PC7 || PC7
|-
| 39 || PC6 || PC6
|-
| 40 || PD15 || PD15
|-
| 41 || PD14 || PD14
|-
| 42 || PD13 || PD13
|-
| 43 || PD12 || PD12
|-
| 44 || PD11 || PD11
|-
| 45 || PD10 || PD10
|-
| 46 || PD9 || PD9
|-
| 47 || PD8 || PD8
|-
| 48 || PB15 || PB15
|}
|}
</div>


=== JTAG Header (P1) — 2×10 ===
¹ Shared with nRF24L01 header (SPI1): PB3=SCK, PB5=MOSI, PB6=CE, PB7=CS.
 
=== JTAG / SWD Header (P1) — 2×10 ===
{| class="wikitable"
{| class="wikitable"
! # !! Função !! GPIO
! Pin !! Function !! !! Function !! Pin
|-
| 1 || +3.3V || || +3.3V || 2
|-
| 3 || TRST (PB4) || || GND || 4
|-
|-
| 1–2 || VCC || +3.3V
| 5 || TDI (PA15) || || GND || 6
|-
|-
| 3 || TRST || PB4
| 7 || TMS/SWDIO (PA13) || || GND || 8
|-
|-
| 5 || TDI || PA15
| 9 || TCLK/SWCLK (PA14) || || GND || 10
|-
|-
| 7 || TMS / SWDIO || PA13
| 11 || RTCK (N.C.) || || GND || 12
|-
|-
| 9 || TCLK / SWCLK || PA14
| 13 || TDO/SWO (PB3) || || GND || 14
|-
|-
| 13 || TDO / SWO || PB3
| 15 || RESET (NRST) || || GND || 16
|-
|-
| 15 || RESET || NRST
| 17 || N.C. || || GND || 18
|-
|-
| 4,6,8,10,12,14,16,18,20 || GND || Ground
| 19 || N.C. || || GND || 20
|}
|}


=== TFT LCD Header (J1) — 2×16 ===
=== TFT LCD Header (J1) — 2×16 ===
{| class="wikitable"
{| class="wikitable"
! # !! Função !! GPIO
! Pin !! Function !! !! Function !! Pin
|-
|-
| 1 || GND || Ground
| 1 || GND || || RST || 2
|-
|-
| 2 || RST || Reset
| 3 || FSMC_D15 (PD10) || || FSMC_D14 (PD9) || 4
|-
|-
| 3–18 || FSMC D15–D0 || PD10,PD9,PD8,PE15–PE7,PD1,PD0,PD15,PD14
| 5 || FSMC_D13 (PD8) || || FSMC_D12 (PE15) || 6
|-
|-
| 19 || FSMC NOE || PD4
| 7 || FSMC_D11 (PE14) || || FSMC_D10 (PE13) || 8
|-
|-
| 20 || FSMC NWE || PD5
| 9 || FSMC_D9 (PE12) || || FSMC_D8 (PE11) || 10
|-
|-
| 21 || FSMC A18 || PD13
| 11 || FSMC_D7 (PE10) || || FSMC_D6 (PE9) || 12
|-
|-
| 22 || FSMC NE1 || PD7
| 13 || FSMC_D5 (PE8) || || FSMC_D4 (PE7) || 14
|-
|-
| 23 || Touch CLK || PB13
| 15 || FSMC_D3 (PD1) || || FSMC_D2 (PD0) || 16
|-
|-
| 24 || Touch CS || PB12
| 17 || FSMC_D1 (PD15) || || FSMC_D0 (PD14) || 18
|-
|-
| 25 || Touch MOSI || PB15
| 19 || FSMC_NOE (PD4) || || FSMC_NWE (PD5) || 20
|-
|-
| 26 || Touch MISO || PB14
| 21 || FSMC_A18 (PD13) || || FSMC_NE1 (PD7) || 22
|-
|-
| 27 || Touch PEN || PC5
| 23 || Touch_CLK (PB13) || || Touch_CS (PB12) || 24
|-
|-
| 28 || LCD Backlight || PB1
| 25 || Touch_MOSI (PB15) || || Touch_MISO (PB14) || 26
|-
|-
| 31 || 3V3 || +3.3V
| 27 || Touch_PEN (PC5) || || LCD_BL (PB1) ² || 28
|-
|-
| 30,32 || GND || Ground
| 29 || VBAT (N.C.) || || GND || 30
|-
| 31 || +3.3V || || GND || 32
|}
|}
² LCD backlight (PB1) is driven via PNP transistor Q2, not directly.


=== nRF24L01 Header (JP2) — 2×4 ===
=== nRF24L01 Header (JP2) — 2×4 ===
{| class="wikitable"
{| class="wikitable"
! # !! Função !! GPIO
! Pin !! Function !! !! Function !! Pin
|-
| 1 || GND || Ground
|-
| 2 || VCC || +3.3V
|-
| 3 || CE || PB6
|-
| 4 || CSN || PB7
|-
|-
| 5 || SCK || PB3
| 1 || GND || || VCC (+3.3V) || 2
|-
|-
| 6 || MOSI || PB5
| 3 || CE (PB6) || || CSN (PB7) || 4
|-
|-
| 7 || MISO || PB4
| 5 || SCK (PB3) || || MOSI (PB5) || 6
|-
|-
| 8 || IRQ || PB8
| 7 || MISO (PB4) || || IRQ (PB8) || 8
|}
|}


=== Serial Header (J6) — 1×4 ===
=== Serial Header (J6) — 1×4 ===
{| class="wikitable"
{| class="wikitable"
! # !! Função !! GPIO
! Pin !! Function !! GPIO
|-
|-
| 1 || VCC || +5V
| 1 || VCC || +5V
Linha 412: Linha 366:
| 2 || GND || Ground
| 2 || GND || Ground
|-
|-
| 3 || RX || PA10
| 3 || RX || PA10 (USART1_RX)
|-
|-
| 4 || TX || PA9
| 4 || TX || PA9 (USART1_TX)
|}
|}


=== microSD (U5) ===
=== MiniSD Connector (U5) ===
{| class="wikitable"
{| class="wikitable"
! # !! Função !! GPIO
! Pin !! Function !! GPIO
|-
|-
| 1 || DAT2 || PC10
| 1 || DAT2 || PC10 (SDIO_D2)
|-
|-
| 2 || CD/DAT3 || PC11
| 2 || CD/DAT3 || PC11 (SDIO_D3)
|-
|-
| 3 || CMD || PD2
| 3 || CMD || PD2 (SDIO_CMD)
|-
|-
| 4 || VDD || +3.3V
| 4 || VDD || +3.3V
|-
|-
| 5 || CLK || PC12
| 5 || CLK || PC12 (SDIO_SCK)
|-
|-
| 6 || VSS || Ground
| 6 || VSS || Ground
|-
|-
| 7 || DAT0 || PC8
| 7 || DAT0 || PC8 (SDIO_D0)
|-
|-
| 8 || DAT1 || PC9
| 8 || DAT1 || PC9 (SDIO_D1)
|-
| 9 || CD || N.C.
|}
|}
''Note: SDIO data lines and CMD have 10kΩ pull-up resistors (R24, R26–R29).''


=== USB Mini (J4) ===
=== USB Mini Connector (J4) ===
{| class="wikitable"
{| class="wikitable"
! # !! Função !! GPIO
! Pin !! Function !! GPIO
|-
|-
| 1 || VCC || +5V
| 1 || VCC || +5V
|-
|-
| 2 || D- || PA11
| 2 || D- || PA11 (USB_DM), 22Ω series (R19)
|-
| 3 || D+ || PA12 (USB_DP), 22Ω series (R18), 1.5kΩ pull-up (R21)
|-
|-
| 3 || D+ || PA12
| 4 || ID || N.C.
|-
|-
| 5 || GND || Ground
| 5 || GND || Ground
|}
|}


== SPI Flash — W25Q16JV (U3) ==
== Development ==
{| class="wikitable"
! colspan="2" | Winbond W25Q16JV
|-
| Capacidade || 2 MiB (16 Mbit)
|-
| Interface || SPI1
|-
| Package || SOIC-8
|-
| CS || PB0
|-
| DO (MISO) || PB4
|-
| DI (MOSI) || PB5
|-
| CLK || PB3
|}
Nota: O CS está permanentemente activo na maioria das placas.
 
== Documentation ==
[[File:STM32F407VET6 Pinmap.jpg|200px|thumb|Pinmap]]


STM32F4 documentation from ST Microelectronics.
=== Toolchain ===
Generate the project with '''STM32CubeMX''' in '''Makefile''' format, then compile with the [https://developer.arm.com/open-source/gnu-toolchain/gnu-rm GNU ARM Embedded Toolchain].


Board schematic: [[Media:STM32F407ZET6_sch-1.pdf]] (This is the ZET6 board — all appears correct, other than:
=== Flashing ===
* Pin numbers on MCU will be different
Use an '''ST-Link V2''' programmer and the [https://github.com/texane/stlink stlink] software:
* Extend I/O connectors are different (less pins)
<syntaxhighlight lang="shell">
* SDRAM is not implemented on my board)
st-flash write build/blinky.bin 0x8000000
</syntaxhighlight>


Another board schematic (PCB and components list included): [[Media:STM32_F4VE_SCHEMATIC.PDF]]
=== Debugging ===
Run '''st-util''' in a separate terminal, then launch GDB:
<syntaxhighlight lang="shell">
arm-none-eabi-gdb --eval-command="tar extended-remote :4242" build/blinky.elf
</syntaxhighlight>


Translated manual describes the demo software: [[Media:STM32F407_example_manual.ja.en.pdf]]
== Documentation ==
[[File:STM32F407VET6 Pinmap.jpg|200px|thumb|Pinmap]]


Original schematic from stm32-base.org: [https://stm32-base.org/assets/pdf/boards/original-schematic-STM32F407VET6-STM32_F4VE_V2.0.pdf STM32_F4VE_V2.0 Schematic]
* Board schematic (ZET6 variant — mostly applicable): [[Media:STM32F407ZET6_sch-1.pdf]]
** Note: MCU pin numbers differ; I/O connectors have fewer pins; SDRAM not present on this board.
* Alternative schematic with PCB layout and BOM: [[Media:STM32_F4VE_SCHEMATIC.PDF]]
* Original schematic: [https://stm32-base.org/assets/pdf/boards/original-schematic-STM32F407VET6-STM32_F4VE_V2.0.pdf STM32_F4VE_V2.0 Schematic (stm32-base.org)]
* Demo software translated manual: [[Media:STM32F407_example_manual.ja.en.pdf]]


== External links ==
== External Links ==
* [http://www.st.com/en/microcontrollers/stm32f407ve.html Product Page — ST]
* [https://www.st.com/en/microcontrollers-microprocessors/stm32f407ve.html STM32F407VE Product Page — ST]
* [http://www.st.com/resource/en/reference_manual/dm00031020.pdf Reference Manual]
* [https://www.st.com/resource/en/reference_manual/dm00031020.pdf STM32F4 Reference Manual]
* [http://www.st.com/en/development-tools/stm32cubemx.html STM32CubeMX]
* [https://www.st.com/en/development-tools/stm32cubemx.html STM32CubeMX]
* [https://stm32-base.org/boards/STM32F407VET6-STM32-F4VE-V2.0.html STM32-base project page]
* [https://stm32-base.org/boards/STM32F407VET6-STM32-F4VE-V2.0.html STM32-base project page]
* [https://developer.arm.com/open-source/gnu-toolchain/gnu-rm GNU ARM Embedded Toolchain]
* [https://developer.arm.com/open-source/gnu-toolchain/gnu-rm GNU ARM Embedded Toolchain]
* [https://github.com/texane/stlink stlink — ST-Link software]
* [https://github.com/texane/stlink stlink — Open source ST-Link software]


[[Category:Electrónica]]
[[Category:Electrónica]]

Revisão das 22h49min de 12 de março de 2026

Front
Dimensions
Features

Overview

The STM32 F4VE is a small development board based on the STM32F407VET6 microcontroller. It breaks out all CPU pins via two 2×24 pin headers and supports expansion through multiple peripheral connectors.

Board marked "STM32F4XX STM32_F4VE V2.0 1509" on the back.

Board
Name STM32 F4VE
Part STM32_F4VE
Origin China
PCB Color Black
PCB Size 62mm × 85mm
Mounting 4× M3 holes

Warnings

  • Warning: The +5V pins are directly connected to the USB +5V pin with no protection. Do not power the board through USB and an external power supply at the same time.
  • Warning: The board has an extra pull-up resistor on D+ (R21, 1.5kΩ) that violates the USB specification when the MCU's internal pull-ups are also active. This may cause USB errors. USB data lines also have 22Ω series resistors (R18, R19) for protection.

Microcontroller

STM32F407VET6
Manufacturer ST Microelectronics
Core ARM Cortex-M4 32-bit + FPU
Max. Clock 168 MHz
Operating Voltage 1.8V – 3.6V
Package LQFP100
Memory
Flash 512 KiB
SRAM 192 KiB
Backup SRAM 4 KiB
Oscillators
HSI 16 MHz
LSI 32 kHz
HSE 8 MHz (Y2)
LSE 32.768 kHz (Y1)

Peripherals

  • 3× SPI
  • 3× USART + 2× UART
  • 2× I2S
  • 3× I2C
  • 1× FSMC
  • 1× SDIO
  • 2× CAN
  • 1× USB 2.0 FS/HS (with DMA)
  • 1× USB HS ULPI (for external PHY)
  • 1× 10/100 Ethernet MAC
  • 1× 8–12-bit parallel camera interface
  • 3× ADC 12-bit (1 µs)
  • 2× DAC 12-bit
  • Single-cycle DSP instructions

Board Hardware

Power

Voltage Regulator — AMS1117-3.3V (U1)
Input +4.6V to +15V
Output +3.3V @ 1A
Package SOT223
Power Sources +5V pin, +3.3V pin, USB

LEDs

Ref GPIO Resistor Mode
D1 (Power) +3.3V rail R5 (510Ω) Always on
D2 (User) PA6 R13 (510Ω) Sink (active low)
D3 (User) PA7 R14 (510Ω) Sink (active low)

Buttons

Label GPIO Mode
RST NRST Active low
K_UP PA0 Active high
K0 PE4 Active low
K1 PE3 Active low

Boot Mode Jumpers

Label Connected to Notes
BT0 BOOT0 Part of Header 2 (J3, pin 5). GND via R7 by default.
BT1 PB2 (BOOT1) Part of Header 2 (J3, pin 6). GND via R8 by default.

Note: Both BOOT pins are pulled to GND by default (R7, R8 = 10kΩ), booting from flash. Jumper caps are pre-installed for convenience.

On-board Devices

SPI Flash — W25Q16 (U3)
Capacity 2 MiB (16 Mbit)
Interface SPI1
Package SOP-8
/CS (F_CS) PB0 (10kΩ pull-up via R20)
DO (MISO) PB4 / SPI1_MISO
DI (MOSI) PB5 / SPI1_MOSI
CLK PB3 / SPI1_SCK
/WP +3.3V (always writable)
/HOLD +3.3V
RTC Backup Battery
Type CR1220
Protection BAT54C dual Schottky diode (Q1)

Connectors & Pinouts

GPIO Headers

Two 2×24 pin headers (2.54mm, male) break out all GPIO.

Note: PB3, PB5, PB6, PB7 are shared with the nRF24L01 header (SPI1). PB3/PB4 are also used for JTAG (TDO/TRST). PA13/PA14 are JTAG only and do not appear on the GPIO headers.

Header 1 — J2
Pin GPIO GPIO Pin
1 5V 5V 2
3 5V 5V 4
5 3V3 3V3 6
7 3V3 3V3 8
9 GND GND 10
11 PE2 PE3 12
13 PE4 PE5 14
15 PE6 PC13 16
17 PC0 PC1 18
19 PC2 PC3 20
21 VREF- VREF+ 22
23 PA0 PA1 24
25 PA2 PA3 26
27 PA4 PA5 28
29 PA6 PA7 30
31 PC4 PC5 32
33 PB0 PB1 34
35 PE7 PE8 36
37 PE9 PE10 38
39 PE11 PE12 40
41 PE13 PE14 42
43 PE15 PB10 44
45 PB11 PB12 46
47 PB13 PB14 48
Header 2 — J3
Pin GPIO GPIO Pin
1 3V3 3V3 2
3 3V3 3V3 4
5 BT0 (BOOT0) BT1 (PB2) 6
7 GND GND 8
9 GND GND 10
11 PE1 PE0 12
13 PB9 PB8 14
15 PB7 ¹ PB6 ¹ 16
17 PB5 ¹ PB3 ¹ 18
19 PD7 PD6 20
21 PD5 PD4 22
23 PD3 PD2 24
25 PD1 PD0 26
27 PC12 PC11 28
29 PC10 PA15 30
31 PA12 PA11 32
33 PA10 PA9 34
35 PA8 PC9 36
37 PC8 PC7 38
39 PC6 PD15 40
41 PD14 PD13 42
43 PD12 PD11 44
45 PD10 PD9 46
47 PD8 PB15 48

¹ Shared with nRF24L01 header (SPI1): PB3=SCK, PB5=MOSI, PB6=CE, PB7=CS.

JTAG / SWD Header (P1) — 2×10

Pin Function Function Pin
1 +3.3V +3.3V 2
3 TRST (PB4) GND 4
5 TDI (PA15) GND 6
7 TMS/SWDIO (PA13) GND 8
9 TCLK/SWCLK (PA14) GND 10
11 RTCK (N.C.) GND 12
13 TDO/SWO (PB3) GND 14
15 RESET (NRST) GND 16
17 N.C. GND 18
19 N.C. GND 20

TFT LCD Header (J1) — 2×16

Pin Function Function Pin
1 GND RST 2
3 FSMC_D15 (PD10) FSMC_D14 (PD9) 4
5 FSMC_D13 (PD8) FSMC_D12 (PE15) 6
7 FSMC_D11 (PE14) FSMC_D10 (PE13) 8
9 FSMC_D9 (PE12) FSMC_D8 (PE11) 10
11 FSMC_D7 (PE10) FSMC_D6 (PE9) 12
13 FSMC_D5 (PE8) FSMC_D4 (PE7) 14
15 FSMC_D3 (PD1) FSMC_D2 (PD0) 16
17 FSMC_D1 (PD15) FSMC_D0 (PD14) 18
19 FSMC_NOE (PD4) FSMC_NWE (PD5) 20
21 FSMC_A18 (PD13) FSMC_NE1 (PD7) 22
23 Touch_CLK (PB13) Touch_CS (PB12) 24
25 Touch_MOSI (PB15) Touch_MISO (PB14) 26
27 Touch_PEN (PC5) LCD_BL (PB1) ² 28
29 VBAT (N.C.) GND 30
31 +3.3V GND 32

² LCD backlight (PB1) is driven via PNP transistor Q2, not directly.

nRF24L01 Header (JP2) — 2×4

Pin Function Function Pin
1 GND VCC (+3.3V) 2
3 CE (PB6) CSN (PB7) 4
5 SCK (PB3) MOSI (PB5) 6
7 MISO (PB4) IRQ (PB8) 8

Serial Header (J6) — 1×4

Pin Function GPIO
1 VCC +5V
2 GND Ground
3 RX PA10 (USART1_RX)
4 TX PA9 (USART1_TX)

MiniSD Connector (U5)

Pin Function GPIO
1 DAT2 PC10 (SDIO_D2)
2 CD/DAT3 PC11 (SDIO_D3)
3 CMD PD2 (SDIO_CMD)
4 VDD +3.3V
5 CLK PC12 (SDIO_SCK)
6 VSS Ground
7 DAT0 PC8 (SDIO_D0)
8 DAT1 PC9 (SDIO_D1)
9 CD N.C.

Note: SDIO data lines and CMD have 10kΩ pull-up resistors (R24, R26–R29).

USB Mini Connector (J4)

Pin Function GPIO
1 VCC +5V
2 D- PA11 (USB_DM), 22Ω series (R19)
3 D+ PA12 (USB_DP), 22Ω series (R18), 1.5kΩ pull-up (R21)
4 ID N.C.
5 GND Ground

Development

Toolchain

Generate the project with STM32CubeMX in Makefile format, then compile with the GNU ARM Embedded Toolchain.

Flashing

Use an ST-Link V2 programmer and the stlink software:

st-flash write build/blinky.bin 0x8000000

Debugging

Run st-util in a separate terminal, then launch GDB:

arm-none-eabi-gdb --eval-command="tar extended-remote :4242" build/blinky.elf

Documentation

Pinmap