Both are 32-bit MCUs, what is the difference between ESP32, GD32, and STM32

Don't want to miss my push, remember the upper right corner - check the official account - set it as a star, take off the star and send it to me

8e9b49e2c7a033e45a52b2ced058dd17.gif

1ace85553a7433b1038e11eadf8aa189.gif

01 


foreword 

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

GD32: The product released by GigaDevice in 2013 basically imitates STM32 in terms of chip development, configuration, and naming. Even GPIO and STM32 are pin to pin, and the package can be directly used without changing the soldering. Sometimes the source code of STM32 does not need to be modified, just recompile and burn it to GD32 to run. Of course, there are many differences, such as serial port driver, USB, library files, etc.

ESP32: A product developed by Espressif in 2017. Unlike STM32 and GD32, ESP32 is mainly for the IoT field and supports many functions, but there are few GPIO pins, so most GPIOs have many multiplexing functions. The essential functions of the Internet of Things such as Bluetooth and WiFi are integrated at the factory, and the board is also small, which is suitable for the Internet of Things.

02 


The difference between GD32 and STM32

GD32 is a domestic single-chip microcomputer, which is the same as STM32 in many places, but GD32 is a different product after all, it is impossible to use STM32 for everything, and some self-developed things are still different. The differences are as follows:

1. Kernel

GD32 uses the second-generation M3 core, and STM32 mainly uses the first-generation M3 core. The figure below is the M3 kernel errata of ARM. The core used by GD only has a BUG of 752419.

5d34887201475184555f0fd22db83532.png

2. Frequency

Use HSE (high-speed external clock): the main frequency of GD32 is up to 108M, and the main frequency of STM32 is up to 72M

Use HSI (high-speed internal clock): GD32 has a maximum frequency of 108M, and STM32 has a maximum frequency of 64M

A high main frequency means that the MCU code will run faster. If you need to refresh the screen, square root calculation, motor control and other operations in the project, GD is a good choice.

3. Power supply

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

Core voltage: GD32 core voltage is 1.2V, STM32 core voltage is 1.8V. The core voltage of GD is lower than that of STM32, so the chip of GD runs with lower power consumption during operation.

4. Differences in Flash

The Flash of GD32 is independently developed, which is different from that of STM32.

GD Flash execution speed: The program execution in GD32 Flash is 0 waiting period.

STM32 Flash execution speed: ST system frequency does not access flash Waiting time relationship: 0 waiting period, when 0<SYSCLK<24MHz, 1 waiting period, when 24MHz<SYSCLK≤48MHz, 2 waiting period, when 48MHz<SYSCLK≤72MHz.

Flash erasing time: GD erasing time is a bit longer, the official data is as follows: GD32F103/101 series Flash 128KB and below models, the typical value of Page Erase is 100ms, and the actual measurement is about 60ms. Corresponding ST product Page Erase typical value is 20~40ms.

5. Power consumption

From the table below, it can be seen that under the same main frequency of GD products, the operating power consumption of GD is lower than that of STM32, but under the same settings, the shutdown mode, standby mode, and sleep mode of GD are still higher than those of STM32.

6cbc7f15844f15da2aaa5fe636010f87.png

6. Serial port

When GD sends data continuously, there will be a Bit Idle between every two bytes, but STM32 does not, as shown in the figure below:

323d7954904dd268c2f1856ca550ed29.png

The GD serial port only has 1/2 two stop bit modes when sending. STM32 has four stop bit modes of 0.5/1/1.5/2.

These two differences between GD and STM32 USART have basically no effect on communication, but the communication time of GD will be a little longer.

7. ADC difference

The input impedance and sampling time settings of GD are different from those of ST, and the input impedance of GD sampling with the same configuration is relatively small. The specific situation is shown in the table below. This is the relationship between the input impedance and the sampling period when the ADC sampling clock is 14M when running at a main frequency of 72M:

da99706c2f844c45de7a6678f76b20c3.png

8、FSMC

STM32 only has FSMC for large capacity above 100Pin (256K and above), and all 100Pin or above of GD32 have FSMC.

9. 103 series RAM&FLASH size difference

The comparison of ram and flash between GD103 series and ST103 series is as follows:

1fdfd35c8f60c7ed2881a140c94d72e7.png

10. The difference between 105&107 series STM32 and GD

GD's 105/107 has a lot more options than ST's, see the table below for details:

3cd7f2ff219bc58c95613fce83da4a65.png

11. Anti-interference ability

GD's anti-interference ability is not as good as STM32, and it needs some polishing.

03 


ESP32 and STM32

ESP32 is a chip with a dual-core system composed of two Harvard-structured Xtensa LX6 CPUs launched by Espressif. All on-chip memory, off-chip memory, and peripherals are distributed over the data and/or instruction buses of the two CPUs.

Compared with a large family of STM32, ESP32 also represents a series, but at present, the members of this series are still relatively small, let's take a look:

172d2f7701cb991f0260ee965cc37efa.png

The resources are as follows:

dfef30ed15b75450d27184d79c9c7b45.png d095a1ee92e03fbef72e2e5c5dea6742.png d962aa05a5938db587dd2ff03fe2ac8e.png

The functional block diagram is as follows:

e99794b750dddbe4c6da7a985594e0c6.png

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

4bba98b90b761fbe44d735a2be263135.png

The ESP32 module does not have many IOs, and it is estimated that there are only about 30 (the chip has 34, but the external FLASH in the module uses up some). But you will find that it has several characteristics:

1. It integrates a lot of peripheral interfaces, such as SPI, IIC, IIS, AD, DA, PWM, IR, UART, CAN and so on. There are a limited number of IOs, so basically each IO has multiple functions.

2. The on-chip flash and ram are very large, the flash has 448KB, and the ram has 520KB. And a 4MB flash is directly hung on the module.

3. Fast! Although the frequency of the external crystal is only 40MHZ, it can support 80MHZ, 160MHZ, 240MHZ through the internal main frequency, and the computing power is as high as 600MIPS.

4. With wifi and bluetooth! Currently both cannot be used at the same time.

STM32 and ESP32 basically have different positioning. ESP32 tends to be small in size, super fast, and powerful. It is connected to the network through wifi, and it is specially born for the Internet of Things; while STM32 tends to have rich pins and comprehensive functions. Although it does not have wifi and Bluetooth, and the speed is not as fast as ESP32, it can The network port is connected to the network and can control more peripherals, which is born for consumer electronics and industrial control.

04 


Summarize

STM32 and GD32 are homogeneous products. The difference is that one is foreign and the other is domestic. Recently, localization is popular, so GD32 still has great development prospects . The Internet of Things is a good direction, so ESP32 is also very promising.

Source: Breadboard community, the copyright belongs to the original author. If copyright issues are involved, please contact to delete.

7c7719f5983179aa67e8cd17c529b360.jpeg

Past recommendation

0f4f28cd3b19f4e460b98935edecefd9.jpeg

In-depth long article: How does STM32 combine software and hardware, and how to run it step by step after compiling

1e1952e84d543456cbf818ab8dfe61f9.jpeg

Brother Yu will take you to play with ESP32 , 12 basic tutorials have been updated, and the next step is the advanced tutorial

78a330c1ffb442bef10a3c50cb026791.jpeg

In the amusement park, while taking children, write codes and share some interesting embedded software and hardware information

1f769232fbf73ffe52ed166686aa0e99.jpeg

Do you have a working laboratory of your own? Let’s enjoy others’

Guess you like

Origin blog.csdn.net/karaxiaoyu/article/details/131368719