The two series STM32F1 and STM32F4 are the favorites of MCU experts. Which one is better?

The two series, STM32F1 and STM32F4, are the favorites of MCU experts. Which one is better?

79014595a091dd221a2a6ec7c40077eb.png

Everyone knows that GD32 is a microcontroller developed in China. It can be said that it is the light of domestic products. It is said that the developers are from ST company, and GD32 is also made with STM32 as a template. So GD32 and STM32 are the same in many places.

However, GD32 is a different product after all, it is impossible to use STM32 for everything, and some self-developed things are still different.

We will not talk about the same places, and list the different places below.

01 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 has a unique BUG 752419.

02 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 MCU code will run faster. If you need to perform screen refresh, square root operation, motor control and other operations in the project, GD is a good choice.

03 Power supply

External power supply: GD32 external power supply range is 2.6-3.6V, STM32 external power supply range 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.

04Flash Difference

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<>z; 1 waiting period, when 24MHz<>K≤48MHz; 2 waiting period, when 48MHz<>K≤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, and the actual measurement is about 60ms." The corresponding ST product Typical value of Page Erase 20~40ms.

702ce7c50e0d23ff2a95b00b0894e1bc.png

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

06 Serial port

When GD sends data uninterruptedly, there will be a Bit Idle between every two bytes, while STM32 does not

GD's serial port has unique 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 no effect on communication at all, but the communication time of GD will be longer.

07 ADC Difference

The input and write impedance and sampling duration settings of GD are different from those of ST. The input and write impedance of GD sampling with the same configuration is relatively small.

08 FSMC

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

09 103 series RAM & FLASH size difference

ram and flash of GD103 series and ST103 series

10 The difference between 105&107 series STM32 and GD

GD's 105/107 options are much more than ST's

11 Anti-interference ability

Regarding this point, the official did not give it, and the author also discovered it by accident while working on the project.

The project originally used STM32F103C8T6, and later replaced it with GDF103C8T6. The pins of these two chips are exactly the same. The two adjacent pins used by the microcontroller are 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 the PCB board There are two IIC copper wires on the back of the SPI copper wire, and the signal should be affected.

I looked at the pin level with an oscilloscope and found that the waveforms of the data pins 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.

b1ec8ffd3a632110f1506e76b19e2011.png

Then we slowed down the communication rate of SPI, and found that the data pin of STM32 soon returned to normal waveform, while 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 STM32 has some filtering circuits for the pins, while GD does not. Although the wiring of the circuit board used is somewhat unreasonable, in the same harsh environment, STM32 still ensures the normal communication, while GD cannot, which to a certain extent shows that the anti-interference ability of GD is not as good as that of STM32.

Guess you like

Origin blog.csdn.net/danpianji777/article/details/124122997