Differences Between STM32, GD32, and ESP32: A Comprehensive Guide

To not miss my updates, remember to click the top right corner – view public account – set as a star, and give me a star!

Differences Between STM32, GD32, and ESP32: A Comprehensive Guide
Differences Between STM32, GD32, and ESP32: A Comprehensive Guide

01

Introduction

STM32: A product released by STMicroelectronics on June 11, 2007, a 32-bit microcontroller.

GD32: A product released by GigaDevice in 2013, which closely imitates STM32 in chip development, configuration, and naming; even GPIO and STM32 are pin-to-pin compatible, allowing direct use without modification. Sometimes, the source code for STM32 can be compiled and flashed onto GD32 without changes. However, there are many differences, such as serial port drivers, USB, library files, etc.

ESP32: A product developed by Espressif in 2017, which differs from STM32 and GD32. ESP32 mainly targets the IoT field, supports many functions, but has very few GPIO pins exposed, so most GPIO pins have multiple functions. It comes with integrated Bluetooth, WiFi, and other essential IoT features, and the board is quite small, suitable for IoT applications.

02

Differences Between GD32 and STM32

GD32 is a domestic microcontroller and has much in common with STM32. However, GD32 is a different product, and not everything can be reused from STM32; there are some independently developed features that differ. The differences are as follows:

1. Core

GD32 uses the second-generation M3 core, while STM32 mainly uses the first-generation M3 core. The following diagram shows the errata for the ARM M3 core; GD32 uses only the 752419 bug.

Differences Between STM32, GD32, and ESP32: A Comprehensive Guide

2. Clock Frequency

Using HSE (High-Speed External Clock): The maximum clock frequency of GD32 is 108M, while that of STM32 is 72M.

Using HSI (High-Speed Internal Clock): The maximum clock frequency of GD32 is 108M, while that of STM32 is 64M.

A higher clock frequency means that the microcontroller code runs faster, making GD32 a good choice for projects requiring screen refresh, square root calculations, motor control, etc.

3. Power Supply

External Power Supply: The external power supply range for GD32 is 2.6~3.6V, while for STM32, it is 2.0~3.6V or 1.65~3.6V. GD32’s power supply range is relatively narrower than that of STM32.

Core Voltage: The core voltage for GD32 is 1.2V, while for STM32 it is 1.8V. GD32’s core voltage is lower, resulting in lower power consumption during operation.

4. Flash Differences

GD32’s Flash is independently developed and differs from that of STM32.

GD Flash execution speed: GD32 Flash executes programs with 0 wait cycles.

STM32 Flash execution speed: ST system frequency does not access flash wait time: 0 wait cycles when 0

Flash erase time: GD32’s erase time is longer; the official data states that for GD32F103/101 series Flash models of 128KB and below, the typical Page Erase time is 100ms, while actual measurement is around 60ms. In contrast, the typical Page Erase time for ST products is 20~40ms.

5. Power Consumption

The table below shows that GD’s products have lower operating power consumption compared to STM32 at the same clock frequency, but under the same settings, GD’s shutdown mode, standby mode, and sleep mode are still higher than those of STM32.

Differences Between STM32, GD32, and ESP32: A Comprehensive Guide

6. Serial Port

When GD continuously sends data, there is a Bit Idle between every two bytes, while STM32 does not, as shown in the following diagram:

Differences Between STM32, GD32, and ESP32: A Comprehensive Guide

GD’s serial port has only 1/2 stop bit modes during transmission. STM32 offers 0.5/1/1.5/2 stop bit modes.

The differences in USART between GD and STM32 do not significantly impact communication; it just slightly increases GD’s communication time.

7. ADC Differences

GD’s input impedance and sampling time settings differ from those of ST. With the same configuration, GD’s sampling input impedance is relatively lower. The specific situation is shown in the table below, which runs at a clock frequency of 72M with an ADC sampling clock of 14M:

Differences Between STM32, GD32, and ESP32: A Comprehensive Guide

