Differences Between 32-bit MCUs: ESP32, GD32, and STM32

If you don’t want to miss my updates, remember to check the public account in the upper right corner and set it as a star, and take down the stars to give to me.

Differences Between 32-bit MCUs: ESP32, GD32, and STM32Differences Between 32-bit MCUs: ESP32, GD32, and STM32

01

Introduction

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

GD32: A product released by GigaDevice in 2013, it closely mimics STM32 in chip development, configuration, and naming, even the GPIO pins are pin-to-pin compatible, allowing for direct use without modification. Sometimes, the source code for STM32 can be recompiled 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, unlike STM32 and GD32, ESP32 is primarily aimed at the Internet of Things (IoT) field, supporting many functions but having fewer GPIO pins, with most GPIOs having multiple functions. It comes with integrated Bluetooth and WiFi, essential for IoT, and the board is compact, making it suitable for IoT applications.

02

Differences Between GD32 and STM32

GD32 is a domestic microcontroller, and while it shares many similarities with STM32, it is still a different product, and not everything can be carried over from STM32. There are some differences 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, and GD uses only one bug, 752419.

Differences Between 32-bit MCUs: ESP32, GD32, and STM32

2. Clock Frequency

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

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

A higher clock frequency means faster execution of microcontroller code. If your project requires screen refreshing, square root calculations, motor control, etc., GD is a good choice.

3. Power Supply

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

Core voltage: GD32’s core voltage is 1.2V, while STM32’s is 1.8V. GD’s core voltage is lower than STM32’s, resulting in lower power consumption during operation.

4. Flash Differences

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

GD Flash execution speed: Programs executed from GD32 Flash have 0 wait states.

STM32 Flash execution speed: ST’s system frequency does not access flash wait time relations: 0 wait states when 0<SYSCLK<24MHz, 1 wait state when 24MHz<SYSCLK≤48MHz, and 2 wait states when 48MHz<SYSCLK≤72MHz.

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

5. Power Consumption

As shown in the table below, GD’s products have lower operating power consumption than STM32 at the same clock frequency, but under the same settings, GD’s sleep mode, standby mode, and sleep mode are still higher than STM32’s.

Differences Between 32-bit MCUs: ESP32, GD32, and STM32

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 diagram below:

Differences Between 32-bit MCUs: ESP32, GD32, and STM32

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

These two differences in USART between GD and STM32 do not significantly affect communication; it just slightly extends GD’s communication time.

7. ADC Differences

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

Differences Between 32-bit MCUs: ESP32, GD32, and STM32

8. FSMC

STM32 only has FSMC for large capacity (256K and above) chips with more than 100 pins, while GD32 has FSMC for all chips with 100 pins or more.

9. Differences in RAM & FLASH Sizes of the 103 Series

The comparison of RAM and Flash between GD103 series and ST103 series is shown in the diagram below:

Differences Between 32-bit MCUs: ESP32, GD32, and STM32

10. Differences Between 105 & 107 Series STM32 and GD

GD offers many more options in the 105/107 series compared to ST, as shown in the table below:

Differences Between 32-bit MCUs: ESP32, GD32, and STM32

11. Anti-Interference Capability

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

03

ESP32 and STM32

ESP32 is a chip launched by Espressif that features a dual-core system composed of 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 number of members in this series is still relatively small. Let’s take a look:

Differences Between 32-bit MCUs: ESP32, GD32, and STM32

Resources are as follows:

Differences Between 32-bit MCUs: ESP32, GD32, and STM32
Differences Between 32-bit MCUs: ESP32, GD32, and STM32
Differences Between 32-bit MCUs: ESP32, GD32, and STM32

The functional block diagram is as follows:

Differences Between 32-bit MCUs: ESP32, GD32, and STM32

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

Differences Between 32-bit MCUs: ESP32, GD32, and STM32

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

1. It integrates a wide variety of peripheral interfaces, including SPI, IIC, IIS, AD, DA, PWM, IR, UART, CAN, etc. Due to the limited number of IOs, each IO generally has multiple functions.

2. The on-chip flash and RAM are substantial, with 448KB of flash and 520KB of RAM. Additionally, a 4MB flash is directly attached to the module.

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

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

STM32 and ESP32 have fundamentally different orientations. ESP32 is compact, fast, and powerful, designed for IoT with WiFi connectivity; while STM32 offers a rich pinout and comprehensive functionality, although it lacks WiFi and Bluetooth, 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 similar products, one being foreign and the other domestic. With the recent trend towards domestic alternatives, GD32 has significant 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 any copyright issues, please contact for removal.

Differences Between 32-bit MCUs: ESP32, GD32, and STM32

Previous Recommendations

Leave a Comment