Friday, October 26, 2012

STM32 Discovery-F3 and Discovery-F4 Differences

STMicro has just released the Discovery-F3 board, the latest in its line of low-cost evaluation modules for the STM32 family of ARM-Cortex microcontrollers.  It is similar to the Discovery-F4 board released last year in many ways.

The Discovery-F3 has a 32-bit microcontroller with a floating-point unit like the Discovery-F4, and it has the same physical footprint as the Discovery-F4.  So what are the differences between the Discovery-F3 and the Discovery-F4?

The main difference is the microcontroller itself.  The Discovery-F3 has a STM32F303 microcontroller with 256k program flash and 48k RAM.  The Discovery-F4 has a STM32F407 micro with 1024k program flash and 192k RAM.  Both microcontrollers use a LQFP100 package.

The F3 family microcontrollers are intended for Digital Signal Processing (DSP) and control applications.  Both the F3 and F4 families have an ARM Cortex-M4 brain with DSP instructions, and an added floating-point unit that the lower end Cortex-M0 and Cortex-M3 parts don't have.  To reduce chip costs, the F3 chips have less on-board memory than the STM32 F4 family, and fewer digital interface (e.g. no Ethernet, only one USB).  The F3 ICs also have added analog features and more advanced ADCs.  Please see my previous article for more information on the different features on the STM32 F3 and F4 microcontroller families.

Pinout Differences

The Discovery-F3 and Discovery-F4 both have the same 100-pin interface connectors, the same size, and the same connector positions on the bottom.  On the F4 module, the user USB connector is at the bottom, by the headphone jack.  On the F3 module the user USB jack is moved to the top end and is located by the ST-Link USB connector.
Discovery F3 and F4 Differences - Click to Enlarge
The interface connectors are two 2x25 dual inline headers on the bottom.  The solder end of the pins are intentionally long so they protrude through the top of the PCB so they can be used as test points or as connection pins for female-female jumpers. 

The pinouts of the two Discovery modules are different.  The power and ground pins are in different positions, and most of the port pins have been shifted over by 1 pin.  The following diagram shows the pins that have changed position on the headers.

Discovery F3 & F4 Pinouts, Click to Enlarge

Discovery Board Features

Besides giving a microcontroller with lots of memory, the Discovery boards always give some additional bonus peripheral ICs to experiment with.  Below are links to the products pages for the microcontrollers and the extra peripherals included with these two boards. 

Discovery-F3 - Product Page
Discovery-F4 - Product Page
STM32F303VCT6 microcontroller (MCU),
256k program Flash, 48k SRAM
STM32F407VGT6 microcontroller (MCU),
1024k program flash, 192k RAM
On-board ST-LINK/V2 programmer and embedded debug tool
On-board ST-LINK/V2 programmer and embedded debug tool
LSM303DLHC, ST MEMS 3-axis linear accelerometer motion sensor with 3D magnetic sensor - Product Page
LIS302DL, ST MEMS 3-axis linear accelerometer motion sensor, ±2g or ±8g range
L3GD20, ST MEMS 3-axis digital output gyroscope- Product Page
MP45DT02, ST MEMS audio sensor and omni-directional digital microphone

Cirrus Logic CS43L22, stereo audio DAC with integrated class D speaker driver and stereo sub-mini jack - Product Page

Both boards also have an on-board version of the ST-LINK/V2 programmer and embedded debug tool.  A STM32F103C8T6 microcontroller is used to program and debug the main chip.  It is the same programmer used in the stand-alone ST-Link, but without the enclosure and cabling.  However, it is a SWD only programmer (Serial Wire Debug), whereas the standalone ST-Link can be used for SWD or JTAG.  The JTAG interface gives faster programming times.  The drivers and software for the ST-Link can be found on the Design Support tab of the ST-Link product page.

The F4 board has 8MHz crystals on both the main and the ST-Link MCUs.  The F3 board does not have an 8 MHz crystal on the MCU itself because it uses the ST-Link 8 MHz clock signal instead.

Interface Connectors

Since these Discovery boards use dual inline (DIL) headers, you can't just plug these modules into a solderless breadboard because adjacent pins will be shorted together.  If you need to make more permanent connections than jumper wires provide, one solution is to use 50 pin DIL sockets soldered into prototyping board.  Two possible 50 pin sockets to plug the Discovery boards into are the Tyco 7-534998-5 or the Samtec SSW-125-06-L-D.  You will need two of them for connectors P1 and P2 to plug into.

These sockets can be soldered into 2-hole island protoboard, pad-per-hole protoboard, stripboard, or zig-zag pattern BusBoard.  Depending on your connection needs, each of these require a different amount of track cutting and wiring on the prototyping board.

An example of using BusBoard is shown in my article "A Breakout Board for the Discovery-F4".  The Discovery board took up much of the room on the 100x160mm BusBoard.  I recommend using two BB3U boards with a DIL socket on the edge of each to get more working area.  This also avoid the need to cut the BusBoard tracks in the middle.

Kornak Technologies has developed baseboards that break out the Discovery module ports to separate connectors for easier interfacing.  One is for the Discovery-F3 and one is for the Discovery-F4.  Please email me at for details on these boards that will be released in November 2012.  Discovery-F4 baseboard beta test PCBs are available now for those who would like to solder their own.