STM32F3 Discovery

Overview

The STM32F3DISCOVERY Discovery kit features an ARM Cortex-M4 based STM32F303VC MCU with everything required for beginners and experienced users to get started quickly. Here are some highlights of the STM32F3DISCOVERY board:

  • STM32 microcontroller in LQFP100 package

  • Extension header for all LQFP100 I/Os for quick connection to prototyping board and easy probing

  • On-board, ST-LINK/V2 for PCB version A or B or ST-LINK/V2-B for PCB version C and newer, debugger/programmer with SWD connector

  • Board power supply: through USB bus or from an external 3 V or 5 V supply voltage

  • External application power supply: 3 V and 5 V

  • Ten LEDs:

    • 3.3 V power on (LD1)

    • USB communication (LD2)

    • Eight user LEDs: red (LD3/LD10), blue (LD4/LD9), orange (LD5/LD9) and green (LD6/LD7)

  • Two push-buttons: USER and RESET

  • USB USER with Mini-B connector

  • L3GD20 or I3G4250D, ST MEMS motion sensor, 3-axis digital output gyroscope

  • LSM303DLHC or LSM303AGR, ST MEMS system-in-package featuring a 3D digital linear acceleration sensor and a 3D digital magnetic sensor;

Hint

Recent PCB revisions (E and newer) are shipped with I3G4250D and LSM303AGR.

More information about the board can be found at the STM32F3DISCOVERY website.

Hardware

STM32F3DISCOVERY Discovery kit provides the following hardware components:

  • STM32F303VCT6 in LQFP100 package

  • ARM® 32-bit Cortex® -M4 CPU with FPU

  • 72 MHz max CPU frequency

  • VDD from 2.0 V to 3.6 V

  • 256 KB Flash

  • 40 KB SRAM

  • Routine booster: 8 Kbytes of SRAM on instruction and data bus

  • GPIO with external interrupt capability

  • 4x12-bit ADC with 39 channels

  • 2x12-bit D/A converters

  • RTC

  • General Purpose Timers (13)

  • USART/UART (5)

  • I2C (2)

  • SPI (3)

  • CAN

  • USB 2.0 full speed interface

  • Infrared transmitter

  • DMA Controller

More information about STM32F303VC can be found here:

Supported Features

The stm32f3_disco board supports the hardware features listed below.

on-chip / on-board
Feature integrated in the SoC / present on the board.
2 / 2
Number of instances that are enabled / disabled.
Click on the label to see the first instance of this feature in the board/SoC DTS files.
vnd,foo
Compatible string for the Devicetree binding matching the feature.
Click on the link to view the binding documentation.

stm32f3_disco/stm32f303xc@B target

Type

Location

Description

Compatible

CPU

on-chip

ARM Cortex-M4F CPU1

arm,cortex-m4f

ADC

on-chip

STM32 ADC1 1

st,stm32-adc

CAN

on-chip

STM32 CAN controller1

st,stm32-bxcan

Clock control

on-chip

STM32F3 RCC (Reset and Clock controller)1

st,stm32f3-rcc

on-chip

STM32 HSE Clock1

st,stm32-hse-clock

on-chip

Generic fixed-rate clock provider1 1

fixed-clock

on-chip

STM32 LSE Clock1

st,stm32-lse-clock

on-chip

STM32F0/F3 Main PLL1

st,stm32f0-pll-clock

Counter

on-chip

STM32 counters7

st,stm32-counter

DAC

on-chip

STM32 family DAC1

st,stm32-dac

DMA

on-chip

STM32 DMA controller (V2bis) for the stm32F0, stm32F1 and stm32L1 soc families1 1

st,stm32-dma-v2bis

Flash controller

on-chip

STM32 Family flash controller1

st,stm32-flash-controller

GPIO & Headers

on-chip

STM32 GPIO Controller6

st,stm32-gpio

I2C

on-chip

STM32 I2C V2 controller2

st,stm32-i2c-v2

Input

on-board

Group of GPIO-bound input keys1

gpio-keys

Interrupt controller

on-chip

ARMv7-M NVIC (Nested Vectored Interrupt Controller)1

arm,v7m-nvic

on-chip

STM32 External Interrupt Controller1

st,stm32-exti

LED

on-board

Group of GPIO-controlled LEDs1

gpio-leds

Memory controller

on-chip

STM32 Battery Backed RAM1

st,stm32-bbram

MTD

on-chip

STM32 flash memory1

st,stm32-nv-flash

on-board

Fixed partitions of a flash (or other non-volatile storage) memory1

fixed-partitions

PHY

on-chip

This binding is to be used by all the usb transceivers which are built-in with USB IP1

usb-nop-xceiv

Pin control

on-chip

STM32 Pin controller1

st,stm32-pinctrl

