Clock Configuration
Start running from void SystemInit(void) in the project startup file system_stm32f4xx.c;
Frequency Configuration
/* Configure the main PLL */
RCC->PLLCFGR = PLL_M | (PLL_N << 6) | (((PLL_P >> 1) -1) << 16) |
(RCC_PLLCFGR_PLLSRC_HSE) | (PLL_Q << 24);
Coefficient configuration
Use an external clock source and configure the external clock frequency: stm32f4xx.h
#define HSE_VALUE ((uint32_t)8000000)
System clock factor
#define PLL_M 8
#define PLL_Q 7
#define PLL_N 336
#define PLL_P 2
PLL = HSE_VALUE * N / ( M * P ) = 8MHz * 336 / ( 8 * 2 ) = 168MHz
Note the macro definition in the compiler, which is valid for the entire project.
Reference notes:
1. (if) AHB maximum clock is 168MHz, APB2 high-speed clock maximum frequency is 84MHz, and APB1 low-speed clock maximum frequency is 42MHz.
2. Different PACKs installed by the KEIL compiler will cause inconsistent Lib paths and require recompilation.
Previous article:Configuration issues of STM32 projects with different external crystal oscillators
Next article:STM32 uses an external 16MHZ crystal to modify program points
Recommended ReadingLatest update time:2024-11-17 04:42
- Popular Resources
- Popular amplifiers
- Introduction to Internet of Things Engineering 2nd Edition (Gongyi Wu)
- Learning PLC is easy - PLC ladder diagram and statement table with pictures (Li Changjun, Zhou Hua)
- A Complete Illustrated Guide to Operational Amplifier Applications (Written by Wang Zhenhong)
- How to read electrical control circuit diagrams (Classic best-selling books on electronics and electrical engineering) (Zheng Fengyi)
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- Innolux's intelligent steer-by-wire solution makes cars smarter and safer
- 8051 MCU - Parity Check
- How to efficiently balance the sensitivity of tactile sensing interfaces
- What should I do if the servo motor shakes? What causes the servo motor to shake quickly?
- 【Brushless Motor】Analysis of three-phase BLDC motor and sharing of two popular development boards
- Midea Industrial Technology's subsidiaries Clou Electronics and Hekang New Energy jointly appeared at the Munich Battery Energy Storage Exhibition and Solar Energy Exhibition
- Guoxin Sichen | Application of ferroelectric memory PB85RS2MC in power battery management, with a capacity of 2M
- Analysis of common faults of frequency converter
- In a head-on competition with Qualcomm, what kind of cockpit products has Intel come up with?
- Dalian Rongke's all-vanadium liquid flow battery energy storage equipment industrialization project has entered the sprint stage before production
- Allegro MicroSystems Introduces Advanced Magnetic and Inductive Position Sensing Solutions at Electronica 2024
- Car key in the left hand, liveness detection radar in the right hand, UWB is imperative for cars!
- After a decade of rapid development, domestic CIS has entered the market
- Aegis Dagger Battery + Thor EM-i Super Hybrid, Geely New Energy has thrown out two "king bombs"
- A brief discussion on functional safety - fault, error, and failure
- In the smart car 2.0 cycle, these core industry chains are facing major opportunities!
- Rambus Launches Industry's First HBM 4 Controller IP: What Are the Technical Details Behind It?
- The United States and Japan are developing new batteries. CATL faces challenges? How should China's new energy battery industry respond?
- Murata launches high-precision 6-axis inertial sensor for automobiles
- Ford patents pre-charge alarm to help save costs and respond to emergencies
- Notice on organizing the 2021 National Undergraduate Electronic Design Competition
- Silkscreen
- I'm a newbie. I don't understand. I'm asking for help on the problem I encountered when making a spi receiving module in Verilog.
- Connect a resistor between the primary and secondary coils of the transformer
- MSP430 standby power consumption problem
- How feasible is it for the United States to skip 5G and go directly to 6G?
- Read the good book "Electronic Engineer Self-study Handbook" + reading experience of the first five chapters
- [TI recommended course] #TI? Application of interface chips in automotive products#
- 【Gravity:AS7341 Review】+Bought some colored paper for testing
- 008