ST STM32F3DISCOVERY

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, ST MEMS motion sensor, 3-axis digital output gyroscope

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

STM32F3DISCOVERY

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 Zephyr stm32f3_disco board configuration supports the following hardware features:

Interface Controller Driver/Component
NVIC on-chip nested vector interrupt controller
UART on-chip serial port-polling; serial port-interrupt
PINMUX on-chip pinmux
GPIO on-chip gpio

Other hardware features are not yet supported on Zephyr porting.

The default configuration can be found in the defconfig file:

boards/arm/stm32f3_disco/stm32f3_disco_defconfig

Pin Mapping

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

For mode details please refer to STM32F3DISCOVERY board User Manual.

Default Zephyr Peripheral Mapping:

  • UART_1_TX : PA9
  • UART_1_RX : PA10
  • UART_2_TX : PA2
  • UART_2_RX : PA3
  • USER_PB : PA0
  • LD3 : PE9
  • LD4 : PE8
  • LD5 : PE10
  • LD6 : PE15
  • LD7 : PE11
  • LD8 : PE14
  • LD9 : PE12
  • LD10 : PE13

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.

Programming and Debugging

Flashing

STM32F3DISCOVERY Discovery kit includes a ST-LINK/V2 or ST-LINK/V2-B embedded debug tool interface. This interface is supported by the openocd version included in Zephyr SDK.

Flashing an application to STM32F3DISCOVERY

The sample application Hello World is being used in this tutorial:

$<zephyr_root_path>/samples/hello_world

To build the Zephyr kernel and application, enter:

$ cd <zephyr_root_path>
$ source zephyr-env.sh
$ cd $ZEPHYR_BASE/samples/hello_world/
$ make BOARD=stm32f3_disco

Connect the STM32F3DISCOVERY Discovery kit to your host computer using the USB ST-LINK port. Then, enter the following command:

$ make BOARD=stm32f3_disco 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:

Hello World! arm

Debugging

Access gdb with the following make command:

$ make BOARD=stm32f3_disco debug