PWM

on-chip

STM32 PWM1 8

st,stm32-pwm

Reset controller

on-chip

STM32 Reset and Clock Control (RCC) Controller1

st,stm32-rcc-rctl

RTC

on-chip

STM32 RTC1

st,stm32-rtc

Sensors

on-board

STMicroelectronics LSM303DLHC magnetometer sensor1

st,lsm303dlhc-magn

on-board

STMicroelectronics LIS2DH 3-axis accelerometer accessed through I2C bus1

st,lis2dh

on-chip

STM32 family TEMP node for production calibrated sensors with two calibration temperatures1

st,stm32-temp-cal

on-chip

STM32 VREF+1

st,stm32-vref

on-chip

STM32 VBAT1

st,stm32-vbat

Serial controller

on-chip

STM32 USART2 1

st,stm32-usart

on-chip

STM32 UART1 1

st,stm32-uart

SMbus

on-chip

STM32 SMBus controller2

st,stm32-smbus

SPI

on-chip

STM32 SPI controller with embedded Rx and Tx FIFOs2 1

st,stm32-spi-fifo

SRAM

on-chip

Generic on-chip SRAM description1

mmio-sram

Timer

on-chip

ARMv7-M System Tick1

arm,armv7m-systick

on-chip

STM32 timers1 10

st,stm32-timers

USB

on-chip

STM32 USB controller1

st,stm32-usb

Watchdog

on-chip

STM32 watchdog1

st,stm32-watchdog

on-chip

STM32 system window watchdog1

st,stm32-window-watchdog

stm32f3_disco/stm32f303xc@E target

Type

Location

Description

Compatible

CPU

on-chip

ARM Cortex-M4F CPU1

arm,cortex-m4f

ADC

on-chip

STM32 ADC1 1

st,stm32-adc

CAN

on-chip

STM32 CAN controller1

st,stm32-bxcan

Clock control

on-chip

STM32F3 RCC (Reset and Clock controller)1

st,stm32f3-rcc

on-chip

STM32 HSE Clock1

st,stm32-hse-clock

on-chip

Generic fixed-rate clock provider1 1

fixed-clock

on-chip

STM32 LSE Clock1

st,stm32-lse-clock

on-chip

STM32F0/F3 Main PLL1

st,stm32f0-pll-clock

Counter

on-chip

STM32 counters7

st,stm32-counter

DAC

on-chip

STM32 family DAC1

st,stm32-dac

DMA

on-chip

STM32 DMA controller (V2bis) for the stm32F0, stm32F1 and stm32L1 soc families1 1

st,stm32-dma-v2bis

Flash controller

on-chip

STM32 Family flash controller1

st,stm32-flash-controller

GPIO & Headers

on-chip

STM32 GPIO Controller6

st,stm32-gpio

I2C

on-chip

STM32 I2C V2 controller2

st,stm32-i2c-v2

Input

on-board

Group of GPIO-bound input keys1

gpio-keys

Interrupt controller

on-chip

ARMv7-M NVIC (Nested Vectored Interrupt Controller)1

arm,v7m-nvic

on-chip

STM32 External Interrupt Controller1

st,stm32-exti

LED

on-board

Group of GPIO-controlled LEDs1

gpio-leds

Memory controller

on-chip

STM32 Battery Backed RAM1

st,stm32-bbram

MTD

on-chip

STM32 flash memory1

st,stm32-nv-flash

on-board

Fixed partitions of a flash (or other non-volatile storage) memory1

fixed-partitions

PHY

on-chip

This binding is to be used by all the usb transceivers which are built-in with USB IP1

usb-nop-xceiv

Pin control

on-chip

STM32 Pin controller1

st,stm32-pinctrl

PWM

on-chip

STM32 PWM1 8

st,stm32-pwm

Reset controller

on-chip

STM32 Reset and Clock Control (RCC) Controller1

st,stm32-rcc-rctl

RTC

on-chip

STM32 RTC1

st,stm32-rtc

Sensors

on-board

STMicroelectronics LIS2MDL magnetometer accessed through I2C bus1

st,lis2mdl

on-board

STMicroelectronics LIS2DH 3-axis accelerometer accessed through I2C bus1

st,lis2dh

on-board

STMicroelectronics I3G4250D 3-axis gyrometer accessed through SPI bus1

st,i3g4250d

on-chip

STM32 family TEMP node for production calibrated sensors with two calibration temperatures1

st,stm32-temp-cal

on-chip

STM32 VREF+1

st,stm32-vref

on-chip

STM32 VBAT1

st,stm32-vbat

Serial controller

on-chip

STM32 USART2 1

st,stm32-usart

on-chip

STM32 UART1 1

st,stm32-uart

SMbus

on-chip

STM32 SMBus controller2

