STM32 circuit knowledge learning

STM32 minimum system board circuit knowledge learning

The minimum system of a single-chip microcomputer refers to a system that can be used to form a single-chip microcomputer with the least circuits. Usually, the minimum system includes: power supply circuit, clock circuit, reset circuit, debugging/download circuit, and for STM32, it is also necessary to start the selection circuit. In short, if you don't know much about circuits at the beginning, you can copy other people's circuits and put them together yourself. The following figure is the classic circuit schematic diagram of stm32c8t6
insert image description here



提示:以下是本篇文章正文内容,下面案例可供参考

1. Power conversion circuit

The development board is usually powered by USB, usually USB is 5V, so it needs to convert 5V to 3.3V, which can be realized by using TPS73633 or AMS1117 chip power chip.
First, design the power inlet part. Now most development boards use USB 5V power supply, so we also use USB interface for power supply in this design, so our power interface uses 5Pin mini patch USB, and the 5V power supply Introduce the development board for use, the circuit diagram is as follows, 1 pin is the positive pole of the power supply, and 5 pins are the negative pole. The diodes connected in series are to protect our development board and prevent individual connecting lines from burning out due to incorrect polarity. The protection circuit is designed in our Any circuit must be considered, and everyone should pay attention to this when designing their own in the future. In this way, we can introduce the 5V USB power supply into the development board through the connecting line for use.

insert image description here
The next step is the power supply circuit. The working voltage of STM32 is DC3.3V, so we need a chip that can convert the voltage greater than 3.3V to a stable 3.3V voltage. Here we use the TPS73633 or AMS1117 chip power chip to achieve it.
insert image description here
The following figure shows the relevant description of the TPS73633 chip. The TPS73633DBVR is a 3.3V fixed output low-dropout (LDO) linear regulator that uses a new topology-NMOS adjustment elements in a voltage follower configuration. Using output capacitors with low ESR, this topology is stable and can even operate without capacitors. It also provides high reverse blocking (low reverse current) and ground pin current that is nearly constant over all output current values. The device uses an advanced BiCMOS process to produce high precision while delivering very low dropout (LDO) voltage and low ground pin current. When not enabled, the current consumption is less than 1uA, which is very suitable for portable applications. Very low output noise is ideal for powering a VCO. The device is protected by thermal shutdown and foldback current limit.

insert image description here

2. JTAG/SWD debugging interface circuit

The JTAG/SWD debug interface circuit adopts the standard JTAG connection, which is compatible with the SWD interface, because SWD only needs four wires (SWCLK, SWDIO, VCC and GND). It should be noted that the interface circuit provides 3.3V power for JLINK or ST-Link, therefore, the STM32 core board cannot be powered by JLINK or ST-Link, but the STM32 core board supplies power for JLINK or ST-Link. JLINK and ST-Link can not only download programs, but also perform online debugging on STM32 microcontrollers.

insert image description here

3. Clock circuit

MCU is an integrated chip, which is composed of very complex digital circuits and other circuits, and requires a stable clock pulse signal to ensure normal operation. Like the heart inside the human body, the clock is the "power" source of the chip. Once the clock is generated, it pushes the processor to execute instructions. In addition to the CPU, all peripherals (GPIO, I2C, SPI, etc.) on the chip need a clock, which shows the importance of the clock. The higher the clock frequency that the chip runs, the faster the processing speed of the chip, but at the same time the higher the power consumption. In order to balance power consumption and performance, microprocessors generally have multiple clock sources, and at the same time divide the clock frequency into multiple sizes to adapt to peripherals with different needs. The following figure shows the clock tree of stm32
insert image description here

insert image description here
Here we connect the two crystal oscillator circuits, the power supply, and the network symbols of each pin correspondingly. Except the crystal oscillator and power supply, the rest of the labels are connected to the pin headers we lead out. The crystal oscillator circuit contains an 8MHz The main crystal oscillator, and a 32.768kHz internal RTC real-time clock crystal oscillator, here the clock crystal oscillator is reserved, if there is a small partner who needs the clock, it can be directly soldered, which is convenient to use. The start-up capacitor is connected in parallel behind each crystal oscillator, which is convenient The crystal oscillator starts to oscillate, and the capacitors C3-C7 in the power supply form a low-pass filter circuit to make the 32 work better

4. Reset circuit

In an embedded system, due to the interference of the external environment, it is inevitable that the program will run away or crash. At this time, it is necessary to reset the MCU to run again. This circuit connects a button to the NRST pin. Once the button is pressed, NRST will be grounded, and NRST will be pulled down to reset.
insert image description here

Guess you like

Origin blog.csdn.net/m0_57730390/article/details/126957269