01
STM32: A product released by STMicroelectronics on June 11, 2007, a 32-bit microcontroller.
GD32: A product released by GigaDevice in 2013, which imitates STM32 in chip development, configuration, and naming. The GPIO pins are even pin-to-pin compatible with STM32, allowing for direct use without modifications. 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, which is different from STM32 and GD32. ESP32 is mainly aimed at the IoT field and supports many functions, but has fewer GPIO pins, meaning most GPIO pins have multiple functions. It comes with integrated Bluetooth, WiFi, and other essential IoT features, and the board is compact, making it suitable for IoT applications.
01
GD32 is a domestic microcontroller, reportedly developed by former ST employees, and it was created using STM32 as a template. Therefore, GD32 and STM32 have many similarities, but GD32 is a different product and cannot retain all features of STM32; there are some independently developed differences. The differences are as follows:
1. Core
GD32 uses the second generation M3 core, while STM32 primarily uses the first generation M3 core. The following image is the ARM company’s M3 core errata sheet, and the GD core only has one bug: 752419.

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 can run code faster. If your project requires screen refreshing, square root calculations, motor control, etc., GD is a good choice.
3. Power Supply
External Power Supply: The external power supply range for GD32 is 2.6~3.6V, while STM32’s is 2.0~3.6V or 1.65~3.6V. GD’s power supply range is narrower than that of STM32.
Core Voltage: The core voltage for GD32 is 1.2V, while for STM32, it is 1.8V. GD has a lower core voltage than STM32, so GD chips consume less power during operation.
4. Flash Differences
GD32’s Flash is independently developed and differs from STM32’s.
GD Flash execution speed: Programs in GD32 Flash execute with 0 wait cycles.
STM32 Flash execution speed: The ST system frequency has different wait times for accessing flash: 0 wait cycles when 0<SYSCLK<24MHz, 1 wait cycle when 24MHz<SYSCLK≤48MHz, and 2 wait cycles when 48MHz<SYSCLK≤72MHz.
Flash erase time: GD takes longer to erase; the official data states that for GD32F103/101 series Flash models with 128KB or less, the typical Page Erase time is 100ms, and actual measurements are around 60ms. In comparison, the corresponding ST product has 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 under the same clock frequency. However, under the same settings, GD’s sleep mode, standby mode, and shutdown mode still consume more power than STM32.

6. Serial Port
When GD continuously sends data, there is a bit of idle time between every two bytes, while STM32 does not, as shown in the following image:

GD’s serial port only has two stop bit modes: 1/2. STM32 has four stop bit modes: 0.5/1/1.5/2.
The two differences in USART between GD and STM32 do not significantly affect communication; it only slightly prolongs GD’s communication time.
7. ADC Differences
GD’s input impedance and sampling time settings differ from 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:

8. FSMC
STM32 only has FSMC for high-capacity (256K and above) models with 100 pins or more, while GD32 has FSMC for all models with 100 pins or more.
9. RAM & FLASH Size Differences in the 103 Series
The comparison of RAM and FLASH sizes between GD103 series and ST103 series is shown in the image below:

10. Differences Between the 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:

11. Anti-interference Ability
GD’s anti-interference ability is inferior to STM32 and requires further refinement.
03
ESP32 is a chip launched by Espressif that features a dual-core system built on two Harvard architecture Xtensa LX6 CPUs. All on-chip memory, external memory, and peripherals are distributed across the data bus and/or instruction bus of the two CPUs.
Compared to the STM32 family, ESP32 also represents a series, but currently, the number of members in this series is relatively small. Let’s take a look:

Resources are as follows:



The functional block diagram is as follows:

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

The ESP32 module has a limited number of I/O pins, approximately 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. Due to the limited number of I/O pins, each pin typically has multiple functions.
2. The on-chip flash and RAM are substantial, with 448KB of flash and 520KB of RAM. Additionally, a 4MB flash chip is directly attached to the module.
3. Fast speed! Although the external crystal frequency is only 40MHz, it can support internal frequencies of 80MHz, 160MHz, and 240MHz, with computational capabilities reaching 600MIPS.
4. It has WiFi and Bluetooth! However, both cannot be used simultaneously.
STM32 and ESP32 are fundamentally positioned differently. ESP32 focuses on being compact, fast, and powerful, designed for IoT applications with WiFi connectivity; while STM32 emphasizes having rich I/O pins and comprehensive functionality, even without WiFi and Bluetooth. It can connect to networks via Ethernet and control more peripherals, making it suitable for consumer electronics and industrial control.
04
STM32 and GD32 are homogeneous products; one is foreign, and the other is domestic. Recently, the trend of domestic replacement has made GD32 promising.
The IoT is also a promising direction, making ESP32 very promising as well.


👇Click Follow, Technology content will be delivered on time!👇

-
Cool, use ESP8266 to make a high-value RGB clock!
-
Surge
-
What is the relationship between Fourier Transform, Laplace Transform, and Z Transform?
-
Those once popular microcontrollers~
-
Can you imagine a Bluetooth chip costing less than 2 yuan?
-
Why do domestic chips also use English for “datasheet”?
-
Wonderful operational amplifier circuits
-
Why 50 ohms???
-
The most detailed basics of diodes