Skip to main content

STM32 Discovery

STM32Discovery boards are relatively cheap boards featuring STM32 MCUs manufactured and distributed by STMicroelectronics. They are known as "tinkerer boards", not specifically as flight controllers, as they can be used for a variety of things. They are bigger and heavier than standard flight controllers, feature plug pins for ease of use and quick changes, no soldering required.

They come with different MCUs and in different sizes, however pin-outs are very similar for compatibility with external boards which can be used as extensions.

Solid documentation is provided by STMicroelectronics.

Targets

TargetMCUDocumentation
STM32F3DISCOVERYSTM32F303VCUser Manual | MCU Datasheet
STM32F4DISCOVERYSTM32F407VGUser Manual | MCU Datasheet
STM32F411DISCOVERYSTM32F411VEUser Manual | MCU Datasheet

Hardware specifications, peripherals, pinouts and all other data can be found in above User Manuals. Rest of this document is instead going to focus on setup of the board for Betaflight and example assemblies/wirings.

Note: Not all pin-outs seem to be listed in the User Manual, double-checking in MCU Datasheet is recommended.

Pins

FunctionF3F4F411
PPM ReceiverPB8PB9PB8
Motor 1PA8PB1PD12
Motor 2PC6PB0PB1
Motor 3PC7PA2PB0
Motor 4PC8PA3PA2
Motor 5/PA10PA3
Motor 6/PA8PA10
BeeperPD12/PA8
USART1 TXPA9PB6PA15
USART1 RXPA10PB7PA10
USART2 TXPD5PA2PA2
USART2 RXPD6PA3PA3
USART3 TXPB10PB10/
USART3 RXPB11PB11/
USART4 TXPC10PA0/
USART4 RXPC11PA1/
USART5 TXPC12//
USART5 RXPD2//
USART6 TX/PC6PC6
USART6 RX/PC7PC7
HCSR04 TriggerPB0//
HCSR04 EchoPB1//

Note: / means not supported or configured.

Setup

Flash

  • Connect board using ST-LINK labelled port (usually Mini-B USB connector)

Linux & Mac:

  • Install stlink
  • $ st-flash --format ihex write program.hex

Windows:

Connect Configurator

  • Connect board using USER labelled port (usually Micro-AB or secondary Mini-B USB connector)

Example Assembly

As an example of full assembly, feriCopterV1 is completely custom built drone as part of a student project. Includes simple 3D printed frame, parts list, assembly and pin connection instructions, providing a great entry-point to anyone who wants to assemble their own little drone cheaply and learn more about how everything works.

It is based on STM32F3DISCOVERY target, required changes in Configurator are noted below. Also refer to Target Pins table for other Discovery boards. Additional non-pin changes are noted below.

Configurator:

SettingValue
MixerQuad X 1234
ReceiverPPM RX input

F411 Changes

  • Inversed Front/Back (Front is Back and Back is Front).
  • Frame requires minor incision to fit different jumper location.