8. FSMC

Only STM32 with 100 pins or more and large capacity (256K and above) has FSMC, while all GD32 with 100 pins or more have FSMC.

9. RAM & FLASH Size Differences in 103 Series

The RAM and Flash sizes of GD103 series and ST103 series are compared in the following diagram:

Differences Between STM32, GD32, and ESP32: A Comprehensive Guide

10. Differences Between 105 & 107 Series STM32 and GD

GD offers many more options in the 105/107 series compared to ST; see the following table:

Differences Between STM32, GD32, and ESP32: A Comprehensive Guide

11. Anti-Interference Capability

GD’s anti-interference capability is not as strong as STM32 and requires further refinement.

03

ESP32 vs STM32

ESP32 is a chip launched by Espressif, consisting of a dual-core system formed by two Harvard architecture Xtensa LX6 CPUs. All on-chip memory, external memory, and peripherals are distributed across the data and/or instruction buses of the two CPUs.

Compared to the STM32 family, ESP32 represents a series, but currently, the members of this series are still relatively few; let’s take a look:

Differences Between STM32, GD32, and ESP32: A Comprehensive Guide

Resources are as follows:

Differences Between STM32, GD32, and ESP32: A Comprehensive Guide
Differences Between STM32, GD32, and ESP32: A Comprehensive Guide
Differences Between STM32, GD32, and ESP32: A Comprehensive Guide

The functional block diagram is as follows:

Differences Between STM32, GD32, and ESP32: A Comprehensive Guide

The pin distribution of the ESP32 module (not the chip) is as follows:

Differences Between STM32, GD32, and ESP32: A Comprehensive Guide

The ESP32 module has limited IO, probably around 30 (the chip has 34, but some are used for external FLASH). However, it has several notable features:

1. It integrates many peripheral interfaces, including SPI, IIC, IIS, AD, DA, PWM, IR, UART, CAN, etc. With a limited number of IO, each IO typically has multiple functions.

2. It has large on-chip flash and RAM, with 448KB flash and 520KB RAM. Additionally, a 4MB flash is directly connected to the module.

3. It is fast! Although the external crystal frequency is only 40MHZ, the internal main frequency can support 80MHZ, 160MHZ, and 240MHZ, with a computing power of up to 600MIPS.

4. It has WiFi and Bluetooth! However, both cannot be used simultaneously.

STM32 and ESP32 have distinct positioning. ESP32 is compact, fast, and powerful, designed for IoT with WiFi connectivity, while STM32 is rich in pins and comprehensive in functionality; although it lacks WiFi and Bluetooth and is not as fast as ESP32, it can connect to networks via Ethernet and control more peripherals, making it suitable for consumer electronics and industrial control.

04

Conclusion

STM32 and GD32 are homogeneous products; one is foreign, and the other is domestic. Recently, domestic replacement has become popular, so GD32 has great development prospects. The Internet of Things is a promising direction, making ESP32 also very promising.

Source: Breadboard Community, copyright belongs to the original author. If there are copyright issues, please contact Darwin for removal.

END
Differences Between STM32, GD32, and ESP32: A Comprehensive Guide
Recommended Reading:

Project Sharing | Electronics Competition Series | Artificial Intelligence | Postgraduate Entrance Exam

Essential Knowledge Points | Graduation Project | Switch Power Supply | Job Hunting

We are Nimo, the founder of Darwin, who only talks about technology and not flirting. DarDarwin online education platform aims to serve professionals in the electronics industry, providing skill training videos covering popular topics in various niche areas, such as embedded systems, FPGA, artificial intelligence, etc. It offers tailored learning content for different groups, such as common knowledge points, disassembly assessments, electronics competitions/intelligent cars/postgraduate entrance exams, etc. Welcome to follow us.

Official website: www.darwinlearns.com
Bilibili: Darwin
Differences Between STM32, GD32, and ESP32: A Comprehensive Guide

Leave a Comment

×