st,stm32-smbus

SPI

on-chip

STM32 SPI controller with embedded Rx and Tx FIFOs2 1

st,stm32-spi-fifo

SRAM

on-chip

Generic on-chip SRAM description1

mmio-sram

Timer

on-chip

ARMv7-M System Tick1

arm,armv7m-systick

on-chip

STM32 timers1 10

st,stm32-timers

USB

on-chip

STM32 USB controller1

st,stm32-usb

Watchdog

on-chip

STM32 watchdog1

st,stm32-watchdog

on-chip

STM32 system window watchdog1

st,stm32-window-watchdog

Pin Mapping

STM32F3DISCOVERY Discovery kit has 6 GPIO controllers. These controllers are responsible for pin muxing, input/output, pull-up, etc.

For more details please refer to STM32F3DISCOVERY board User Manual.

Default Zephyr Peripheral Mapping:

  • UART_1_TX : PC4

  • UART_1_RX : PC5

  • UART_2_TX : PA2

  • UART_2_RX : PA3

  • UART_4_TX : PC10

  • UART_4_RX : PC11

  • I2C1_SCL : PB6

  • I2C1_SDA : PB7

  • I2C2_SCL : PA9

  • I2C2_SDA : PA10

  • SPI1_NSS : PA4

  • SPI1_SCK : PA5

  • SPI1_MISO : PA6

  • SPI1_MOSI : PA7

  • SPI2_NSS : PB12

  • SPI2_SCK : PB13

  • SPI2_MISO : PB14

  • SPI2_MOSI : PB15

  • CAN1_RX : PD0

  • CAN1_TX : PD1

  • USB_DM : PA11

  • USB_DP : PA12

  • USER_PB : PA0

  • LD3 : PE9

  • LD4 : PE8

  • LD5 : PE10

  • LD6 : PE15

  • LD7 : PE11

  • LD8 : PE14

  • LD9 : PE12

  • LD10 : PE13

  • PWM : PA8

  • ADC1 : PA0

  • DAC1 : PA4

System Clock

STM32F3DISCOVERY System Clock could be driven by internal or external oscillator, as well as main PLL clock. By default System clock is driven by PLL clock at 72 MHz, driven by 8 MHz MCO from the ST Link.

Serial Port

STM32F3DISCOVERY Discovery kit has up to 5 UARTs. The Zephyr console output is assigned to UART1. Default settings are 115200 8N1.

I2C

STM32F3DISCOVERY has up to 2 I2Cs. I2C1 is connected to the LSM303DLHC and is an ultra-compact low-power system-in-package featuring a 3D digital linear acceleration sensor and a 3D digital magnetic sensor.

USB

STM32F3DISCOVERY has a USB 2.0 full-speed device interface available through its mini USB connector (USB USER).

CAN

The STM32F3DISCOVERY does not have an onboard CAN transceiver. In order to use the CAN bus on the this board, an external CAN bus transceiver must be connected to PD0 (CAN1_RX) and PD1 (CAN1_TX).

Programming and Debugging

STM32F3DISCOVERY Discovery kit includes a ST-LINK/V2 or ST-LINK/V2-B embedded debug tool interface.

Applications for the stm32f3_disco board configuration can be built and flashed in the usual way (see Building an Application and Run an Application for more details).

Flashing

The board is configured to be flashed using west STM32CubeProgrammer runner, so its installation is required.

Alternatively, OpenOCD or JLink can also be used to flash the board using the --runner (or -r) option:

$ west flash --runner openocd
$ west flash --runner jlink

Flashing an application to STM32F3DISCOVERY

First, connect the STM32F3DISCOVERY Discovery kit to your host computer using the USB port to prepare it for flashing. Then build and flash your application.

Here is an example for the Hello World application.

# From the root of the zephyr repository
west build -b stm32f3_disco samples/hello_world
west flash

In case you are using a recent PCB revision (E or newer), you have to use an adapted board definition:

# From the root of the zephyr repository
west build -b stm32f3_disco@E samples/hello_world
west flash

Run a serial host program to connect with your board. For PCB version A or B a TTL(3.3V) serial adapter is required. For PCB version C and newer a Virtual Com Port (VCP) is available on the USB ST-LINK port.

$ minicom -D /dev/<tty device>

Replace <tty_device> with the port where the STM32F3DISCOVERY board can be found. For example, under Linux, /dev/ttyUSB0.

You should see the following message on the console:

Hello World! arm

Debugging

You can debug an application in the usual way. Here is an example for the Hello World application.

# From the root of the zephyr repository
west build -b stm32f3_disco samples/hello_world
west debug

Again you have to use the adapted command for newer PCB revisions (E and newer):

# From the root of the zephyr repository
west build -b stm32f3_disco@E samples/hello_world
west debug