The difference between ST company STM32F4 and STM32F1

This article originated from the Internet and does not guarantee its correctness and completeness. Compared with STM32F1, STM32F4 has improved more than a little bit. In order to make it easier for beginners to understand, we have compared the relevant information and summarized the improvements.

F1 uses the Crotex M3 core, and F4 uses the Crotex M4 core.

The highest frequency of F1 is 72MHz, and the highest frequency of F4 is 168MHz.

F4 has a single-precision floating-point unit, and F1 has no floating-point unit.

F4 has an enhanced DSP instruction set. The execution time of F4 16-bit DSP instructions is only 30%~70% of F1. The time for F4 to execute 32-bit DSP instructions is only 25% ~ 60% of F1.

The maximum internal SRAM of F1 is 64K bytes, and the internal SRAM of F4 has 192K bytes (112K+64K+16K).

F4 has a backup domain SRAM (to keep data through Vbat power supply), F1 does not have a backup domain SRAM.

F4 executes programs from internal SRAM and external FSMC memory much faster than F1. The instruction bus I-Bus of F1 is only connected to Flash, and instructions fetching from SRAM and FSMC can only pass through S-Bus, which is slower. The I-Bus of F4 is not only connected to Flash, but also connected to SRAM and FSMC, thereby speeding up the speed of fetching instructions from SRAM or FSMC.

The maximum package of F1 is 144 pins, which can provide 112 GPIOs; the maximum package of F4 has 176 pins, which can provide 140 GPIOs.

The internal pull-up and pull-down resistor configuration of F1's GPIO is only useful for input mode and is invalid for output. When the F4 GPIO is set to output mode, the configuration of the pull-up and pull-down resistors is still valid. That is, F4 can be configured as an open-drain output with an internal pull-up resistor enabled, but F1 cannot.

The maximum flip speed of F4 GPIO is 84MHz, and the maximum flip speed of F1 is only 18MHz.

F1 can provide up to 5 UART serial ports, and F4 can provide up to 6 UART serial ports.

F1 can provide 2 I2C interfaces, F4 can provide 3 I2C interfaces.

Both F1 and F4 have three 12-bit independent ADCs, F1 can provide 21 input channels, and F4 can provide 24 input channels. The maximum sampling frequency of F1 ADC is 1Msps, and 2-channel alternate sampling can reach 2Msps (F1 does not support 3-channel alternate sampling). The maximum sampling frequency of F4 ADC is 2.4Msps, and the 3-channel alternate sampling can reach 7.2Msps.

F1 has only 12 DMA channels, and F4 has 16 DMA channels. Each DMA channel of F4 has 4*32-bit FIFO, and F1 has no FIFO.

The maximum speed of F1's SPI clock is 18MHz, and F4 can reach 37.5MHz.

F1 does not have an independent 32-bit timer (32-bits need to be cascaded to achieve), F4's TIM2 and TIM5 have 32-bit up and down counting functions.

Both F1 and F4 have two I2S interfaces, but F1's I2S only supports half-duplex (either playback or recording at the same time), while F4's I2S supports full-duplex, and playback and recording can be performed at the same time.

As the largest occupant of the Cortex M3 market, ST Company launched the STM32F4 series products based on the Cortex M4 core in 2011. Compared with Cortex M3 products such as STM32F1/F2, the biggest advantage of STM32F4 is the addition of hardware FPU units and DSP instructions. At the same time, the main frequency of STM32F4 has also increased a lot, reaching 168Mhz (210DMIPS processing power can be obtained), which makes STM32F4 especially suitable for applications that require floating-point operations or DSP processing. It is also called: DSC, which has a very wide Application prospects.

Compared with STM32F1, STM32F4 has the following main advantages:

1. More advanced kernel. STM32F4 uses Cortex M4 core with FPU and DSP instruction set, while STM32F1 uses Cortex M3 core without FPU and DSP instruction set.

2. More resources. STM32F4 has up to 192KB of on-chip SRAM, with camera interface (DCMI), encryption processor (CRYP), USB high-speed OTG, true random number generator, OTP memory, etc.

3. Enhanced peripheral functions. For the same peripheral part, STM32F4 has faster analog-to-digital conversion speed, lower ADC/DAC operating voltage, 32-bit timer, real-time clock (RTC) with calendar function, greatly enhanced IO multiplexing function, 4K words Battery-backed SRAM and faster USART and SPI communication speed.

4. Higher performance. The maximum operating frequency of STM32F4 can reach 168Mhz, while STM32F1 can only reach 72Mhz; STM32F4 has an ART adaptive real-time accelerator, which can achieve the performance equivalent to FLASH zero wait cycle, while STM32F1 requires a wait cycle; STM32F4 FSMC uses a 32-bit multiple AHB bus matrix , Compared with STM32F1 bus access speed is significantly improved.

5. Lower power consumption. The power consumption of STM32F40x is: 238uA/Mhz. The low-power version of STM32F401 is as low as 140uA/Mhz, while STM32F1 is as high as 421uA/Mhz.

Guess you like

Origin blog.csdn.net/ctrigger/article/details/111470171