Introduction to STM32 and STM32F407

Getting to know STM32

In June 2007, ST released the world's first 32-bit general-purpose
microcontroller : STM32F103, which quickly occupied the market with excellent performance, abundant resources, and high cost performance. It was
amazing and out of control. As of June 2020, the cumulative shipment of STM32 exceeded 4.5 billion.
The STM32F103ZET6 chip used by the battleship development board is shown in Figure 2.1.1:
insert image description here

The excellence of STM32 is reflected in the following aspects:

1. Super low price. The price of an 8-bit machine and the performance of a 32-bit machine are the biggest advantages of STM32.
2. A lot of peripherals. STM32 has many peripherals and functions including: FMC, TIMER, SPI, IIC, USB, CAN, IIS, SDIO,
ADC, DAC, RTC, DMA, etc., with a very high level of integration.
3. Abundant models. The STM32 M3 core alone has
hundreds of models in 8 series including F100, F101, F102, F103, F105, F107, F207, and F217, with packages such as QFN, LQFP, and BGA to choose from. At the same time, STM32 has also introduced
ultra-low power consumption and wireless application M3 chips such as STM32L and STM32W. In addition, ST has also introduced
higher-performance chips such as STM32F4/F7/H7.
4. Excellent real-time performance. 150 interrupts, 16 levels of programmable priority, and all pins can be used as interrupt input.
5. Excellent power consumption control. Each peripheral of STM32 has its own independent clock switch, which can
reduce power consumption by turning off the clock of the corresponding peripheral.
6. Very low development cost. The program can be downloaded through the serial port, and the corresponding emulator is also very cheap. It supports
JTAG&SWD debugging interface, and at least only 2 IO ports can realize emulation debugging, which greatly reduces the development cost.

Performance comparison between STM32 and 51:

insert image description here

STM32 series

STM32 currently has 5 categories and 18 series
insert image description here
insert image description here
. It can be seen that STM32 is mainly divided into two parts, MCU and MPU. MCU is our common STM32 microcontroller
, which cannot run Linux, andMPU is a microprocessor launched by ST in 2019, which can run Linux

STM32 naming

STM32 naming rules
insert image description here
The product name of STM32 contains
important information such as family, category, specific function, pin number, flash memory capacity, package, temperature range, etc. This information can help us identify and distinguish different STM32 chips.

STM32 selection

Here we just need to follow: from high to low, from big to small principle

from high to low

From high to low principle: When you cannot evaluate the performance required by the project, you can consider choosing a high-performance STM32 model
for development, such as choosing F4/F7/H7, etc., to complete key performance on the high-performance STM32 (that is, the most required performance code)
development and verification, if it meets the usage requirements, it can be downshifted, such as from H7→F7→F4→F1, if it does not meet the requirements, it can be upshifted
, such as from F4→F7→H7. The best cost-effective STM32 series.

from big to small

From large to small principle: When you cannot evaluate the resource requirements such as FLASH size, SRAM size, GPIO quantity, and timers required by the project
, you can consider choosing a model with a larger capacity for development, such as choosing a 512K/or even 1M FLASH
After developing most of the functions, you will have a conclusion on the resources required for the project, so that you can choose to downshift according to
the actual situation (of course, in rare cases, you may need to upshift). Through this method, find the most A suitable STM32
model.

You can verify the entire selection work on the punctual atomic development board. Generally, our development boards are
designed with a model with a relatively large capacity/more resources. This can save you the trouble of designing a welding verification board yourself and speed up the project. development
progress. If some senior engineers have a deep understanding of project requirements, they don't even need to verify, and can directly
select the most suitable model, which is more efficient. Of course, this requires long-term accumulation and more practice. I believe that as long as you study more and
practice more, you will be able to reach this level one day.

STM32 design

The schematic design of any MCU part actually follows the design principle of minimum system + IO allocation.

STM32F407 Resource Brief

data sheet

You can download it from the official website: https://www.stmcu.org.cn/
STM32F407ZGT6.pdf The data sheet is a data sheet for the STM32F407 series, mainly including 8 chapters.
insert image description here
The entire STM32F407 data sheet is very important for us to develop and learn STM32, so it is recommended that you
can simply read this document to deepen your impression. For schematic diagram design, the most important
chapter is the pin definition. Only when you know the pin definition of STM32, can you start designing the schematic diagram.

STM32F407ZGT6 specific internal resources:

insert image description here

STM32F407ZGT6 pinout:

insert image description here

STM32F407ZGT6 pin definition:

insert image description here

Specific description of the pin definition table

insert image description here

smallest system

The minimum system is the minimum requirement to ensure the normal operation of the MCU, generally refers to the power supply, reset, crystal oscillator, BOOT
and other parts of the MCU. The minimum system requirements of STM32F407 are shown in Table 2.3.4.4: insert image description here
insert image description here
After completing the design of the above pins, the minimum system of STM32F407 is completed. For the actual schematic diagram of these pins,
you can refer to the schematic diagram of our explorer development board. Then you can start IO allocation.

I/O allocation

IO allocation is to allocate the IO ports of the MCU according to the needs of the project after the minimum system design is completed, and connect different
devices to realize the overall function. For example: GPIO, IIC, SPI, SDIO, FSMC, USB, interrupt, etc. Follow the
principle of allocating specific peripheral IO first, then allocating general IO, and finally fine-tuning, as shown in Table 2.3.4.5:insert image description here
insert image description here

Guess you like

Origin blog.csdn.net/weixin_45172119/article/details/129973558