Product Comparisons

STM32F103 vs STM32F407: Which MCU is Right for You?

The STM32F103 and STM32F407 are two of the most popular microcontrollers in the embedded world. While both are part of ST's STM32 family, they target different performance tiers. This guide breaks down every key difference to help you make the right choice.

Quick Comparison Table

FeatureSTM32F103STM32F407
CoreARM Cortex-M3ARM Cortex-M4F
Max Clock72 MHz168 MHz
Flash64KB โ€“ 512KB512KB โ€“ 1MB
SRAM20KB โ€“ 64KB128KB โ€“ 192KB
FPUNoYes (single precision)
DSPNoYes
USBFull-Speed (12 Mbps)High-Speed OTG (480 Mbps)
EthernetNoYes (MAC)
CameraNoDCMI interface
Price Range$1.50 โ€“ $4.00$6.00 โ€“ $12.00

Architecture Deep Dive

Cortex-M3 vs Cortex-M4F

The fundamental difference is the processor core:

Cortex-M3 (STM32F103):

  • 3-stage pipeline, Thumb-2 instruction set

  • Hardware multiply (single cycle 32ร—32)

  • No floating-point unit โ€” all FP operations in software

  • Excellent for control-oriented tasks

Cortex-M4F (STM32F407):
  • 3-stage pipeline with branch speculation

  • DSP instructions (SIMD, saturating arithmetic)

  • Single-precision FPU (IEEE 754 compliant)

  • 2.5ร— faster for DSP/math-heavy workloads

Performance Benchmarks

Real-world benchmark comparison:

BenchmarkF103 (72 MHz)F407 (168 MHz)Speedup
CoreMark915656.2ร—
Dhrystone (DMIPS)892102.4ร—
FFT 1024-pt (float)~45 ms~2.1 ms21ร—
GPIO toggle rate18 MHz84 MHz4.7ร—
The FPU makes an enormous difference for any floating-point math โ€” up to 21ร— faster for FFT operations.

Peripheral Comparison

Communication Interfaces

STM32F103:

  • 3ร— USART

  • 2ร— SPI

  • 2ร— I2C

  • 1ร— USB Full-Speed

  • 1ร— CAN

STM32F407:
  • 6ร— USART (4ร— UART)

  • 3ร— SPI (+ I2S)

  • 3ร— I2C

  • 1ร— USB OTG HS + 1ร— USB OTG FS

  • 2ร— CAN

  • Ethernet MAC

  • DCMI (camera interface)

  • SDIO

ADC Performance

Both have 12-bit ADCs, but with different capabilities:

  • F103: 2ร— ADC, 1 MSPS, 16 channels

  • F407: 3ร— ADC, 2.4 MSPS, 24 channels, triple interleaved mode (7.2 MSPS effective)

Timer Resources

Both are well-equipped for motor control and PWM, but the F407 has more timers with more advanced features including synchronized multi-axis motor control.

When to Choose STM32F103

The F103 remains an excellent choice for:

  • Simple control applications โ€” sensor reading, relay control, LED driving

  • Cost-sensitive products โ€” $1.50 unit cost at volume

  • Low-power designs โ€” lower active current at lower clock speeds

  • Legacy compatibility โ€” vast ecosystem of existing libraries and designs

  • Beginner learning โ€” extensive community tutorials available

When to Choose STM32F407

Choose the F407 when you need:

  • Floating-point math โ€” PID controllers, sensor fusion, DSP

  • Audio processing โ€” I2S interface + DMA + FPU

  • USB High-Speed โ€” mass storage, high-bandwidth devices

  • Ethernet connectivity โ€” IoT gateways, industrial networking

  • Camera/imaging โ€” DCMI interface for OV7670 or similar

  • Complex applications โ€” RTOS with many tasks, large codebases

Cost Analysis

At FPGACenter, current pricing:

  • STM32F103C8T6 (64KB Flash, LQFP-48): ~$2.85

  • STM32F407VGT6 (1MB Flash, LQFP-100): ~$8.50

For production volumes of 1000+, expect:
  • F103: $1.20 โ€“ $1.80

  • F407: $5.50 โ€“ $7.50

Conclusion

Choose STM32F103 if your application is simple, cost-sensitive, and doesn't need floating-point math or high-speed connectivity.

Choose STM32F407 if you need DSP capabilities, FPU, Ethernet, USB High-Speed, or more resources for complex applications.

Both are excellent microcontrollers backed by ST's comprehensive HAL library and STM32CubeIDE toolchain. The right choice depends entirely on your specific requirements.

Get Quote