GD32 replaces STM32, what are the differences? Don't step on these pits...

Click on "Uncle Wheat" above and select "Top/Star Public Account"

Welfare dry goods, delivered as soon as possible

Hello everyone, I'm Wheat. Yesterday, ST raised the price again. As a domestic chip that replaces STM32, what are the differences between GD32 and STM32, and what should be paid attention to? Let's take a look.

I. Introduction

What is GD32?

GD32 is a single-chip microcomputer developed by Zhaoyi Innovation Company in China.

GD32 and STM32 are similar 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. We won't talk about the same places, and let me tell you about the different places.

Second, the difference

1. Kernel

GD32 uses the second-generation M3 core, and STM32 mainly uses the first-generation M3 core. The following figure is the errata of ARM's M3 core. The core used by GD is only 752419.
89bf78902d31236462b11a9e5556b60b.png

2. Main 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): the main frequency of GD32 is up to 108M, and the main frequency of STM32 is up to 64M.
High frequency means that the microcontroller code runs The speed will be faster. If you need to perform screen refresh, square root calculation, motor control and other operations in the project, GD is a good choice.

3. Power supply

External power supply: The external power supply range of GD32 is 2.6~3.6V, and the external power supply range of STM32 is 2~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 GD's chip runs with lower power consumption when running.

4. Flash differences

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 cycles.


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 longer, the official data is as follows: GD32F103/101 series Flash 128KB and below models, Page Erase typical value is 100ms, the actual measurement is about 60ms. The typical value of Page Erase for corresponding ST products is 20~40ms.

5. Power consumption

It can be seen from the table below that under the same main frequency, the running power consumption of GD is smaller than that of STM32, but under the same settings, the shutdown mode, standby mode and sleep mode of GD are still higher than that of STM32.
ca80b6f387bdadf72fd233f1514a016d.png

6. Serial port

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

ac26246f695bbc79f59b6f6934a904a6.png

GD's serial port has only 1/2 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 longer.

7. ADC difference

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

89aa72345a4317a1e5e5c4d447d72bff.png

8、FSMC

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

9, 103 series RAM & FLASH size difference

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


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

GD's 105/107 options are much more than ST's, as shown in the following table:
ec8455d0ef1a621fd9e96bc9d5e3c739.png

11. Anti-interference ability

Regarding this point, the official did not give it. I also found it by accident when I was working on the project. The project originally used STM32F103C8T6, and then replaced it with GD F103C8T6. The pins of these two chips are exactly the same, and then the two adjacent ones used by the microcontroller are The pin of the SPI is used as the clock pin and data output pin of the SPI, and then it is found that the SPI of the STM32 can communicate normally, but the GD can not. After inspection, it is found that there are two IIC copper wires on the back of the copper wire of the SPI on the PCB board. The signal should be affected.

I looked at the pin level with an oscilloscope and found that the data pin waveforms of STM32 and GD are not normal, but the waveform of STM32 is much better. Although the waveform is a little worse, the SPI communication is still normal.

And GD can not communicate normally. Then I slowed down the SPI communication rate again, and found that the data pin of STM32 soon returned to normal waveform, while the GD was still poor, and it did not return to normal until the rate dropped to a very low level. The initial suspicion is that the STM32 has some filtering circuits for the pins, but GD does not.

Although the wiring of the circuit board I used is somewhat unreasonable, in the same harsh environment, STM32 still ensures normal communication, while GD cannot, which to a certain extent shows that GD's anti-interference ability is not as good as STM32.

Transfer from the public account: technology makes dreams bigger

Copyright statement: This article comes from the Internet, and the copyright belongs to the original author. Copyright issues, please contact to delete.

—— The End ——

Recommended in the past

Efficient analysis of single-chip communication protocol, the most practical method

The most suitable communication protocol for single-chip microcomputer, how to design?

46 million units sold! The Road to Raspberry Pi

Good tool, don't hide it! Introduce a tool to improve efficiency

This c language skill refreshed my understanding of structures!

You can never imagine that C language can play like this!

45ede36c2712b9f307ccd763bd8cf4c4.png

Everything you ordered looks good , I take it seriously as I like it

Guess you like

Origin blog.csdn.net/u010632165/article/details/123749241