Differences Between STM32, GD32, and ESP32

Follow and star my public account, direct access to wonderful content

Differences Between STM32, GD32, and ESP32

Source: Online materials

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

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

ESP32: A product developed by Espressif Systems in 2017, which differs from STM32 and GD32. ESP32 is mainly aimed at the IoT field, supporting many functions, but it has very few GPIO pins, so most GPIO pins have multiple functions. It comes with integrated Bluetooth and WiFi, essential for IoT, and the board is small, suitable for IoT.

Differences Between GD32 and STM32

GD32 is a domestic microcontroller, reportedly developed by former ST employees, and GD32 is based on STM32 as a template. Therefore, GD32 and STM32 share many similarities, but GD32 is a different product, and not everything can be inherited from STM32; there are still some differences due to independent development. 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 diagram shows the ARM company’s M3 core errata, with only one bug (752419) in the core used by GD.

Differences Between STM32, GD32, and ESP32

2. Main Frequency

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

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

A higher main frequency means the microcontroller code runs 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 for STM32 it is 2.0~3.6V or 1.65~3.6V. GD’s power supply range is relatively narrower than STM32’s.

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

4. Flash Differences

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

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

STM32 Flash execution speed: The ST system frequency does not access Flash with 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 shows that for GD32F103/101 series Flash models with 128KB or less, the typical Page Erase time is 100ms, with actual measurements around 60ms. In contrast, the corresponding ST product’s Page Erase typical value is 20~40ms.

5. Power Consumption

The table below shows that GD’s products have lower operating power consumption than STM32 at the same main frequency. However, under the same settings, GD’s sleep mode, standby mode, and sleep mode have higher power consumption than STM32.

Differences Between STM32, GD32, and ESP32

6. Serial Port

GD introduces a Bit Idle between every two bytes during continuous data transmission, while STM32 does not, as shown in the diagram below:

Differences Between STM32, GD32, and ESP32

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

The differences in USART between GD and STM32 do not significantly affect communication; it only slightly increases 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 following table shows the relationship between input impedance and sampling period at 72M main frequency, with ADC sampling clock at 14M:

Differences Between STM32, GD32, and ESP32

8. FSMC

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

9. RAM & FLASH Size Differences in 103 Series

The RAM and Flash comparisons between GD103 series and ST103 series are shown in the following diagram:

Differences Between STM32, GD32, and ESP32

10. Differences Between 105 & 107 Series STM32 and GD

GD’s 105/107 selection is much broader than ST’s, as shown in the following table:

Differences Between STM32, GD32, and ESP32

11. Anti-Interference Ability

GD’s anti-interference ability is inferior to STM32 and still needs improvement.

ESP32 and STM32

ESP32 is a chip developed by Espressif Systems that uses two Harvard architecture Xtensa LX6 CPUs to form a dual-core system. All on-chip memory, off-chip memory, and peripherals are distributed across the data and/or instruction buses of the two CPUs.

Compared to STM32’s large family, ESP32 also represents a series, but currently, this series has relatively few members. Let’s take a look:

Differences Between STM32, GD32, and ESP32

Resources are as follows:

Differences Between STM32, GD32, and ESP32
Differences Between STM32, GD32, and ESP32
Differences Between STM32, GD32, and ESP32

The functional block diagram is as follows:

Differences Between STM32, GD32, and ESP32

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

Differences Between STM32, GD32, and ESP32

The ESP32 module has limited I/O, estimated to be around 30 (the chip has 34, but some are used for external FLASH). However, it has several characteristics:

1. Integrates many peripheral interfaces, including SPI, IIC, IIS, AD, DA, PWM, IR, UART, CAN, etc. Due to the limited number of I/Os, each I/O has multiple functions.

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

3. Fast speed! Although the external crystal frequency is only 40MHZ, the internal main frequency supports 80MHZ, 160MHZ, and 240MHZ, with a computing capability of up to 600MIPS.

4. Has WiFi and Bluetooth! Currently, both cannot be used simultaneously.

STM32 and ESP32 have fundamentally different positioning. ESP32 focuses on compact size, high speed, and powerful functions, designed for IoT with WiFi connectivity; while STM32 focuses on abundant pins and comprehensive functions, although it lacks WiFi and Bluetooth and is not as fast as ESP32, it can connect to the network via Ethernet and control more peripherals, designed for consumer electronics and industrial control.

Summary

STM32 and GD32 are homogenous products, one being foreign and the other domestic. With the recent trend of domestic substitution, GD32 has good development prospects. IoT is also a good direction, making ESP32 very promising.

Copyright Statement: This article is sourced from the internet, freely conveying knowledge, and the copyright belongs to the original author. If there are copyright issues, please contact me for removal.

‧‧‧‧‧‧‧‧‧‧‧‧‧‧‧‧ END ‧‧‧‧‧‧‧‧‧‧‧‧‧‧‧

Follow my public account and reply "Join group" to join the technical exchange group according to the rules.


Click "Read the original text" for more sharing, welcome to share, collect, like, and view.

Leave a Comment