Comparative analysis of GD32 single-chip microcomputer and STM32 single-chip microcomputer

Comparative analysis of GD32 single-chip microcomputer and STM32 single-chip microcomputer


Both GD32 MCU and STM32 MCU are 32-bit general-purpose microcontrollers based on the Arm Cortex-M3/M4 core, which are widely used in various embedded systems and IoT fields. There are many similarities between the two, but there are also some differences. This article will compare and analyze the characteristics, advantages and development costs of the two from the following aspects.

1. Core and main frequency

The GD32 microcontroller uses the second-generation M3/M4 core, while the STM32 microcontroller mainly uses the first-generation M3/M4 core. According to ARM's M3 kernel errata, the core used by GD32 has only one BUG, ​​while the core used by STM32 has multiple BUG1. This means that the core of GD32 is more stable and reliable.

The main frequency of the GD32 microcontroller is also higher than that of the STM32 microcontroller. When using a high-speed external clock (HSE), the main frequency of GD32 can reach up to 108MHz, while the main frequency of STM32 can only reach 72MHz. When using the high-speed internal clock (HSI), the maximum frequency of GD32 can reach 108MHz, while the maximum frequency of STM32 can only reach 64MHz2. The higher the main frequency, the faster the MCU code runs, which is suitable for some application scenarios that require faster calculation or processing capabilities.

2. Power supply and power consumption

GD32 MCU and STM32 MCU have some differences in power supply. GD32 external power supply range is 2.6 3.6V, while STM32 external power supply range is 2.0 3.6V or 1.65~3.6V2. This shows that the power supply range of GD32 is relatively narrow and has higher requirements on power quality.

GD32 MCU and STM32 MCU also have some differences in power consumption. The GD32 core voltage is 1.2V, while the STM32 core voltage is 1.8V2. This shows that the core voltage of GD32 is lower than that of STM32, so GD32 consumes less power during operation. However, under the same settings, the power consumption of GD32 in stop mode, standby mode and sleep mode is higher than that of STM322. This shows that the optimization of GD32 in low power consumption mode needs to be improved.

3. Flash and RAM

Flash and RAM are important resources for the microcontroller to store programs and data. GD32 MCU and STM32 MCU also have some differences in Flash and RAM.

  • First of all, the GD32 single-chip microcomputer provides a larger capacity of Flash and RAM. For example, in 103 series, GD103C8T6 provides 64KB Flash and 20KB RAM, while ST103C8T6 only provides 64KB Flash and 10KB RAM2. In the 105/107 series, GD105/107 provides up to 3MB Flash and 256KB RAM, while ST105/107 only provides 1MB Flash and 96KB RAM2.

  • Secondly, the GD32 single-chip microcomputer improves the speed of program execution in Flash. In the first 256KB Flash, program execution is 0 wait cycle 2. The STM32 MCU requires different waiting periods 2 at different system frequencies. The faster the execution speed of Flash, the higher the efficiency of program operation.

  • Finally, the GD32 single-chip microcomputer increases the Flash erasing and writing cycle and the Flash write protection function. The Flash erasing cycle of the GD32 microcontroller is 10,000 times, while the Flash erasing cycle of the STM32 microcontroller is 1,000 times. This shows that GD32's Flash has a longer lifespan and is more suitable for application scenarios where programs are frequently updated. The Flash write protection function of the GD32 single-chip microcomputer can be realized by software or hardware, while the Flash write protection function of the STM32 single-chip microcomputer can only be realized by hardware. This shows that the Flash write protection function of GD32 is more flexible and convenient.

4. Peripherals and pins

Peripherals and pins are important interfaces for the microcontroller to communicate and control external devices. GD32 MCU and STM32 MCU also have some differences in peripherals and pins.

  • First of all, the GD32 microcontroller provides more types and quantities of peripherals. For example, in the 103 series, GD103 provides 3 USARTs, 3 SPIs, 2 I2Cs, 2 CANs, 1 USB, 1 SDIO, 1 FSMC, 3 timers, 1 RTC, 1 WDT , 1 IWDG, 1 BKP, 1 ADC, 1 DAC and other peripherals, while ST103 only provides 3 USARTs, 2 SPIs, 2 I2Cs, 1 CAN, 1 USB, 2 timers, 1 RTC, 1 WDT, 1 IWDG, 1 BKP, 1 ADC and other peripherals. In the 105/107 series, GD105/107 provides 5 USARTs, 3 SPIs, 2 I2Cs, 3 CANs, 2 USBs (including OTG), 1 SDIO, 1 FSMC, 4 timers, 1 RTC, 1 WDT, 1 IWDG, 1 BKP, 3 ADCs and other peripherals, while ST105/107 only provides 5 USARTs, 3 SPIs, 2 I2Cs, 2 CANs, 1 USB (including OTG), 1 SDIO, 1 FSMC, 4 timers, 1 RTC, 1 WDT, 1 IWDG, 1 BKP, 2 ADC and other peripherals. This shows that the peripherals of GD32 are richer and more powerful, which can meet more diverse application requirements.

  • Secondly, the GD32 MCU provides more pins and higher pin multiplexing. For example, in the 103 series, GD103C8T6 provides 48 pins, while ST103C8T6 only provides 44 pins. In the 105/107 series, GD105/107 provides 144 pins, while ST105/107 only provides 100 pins. The pins of the GD32 single-chip microcomputer can also realize the multiplexing of up to 16 functions through software configuration, while the pins of the STM32 single-chip microcomputer can only realize the multiplexing of 4 functions through hardware configuration. This shows that the pins of GD32 are more flexible and convenient, which can reduce the complexity and cost of external circuits.

5. Development environment and cost

The development environment and cost are important factors affecting the selection and application of microcontrollers. GD32 MCU and STM32 MCU also have some differences in development environment and cost.

  • First of all, both GD32 MCU and STM32 MCU can use Keil, IAR and other common development software for programming and debugging, and can also use J-Link, ST-Link and other common debugging tools for download and simulation. There is not much difference between the two in terms of developing software and debugging tools.

  • Secondly, both GD32 MCU and STM32 MCU have their own official websites and forums, providing relevant technical documents, sample codes, driver libraries, development boards and other resources. There is not much difference between the two in terms of technical support.

  • Finally, there are some differences in price between GD32 MCU and STM32 MCU. According to the information I searched on the Internet, the price of GD32 microcontrollers is generally cheaper than that of STM32 microcontrollers. This shows that GD32 has certain advantages in terms of cost.

6. Summary

To sum up, GD32 MCU and STM32 MCU are both excellent 32-bit general-purpose microcontrollers, each with its own characteristics and advantages. GD32 single-chip microcomputer is superior to STM32 single-chip microcomputer in terms of core stability, main frequency speed, Flash capacity, Flash execution speed, Flash erasing cycle, Flash write protection function, peripheral type and quantity, pin number and multiplexing degree; while STM32 The single-chip microcomputer is superior to the GD32 single-chip microcomputer in terms of power supply range and power consumption in low-power mode. There is not much difference between the two in terms of development environment, technical support, etc., but the GD32 microcontroller is cheaper than the STM32 microcontroller in terms of price. Therefore, when choosing GD32 or STM32, trade-offs and considerations need to be made according to specific application scenarios and requirements.

7. References

  • https://www.cnblogs.com/chen-farsight/p/10822677.html
  • https://www.eefocus.com/mcu-dsp/436281
  • https://www.eefocus.com/mcu-dsp/436281

Guess you like

Origin blog.csdn.net/wujuxKkoolerter/article/details/131340691