04-407 Interpretation of the core board clock tree and case code

Learning materials:
STM32F407 Minimal System Board Development Guide-Library Function Version-Section 4.3
STM32F4xx Chinese Reference Manual-Chapter 6

The "P45 system block diagram explanation" and "P46 clock tree explanation" of the hardware home "stm32..." are
punctual. . . Lecture 19

407 core board clock tree
Clock tree:
Insert picture description here

The size of the system clock set in the SystemInit() function:
SYSCLK (system clock) =168MHz
AHB bus clock (HCLK=SYSCLK) =168MHz
APB1 bus clock (PCLK1=SYSCLK/4) =42MHz
APB2 bus clock (PCLK2=SYSCLK/2) =84MHz
PLL main clock =168MHz

① LSI is a low-speed internal clock, RC oscillator, the frequency is about 32kHz. For independent watchdog and automatic wake-up unit use.
②. LSE is a low-speed external clock, connected to a quartz crystal with a frequency of 32.768kHz. This is mainly the clock source of RTC.
③. HSE is a high-speed external clock, which can be connected to a quartz/ceramic resonator or an external clock source. The frequency range is 4MHz~26MHz.
Our development board is connected to an 8M crystal oscillator. HSE can also be directly used as system clock or PLL input.
④, HSI is a high-speed internal clock, RC oscillator, the frequency is 16MHz. It can be used directly as a system clock or as a PLL
input.
⑤ PLL is a phase-locked loop frequency multiplication output. STM32F4 has two PLLs:
1) The main PLL (PLL) is clocked by HSE or HSI and has two different output clocks.
The first output PLLP is used to generate high-speed system clock (up to 168MHz) and the
second output PLLQ is used to generate USB OTG FS clock (48MHz), random number generator clock and SDIO
clock.
2) The dedicated PLL (PLLI2S) is used to generate accurate clocks to achieve high-quality audio performance on the I2S interface.

LSE is a low-speed external clock connected to a quartz crystal with a frequency of 32.768kHz. This is mainly the clock source of RTC.

What is RCT?
RTC, English full name: Real-time clock, Chinese name: Real-time clock, refers to an electronic device that can output real time like a clock, usually an integrated circuit, so it is also called a clock chip. Real-time clock chips are one of the most widely used consumer electronic products in daily life. It provides people with accurate real-time time or an accurate time reference for electronic systems. At present, most real-time clock chips use high-precision crystal oscillators as clock sources.
Detailed explanation: http://www.eepw.com.cn/article/273706.htm

Case code interpretation

About keilkill:
Function: Make the compiled file smaller (after opening the file for compilation, there will be more files, keilkill deletes these files)
Double-click to use

About keil5 how to replace the chip:
Insert picture description here
Insert picture description here1. Project name
2. The name of the whole family
3.
4. Driver, modular design, initialization function modification, pin modification
5. Stm32 library file
modification on this framework

There will be case explanations next

Guess you like

Origin blog.csdn.net/m0_48808835/article/details/113781748